unibox provides unified interface for common file operations
Project description
unibox
unibox provides unified interface for common file operations
Installation
pip install unibox
With uv:
uv tool install unibox
If you're not using python 3.13, it's also recommended to install pandas[performance]:
pip install "pandas[performance]"
to update or remove project dependencies:
uv add requests
uv remove requests
# after adding new package: rerun
make setup
Usage
import the lib:
import unibox as ub
Using Huggingface Backend
you can load and use a huggingface dataset directly with hf://{username}/{daataset_repo}:
hf_dset = ub.loads("hf://incantor/aesthetic_eagle_5category_iter99")
df = hf_dset.to_pandas()
and upload a processed dataframe back to huggingface:
df["new_col"] = "new changes"
ub.saves(df, "hf://datatmp/updated_repo")
Dev notes
current concerns:
- loads(): temp files could accumulate on global dir, and take up all of /tmp/; also concurrency issues
- s3_backend: only one that takes a dir; should make others do the same
to get a coverage report, run:
pytest --cov=src/unibox --cov-report=term-missing tests
To build the docs:
make docs host=0.0.0.0
# or in debug mode:
make check-docs
to manual make a release:
migrating from unibox 0.4
no longer supported:
ub.traverses(): removed handlers andexclude_extensions(include_extensionsstill works but depreciated withexts)
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file unibox-0.5.2.tar.gz.
File metadata
- Download URL: unibox-0.5.2.tar.gz
- Upload date:
- Size: 155.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d5c8048dd9048b2f3ad14e17972b478002a0ffae7fd517242d95d50b04a50be3
|
|
| MD5 |
516f6a96cfa726341c311c04747ee297
|
|
| BLAKE2b-256 |
b1f51fe100ef205e69c6d3cb53b6bc81ebe5735b4e26d6cdef96e3c300740e9e
|
File details
Details for the file unibox-0.5.2-py3-none-any.whl.
File metadata
- Download URL: unibox-0.5.2-py3-none-any.whl
- Upload date:
- Size: 33.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e8b9c327de2edca7d2fb0022cfe0ad7ae2e1f954700dfb2775ddab68c4ec016d
|
|
| MD5 |
c91d02f3f8755d6f2fa54b09579b92b8
|
|
| BLAKE2b-256 |
9ce14ca2a6b300af022aae7ee27fa52ebb0538d61861eb15eaf85f127572f5d3
|