DataCat - Data Storage System
A data storage system with catalog storage and pluggable serializers.
Features
- CatalogStorage: Manages DuckDB catalog with hashed file paths
- Serializer Interface: Pluggable serialization system
- SparseMatrixSerializer: Handles scipy sparse matrices and numpy arrays
- NumpyArraySerializer: Pure numpy arrays without pickle dependency
Installation
pip install -r requirements.txt
Usage
With Sparse Matrices
from datacat import CatalogStorage, SparseMatrixSerializer
import numpy as np
import scipy.sparse as sp
# Initialize with sparse matrix support
serializer = SparseMatrixSerializer()
storage = CatalogStorage(
catalog_columns=['dim1', 'dim2', 'date'],
serializer=serializer
)
# Save mixed data
data = {
'returns': sp.csr_matrix([[1, 2, 0], [0, 0, 3]]),
'stock_names': np.array(['AAPL', 'MSFT']),
'weights': np.array([0.5, 0.5])
}
storage.save(data, dim1="v1", dim2="v2", date="2024-01-01")
With Pure NumPy Arrays
from datacat import CatalogStorage, NumpyArraySerializer
import numpy as np
# Initialize with numpy-only support (no pickle)
serializer = NumpyArraySerializer()
storage = CatalogStorage(
catalog_columns=['experiment', 'model', 'date'],
serializer=serializer
)
# Save pure numpy data
data = {
'features': np.random.rand(100, 10).astype(np.float32),
'labels': np.array(['class_A', 'class_B'] * 50),
'timestamps': np.array(['2024-01-01', '2024-01-02'], dtype='datetime64[D]')
}
storage.save(data, experiment="classification", model="cnn", date="2024-01-01")
Metadata
Release files for datacatalog-storage 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| datacatalog_storage-1.0.0.tar.gz | 11.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| datacatalog_storage-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.1 kB
Release files / datacatalog_storage-1.0.0.tar.gz
| Download URL | datacatalog_storage-1.0.0.tar.gz |
|---|---|
| Size | 11.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
107d422ce36c2cdcbba09ddc71a6dc3c35b45829a59eb550bd559161c2da2503
|
|
BLAKE2b-256 checksum How to use checksums |
eff14081dd62e7e33aa853ef212e62e9f6c9ce788bc6f047fd5a6cd15f6dd95e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.12
|
Release files / datacatalog_storage-1.0.0-py3-none-any.whl
| Download URL | datacatalog_storage-1.0.0-py3-none-any.whl |
|---|---|
| Size | 11.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
43add7cb627d3654b97650e14ed564b07948901136b1ad1eb0d172970ab620be
|
|
BLAKE2b-256 checksum How to use checksums |
e7682ae169e4d086b1af47d332bfeb07eb5c96ae33b940bed75dbc4e5aee4f80
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.12
|