https://github.com/andrewrgarcia/rlish
Saving and loading data in Python has never been easier!
https://github.com/andrewrgarcia/rlish
load pickle save save-files serialization
Last synced: 5 months ago
JSON representation
Saving and loading data in Python has never been easier!
- Host: GitHub
- URL: https://github.com/andrewrgarcia/rlish
- Owner: andrewrgarcia
- License: gpl-3.0
- Created: 2023-11-21T17:24:00.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-17T18:22:04.000Z (almost 2 years ago)
- Last Synced: 2024-11-01T02:19:00.318Z (over 1 year ago)
- Topics: load, pickle, save, save-files, serialization
- Language: Python
- Homepage: https://pypi.org/project/rlish/
- Size: 303 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README

[](https://raw.githubusercontent.com/andrewrgarcia/voxelmap/main/LICENSE)
[](https://rlish.readthedocs.io/en/latest/?badge=latest)
Saving and loading information in Python should be shorter and easier.
`rlish` is a Python package for simple and efficient data serialization and deserialization. It supports both `pickle` and `joblib` serialization methods, making it suitable for a wide range of data types, including large NumPy arrays and machine learning models.
https://github.com/andrewrgarcia/rlish/assets/10375211/0bb82ada-7974-44fe-8b04-371a948285ad
## Installation
You can install `rlish` using pip:
```bash
pip install rlish
```
## Usage
### Saving Data
To save data, use the `save` function. You can choose between `pickle` and `joblib` formats:
```python
import rlish
dictionary = {'a': 1, 'b': 2, 'c': 3}
tensor = np.random.randint(0,10,(200,200,200))
# Save dictionary using pickle
rlish.save(dictionary, 'my_dictio')
# Save data using joblib
rlish.save(tensor, 'huge_tensor', format='joblib')
```
### Loading Data
To load data, use the `load` function:
```python
# Load data saved with pickle
loaded_data_pickle = rlish.load('my_dictio')
# Load data saved with joblib
loaded_data_joblib = rlish.load('huge_tensor')
# Load your data with the format printed out (if you forgot)
loaded_data_joblib = rlish.load('huge_tensor', what_is=True)
```
## Contributing
Contributions to `rlish` are welcome! Feel free to open an issue or submit a pull request.