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 |
:heavy_check_mark: | :heavy_check_mark: |
| Csv | csv |
pandas |
:heavy_check_mark: | :heavy_check_mark: |
| Excel | xlsx |
pandas |
:heavy_check_mark: | :heavy_check_mark: |
| H5ad | h5ad |
scanpy |
:heavy_check_mark: | :x: |
| Joblib | joblib |
joblib |
:heavy_check_mark: | :heavy_check_mark: |
| Json | json |
Python's json |
:heavy_check_mark: | :heavy_check_mark: |
| Parquet | parquet |
pandas |
:heavy_check_mark: | :heavy_check_mark: |
| Pickle | pkl, pickle |
Python's pickle or pandas |
:heavy_check_mark: | :heavy_check_mark: |
| Toml | toml |
toml |
:heavy_check_mark: | :heavy_check_mark: |
| Tar | tar |
Python's tarfile |
:heavy_check_mark: | :x: |
| Text | txt |
Python's str |
:heavy_check_mark: | :heavy_check_mark: |
| Yaml | yml, yaml |
PyYAML |
:heavy_check_mark: | :heavy_check_mark: |
| Zarr | zarr |
SpatialData |
:heavy_check_mark: | :x: |
| Zip | zip |
Python's zipfile |
:heavy_check_mark: | :x: |
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 | |
|---|---|---|---|
| readwrite-0.10.1.tar.gz | 11.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| readwrite-0.10.1-py3-none-any.whl | Python 3 | none | any | Details |
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
|