readwrite - Quickly read/write file in common formats
Project description
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: |
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: |
Zip | zip |
Python's zipfile |
:heavy_check_mark: | :x: |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
readwrite-0.8.0.tar.gz
(10.7 kB
view details)
Built Distribution
readwrite-0.8.0-py3-none-any.whl
(16.7 kB
view details)
File details
Details for the file readwrite-0.8.0.tar.gz
.
File metadata
- Download URL: readwrite-0.8.0.tar.gz
- Upload date:
- Size: 10.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b976bbefd51fe4c573f10a2f849fa7f4ecaa716b941eb5892fd05eb5fa28266c |
|
MD5 | ae7c41d4f3c215d80f85643084a34c86 |
|
BLAKE2b-256 | f116a24c13842cfa7fbb33b587574243f33d956d7b6f002bf271dd4323b25e22 |
File details
Details for the file readwrite-0.8.0-py3-none-any.whl
.
File metadata
- Download URL: readwrite-0.8.0-py3-none-any.whl
- Upload date:
- Size: 16.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90c638487ade8c6128406f812ff5bb02af217f517bb6475318c68bee6d5fb16f |
|
MD5 | b38731b5e8257e98b6f060a71de275ea |
|
BLAKE2b-256 | a8253260d41199d97b00b7d37031e9297eece529958596cc61efcc1e83cf2cfc |