Skip to main content

Inventory tools helps to convert yeild return value to Json or CSV

Project description

# inventools

### Inventools helps to covert yield value to Json or csv output

## Example to user yeild value to csv

from inventools import tools

Name_of_file = "language"

header_in_list=['s_no','language','version']

output_in_list = ["1","python","0.1"]

@tools.write_csv(Name_of_file,header_in_list)
def foo():
    yield(output_in_list)
foo()

#### output location in relative path

└───output_csv

language.csv

## Example to user yeild value to json

from inventools import tools

Name_of_file = "language"

header_in_list=['s_no','language','version']

output_in_list = ["1","python","0.1"]

@tools.write_json(Name_of_file,header_in_list)
def foo():
    yield(output_in_list)
foo()
#### output location in relative path
└───output_json

language.json

##### Iteratable example

from inventools import tools

Name_of_file = "language"

header_in_list=['s_no','language','version']

iteratable_object_in_list = [[1,"python",0.1],[2,"java",11],[3,"kotlin",2],[4,"golang",2]]

@tools.write_csv(Name_of_file,header_in_list)
def foo():
    for output_in_list in iteratable_object_in_list:
        yield(output_in_list)
foo()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

inventools-3.0.tar.gz (2.6 kB view details)

Uploaded Source

File details

Details for the file inventools-3.0.tar.gz.

File metadata

  • Download URL: inventools-3.0.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.0 pkginfo/1.7.0 requests/2.25.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.1

File hashes

Hashes for inventools-3.0.tar.gz
Algorithm Hash digest
SHA256 99e2791b01bfa6b77d109d7b55bcd846a4df6462fea22b597054baf2c7dbe8ed
MD5 35e798744bd7288bdbf8db8bad79e199
BLAKE2b-256 1cdc433b831b0a131348023772a5f2b49d73b55f01493709df9f546d6035b2b3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page