Local storage: CCStorage, and simple local file string read/write: CCIO
Project description
Install
pip3 install ccstorage --upgrade --user
CCIO: Simple local file read/write
content_str = CCIO.read_string(__absolute_path__)
CCIO.save_string(content_str, __absolute_path__)
CCStorage: Local key-value storage
Concat __root_dir_path__ with __relative_file_path__ to storage key value.
When inited, storage will automatically read.
Then change keys and values, call write() to save to file.
storage = CCStorage(__root_dir_path__, __relative_file_path__)
storage['pending_work'] = True
storage['work_id'] = '123456'
storage.write()
storage = CCStorage(__root_dir_path__, __relative_file_path__)
print(storage['pending_work'], storage['work_id'])
To enable read/write at each value get/set, set force_reload_at_data_access to True:
storage.force_reload_at_data_access = True
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ccstorage-2.0.tar.gz.
File metadata
- Download URL: ccstorage-2.0.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43836735555fa163dd37a7664087da5e80837183cc7c3659935077efb1b857e5
|
|
| MD5 |
99464cf427876a50235eb43e52a6ef0a
|
|
| BLAKE2b-256 |
423371f6a29b38b3f865dca8c0f0d423fdbd66078699bab4e95851a29c28ac53
|
File details
Details for the file ccstorage-2.0-py3-none-any.whl.
File metadata
- Download URL: ccstorage-2.0-py3-none-any.whl
- Upload date:
- Size: 2.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dfb8e90f4cbe7036ee7dd53e760a15029f42be4b0c8988c9a1a1833ade8e1276
|
|
| MD5 |
0039c8952c049645cfab4a3f86b6897d
|
|
| BLAKE2b-256 |
21c379387ca57e487cce2f47192748ef8a3a8d76babbbb6cf6a53483c334df5a
|