You can read the introductory blog post or try it live at https://shrynk.ai
Features
- ✓ Compress your data smartly based on Machine Learning
- ✓ Takes User Requirements in the form of weights for
size,write_timeandread_time - ✓ Trains & caches a model based on compression methods available in the system, using packaged data
- ✓ CLI for compressing and decompressing
- ✓ Works with
CSV,JSONandBytesin general
CLI
shrynk compress myfile.json # will yield e.g. myfile.json.gz or myfile.json.bz2
shrynk decompress myfile.json.gz # will yield myfile.json
shrynk compress myfile.csv --size 0 --write 1 --read 0
shrynk benchmark myfile.csv # shows benchmark results
shrynk benchmark --predict myfile.csv # will also show the current prediction
shrynk benchmark --save --predict myfile.csv # will add the result to the training data too
Usage
Installation:
pip install shrynk
Then in Python:
import pandas as pd
from shrynk import save, load
# save dataframe compressed
my_df = pd.DataFrame({"a": [1]})
file_path = save(my_df, "mypath.csv")
# e.g. mypath.csv.bz2
# load compressed file
loaded_df = load(file_path)
If you just want the prediction, you can also:
import pandas as pd
from shrynk import infer
infer(pd.DataFrame({"a": [1]}))
# {"engine": "csv", "compression": "bz2"}
Add your own data
If you want more control you can do the following:
import pandas as pd
from shrynk import PandasCompressor
df = pd.DataFrame({"a": [1, 2, 3]})
pdc = PandasCompressor("default")
pdc.run_benchmarks(df) # adds data to the default
pdc.train_model(size=3, write=1, read=1)
pdc.predict(df)
Metadata
Release files for shrynk 0.2.25
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| shrynk-0.2.25.tar.gz | 2.9 MB | Without provenance | Details for shrynk-0.2.25.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| shrynk-0.2.25-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for shrynk-0.2.25-py2.py3-none-any.whl |
Total release size: 7.3 MB
Release files / shrynk-0.2.25.tar.gz
| Download URL | shrynk-0.2.25.tar.gz |
|---|---|
| Size | 2.9 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0bdf6cb92b88d132baea8c45c58defece17152aa52dac45d55b3251e85466c6d
|
|
BLAKE2b-256 checksum How to use checksums |
f1c51ec8a657e7858dd0f98e02e80ed148e5fff25abd6c442f9684996a9680c3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.7.0a0
|
Release files / shrynk-0.2.25-py2.py3-none-any.whl
| Download URL | shrynk-0.2.25-py2.py3-none-any.whl |
|---|---|
| Size | 4.5 MB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
036f1e8a3d383e581ab03f84099bb4963e37422bafa999f6a54befc321aa5792
|
|
BLAKE2b-256 checksum How to use checksums |
ade06e7705989faea1ccc9b6129bf940d68926ba3d95ad50f97a88e4c42b9a02
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.7.0a0
|
Security for shrynk 0.2.25
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.