CONVCSV2JSON
Convert a CSV file into JSON format based on CSV headers
pip install convcsv2json
Usage
from convcsv2json import csv2json
data=csv2json(
'sample.csv', # CSV filename
intend=4, # JSON intendation
numbered=True # Set JSON data in numbered format or not
)
print(data.json()) # Print in JSON format
data.export('export.json') # Export the data into a JSON file
"intend" and "numbered" parameters are optional. By default, "intend" is set as None and "numbered" is set as False
from convcsv2json import csv2json
print(csv2json('sample.csv',4).json())
Sample CSV
name,age
kewldog,12
kewlcat,23
Generated JSON
[
{
"name": "kewldog",
"age": "12"
},
{
"name": "kewlcat",
"age": "23"
}
]
Metadata
Release files for convcsv2json 1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| convcsv2json-1.6.tar.gz | 14.4 kB | Without provenance | Details for convcsv2json-1.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| convcsv2json-1.6-py3-none-any.whl | Python 3 | none | any | Details for convcsv2json-1.6-py3-none-any.whl |
Total release size: 28.9 kB
Release files / convcsv2json-1.6.tar.gz
| Download URL | convcsv2json-1.6.tar.gz |
|---|---|
| Size | 14.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2caa2f6a7797fa80ba86d8b9f7c66978fb31459902e9ecfcb82a233a51ff0aa4
|
|
BLAKE2b-256 checksum How to use checksums |
9088a5b5bce0c6dbf137b89b74dd48a74b456541bde15ce13b4bc2046a36e750
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.6
|
Release files / convcsv2json-1.6-py3-none-any.whl
| Download URL | convcsv2json-1.6-py3-none-any.whl |
|---|---|
| Size | 14.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f75aa9a2dd9250639e7c4d3b34c92e5032ad0e5dbfdfbad01de3be23c79d7671
|
|
BLAKE2b-256 checksum How to use checksums |
c9b2d23eb7316a57c395c06fe8d638dff462e15195f842b7fb02d81fe37b8e18
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.6
|
Security for convcsv2json 1.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.