Quickly read and write file based on their extension.
Install
python3 -m pip install --upgrade readwrite
CLI Usage
readf [FILE-PATHS...]
or
readfile <EXTENSION> [EXTENSION-SPECIFIC-OPTIONS] [FILE-PATHS...]
Code Usage
import readwrite as rw
# will use pandas.read_csv(...)
df = rw.read("data.csv")
# will use pandas.to_parquet(...)
rw.write(df, "data.parquet")
Supported Extensions
| Handler | Extensions | Backend | Read | Write |
|---|---|---|---|---|
| Binary | bin |
Python's bytes |
✔️ | ✔️ |
| Csv | csv |
pandas |
✔️ | ✔️ |
| Excel | xlsx |
pandas |
✔️ | ✔️ |
| H5ad | h5ad |
scanpy |
✔️ | ❌ |
| Joblib | joblib |
joblib |
✔️ | ✔️ |
| Json | json |
Python's json |
✔️ | ✔️ |
| Parquet | parquet |
pandas |
✔️ | ✔️ |
| Pickle | pkl, pickle |
Python's pickle or pandas |
✔️ | ✔️ |
| Toml | toml |
toml |
✔️ | ✔️ |
| Tar | tar |
Python's tarfile |
✔️ | ❌ |
| Text | txt |
Python's str |
✔️ | ✔️ |
| Yaml | yml, yaml |
PyYAML |
✔️ | ✔️ |
| Zarr | zarr |
SpatialData |
✔️ | ❌ |
| Zip | zip |
Python's zipfile |
✔️ | ❌ |
Metadata
Release files for readwrite 0.10.1
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 |
|---|---|---|---|---|
| readwrite-0.10.1.tar.gz | 11.2 kB | Without provenance | Details for readwrite-0.10.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| readwrite-0.10.1-py3-none-any.whl | Python 3 | none | any | Details for readwrite-0.10.1-py3-none-any.whl |
Total release size: 28.7 kB
Release files / readwrite-0.10.1.tar.gz
| Download URL | readwrite-0.10.1.tar.gz |
|---|---|
| Size | 11.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1c5963de3dd27055db3bcd5b391843dc39065b80775fc186922fa4167e5ceed7
|
|
BLAKE2b-256 checksum How to use checksums |
de10d2d73790c094f0ce81ecaed4522363ddf6dd759d4e3c69a205e4b96792a7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
Release files / readwrite-0.10.1-py3-none-any.whl
| Download URL | readwrite-0.10.1-py3-none-any.whl |
|---|---|
| Size | 17.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
322ff8be9a2bd75b331b512df5cb63e9853aeebf7541f3360d44053bd38ae4e3
|
|
BLAKE2b-256 checksum How to use checksums |
19923d99d2d518c0b97aca704baebb973827d4e5cb88fc448652b8e16ddb7e6e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
Security for readwrite 0.10.1
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.