Skip to content

Repository files navigation

Quickly read and write file based on their extension.

PyTest

Install

python3 -m pip install --upgrade readwrite

CLI Usage

readf [FILE-PATHS...]

or

readfile <EXTENSION> [EXTENSION-SPECIFIC-OPTIONS] [FILE-PATHS...]

Code Usage

importreadwriteasrw# will use pandas.read_csv(...)df=rw.read("data.csv")
# will use pandas.to_parquet(...)rw.write(df, "data.parquet")

Supported Extensions

HandlerExtensionsBackendReadWrite
BinarybinPython's bytes✔️✔️
Csvcsvpandas✔️✔️
Excelxlsxpandas✔️✔️
H5adh5adscanpy✔️
Joblibjoblibjoblib✔️✔️
JsonjsonPython's json✔️✔️
Parquetparquetpandas✔️✔️
Picklepkl, picklePython's pickle or pandas✔️✔️
Tomltomltoml✔️✔️
TartarPython's tarfile✔️
TexttxtPython's str✔️✔️
Yamlyml, yamlPyYAML✔️✔️
ZarrzarrSpatialData✔️
ZipzipPython's zipfile✔️

About

No description, website, or topics provided.

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages