Unibox is a tool that aims to provide a unified interface for various common daily operations
Project description
unibox
unibox provides unified interface for common file operations.
Features
The package is designed to be running with python 3.10, but targets 3.8+ for compatibility:
CLI:
unibox resize <dir>
: resizes a directory of images using eitherpillow
orlibvips
- customizable size / quality / encoding (png / webp / jpeg)
unibox copy <dir>
: an awscli-like tool for copying files with certain suffix to a new dir, keeping the same directory structure.- bypasses windows explorer so it's much faster.
unibox move <dir>
: likecopy
, but moves instead
utils:
UniLogger
: uniformed logger class (logger = unibox.UniLogger()
, and uselogger.info(...)
)UniLoader
: uniformed data loader class (unibox.loads(<filename>)
)UniSaver
: uniformed data saver class (unibox.saves(<data>, <filename>)
)UniTraverser
: uniformed directory traverser class, with callbacks in multiple stagesUniResizer
: uniformed image resizer class, with callbacks in multiple stages
callables:
unibox.traverses(dir, include, exclude, relative_unix)
: traverse a directory using specified exclude / include extensions, and return a list of filesunibox.loads(filepath)
: load arbitrary data from a file into suitable formats, with automatic detection of file type- supported formats: see UniLoader class implementation
unibox.saves(data, filepath)
: saves arbitrary data to a file, with automatic detection of file type
Install
install from pypi:
pip install unibox
build from source:
git clone https://github.com/trojblue/unibox
# pip install poetry
poetry install
poetry build
pip install dist/unibox-<version number>.whl
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
unibox-0.3.8.tar.gz
(18.7 kB
view details)
Built Distribution
unibox-0.3.8-py3-none-any.whl
(23.7 kB
view details)
File details
Details for the file unibox-0.3.8.tar.gz
.
File metadata
- Download URL: unibox-0.3.8.tar.gz
- Upload date:
- Size: 18.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e6d1c4517022473736e68fcbb89d1192927e7c1dae9a2b1ba496d4244c867b2 |
|
MD5 | 1610c0df2cab2df2bf5b9e3f8b5eecbc |
|
BLAKE2b-256 | 38a620ecc74acb691c4bc6332804ca3d9591c1792d7596a8a57c04ed844b6af4 |
File details
Details for the file unibox-0.3.8-py3-none-any.whl
.
File metadata
- Download URL: unibox-0.3.8-py3-none-any.whl
- Upload date:
- Size: 23.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c28cbe96905e98da82e90820584737509496927f08662d69b3a837f581bae11c |
|
MD5 | 5283ae71775f1096ff6c5770bc7934f1 |
|
BLAKE2b-256 | c70923fe6efba76985d432e932398d1133c2c58b1552d5258fe437684c763ca3 |