Python module for convenient storage of classes in files.
Project description
FrozenClass
This library was created in order to be able to save classes with a single line, as well as load them!
Read the docs
Example
from frozenclass import DataController
# Test class
class Test:
test_var = 10
# Init controller class
data_controller = DataController('PATH_TO_SAVE`S FOLDER')
# Save class as file
save_name = data_controller.freeze_class(Test())
# Get all saves classes models
loaded_classes = data_controller.load_save(save_name) # -> Test object
# Get var value
print(test_var.test_var) # -> 10
Installation
$ pip install frozenclass
Installation from source
Dependencies:
- poetry
$ git clone https://github.com/GigantPro/frozenclass.git; cd frozenclass-main
$ poetry run build; cd dist
$ pip install $(ls -Art | tail -n 1)
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
frozenclass-0.1.3.tar.gz
(14.9 kB
view details)
File details
Details for the file frozenclass-0.1.3.tar.gz
.
File metadata
- Download URL: frozenclass-0.1.3.tar.gz
- Upload date:
- Size: 14.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 671fa3a97abadeb9146b9c5f3d6923439fe9f5771153122690dd2af9b1f529b7 |
|
MD5 | cbfcacf1b80ae5d1af0dff0562056da5 |
|
BLAKE2b-256 | 04908a5215ea1c539d6327092b843857e7c4846579159a98a9528f12c0afdefd |