IOutil
To read and write files.
csv, json, parquet, text, toml formats is supported.
Installation
pip install -U ioutil
Usage
usage: ioutil [options]
optional arguments:
-h, --help show this help message and exit
-v, --version show version number and exit.
to read/write files:
path path to read/write
-r, --read to read file
-w, --write to write file
-d, --data data to write
-f, --format file format to use
-m, --mode mode to open file
--rfv will return formatted string (CSV only)
-w/--write function may return error as it expects data in specific datatype.
Writing files using commandline isn't recommended.
Python Script
To read/write csv file.
from ioutil import csv
data = [['a', 'b'], [1, 2], [3, 4]]
path = '.../file.csv'
csv.write(data=data, path=path) # to write csv
csv.read(path=path) # to read csv
from ioutil import File
data = [{'a': 1, 'b': 2}, {'a': 3, 'b': 4}]
path = '.../file.csv'
File.write(data=data, path=path) # to write file
File.read(path=path) # to read file
Command Line (not recommended)
To write a text file.
$ ioutil ".../file.txt" --data "data" --write
True
To read a json file.
$ ioutil ".../file.json" --read
### content of a file ###
Issues:
If you encounter any problems, please file an issue along with a detailed description.
Metadata
Release files for ioutil 1.0.3
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 |
|---|---|---|---|---|
| ioutil-1.0.3.tar.gz | 9.3 kB | Without provenance | Details for ioutil-1.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ioutil-1.0.3-py3-none-any.whl | Python 3 | none | any | Details for ioutil-1.0.3-py3-none-any.whl |
Total release size: 20.8 kB
Release files / ioutil-1.0.3.tar.gz
| Download URL | ioutil-1.0.3.tar.gz |
|---|---|
| Size | 9.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
871e1edad0a7edfd757517d32832650dd5f44d872fe14a1b6f56e4c55fc589fe
|
|
BLAKE2b-256 checksum How to use checksums |
0b8cae81cbb66af64b662b7ceedf6130846b28c0ddde808ff844ff25a9025932
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.10
|
Release files / ioutil-1.0.3-py3-none-any.whl
| Download URL | ioutil-1.0.3-py3-none-any.whl |
|---|---|
| Size | 11.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4a9740abc586f9a8de0fc7106a0d2c9002640afca946b24587add67674da8822
|
|
BLAKE2b-256 checksum How to use checksums |
9936357e61faf8c26584bc7203afad8fc09ca26a98ffd825ff6519fe81871d1f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.10
|
Security for ioutil 1.0.3
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.