This release is a pre-release and may not be stable for production use.
Persisted
Persisted is a two-way code/data persistence framework. It can update a variable when a watched file changes, and also save data back to the file when the variable changes.
>>> import persisted
>>> data = persisted.as_string('README.md', '')
>>> data.get()
"# Persisted\n\nPersisted is a two-way..."
>>> with data:
data.value = "Change to this"
>>> data.get()
"Change to this"
This is very useful to keep configuration files / application state synchronized within a long-running application, and also hot-reload code / modules.
Installing
$ python -m pip install persisted
Usage
There are several helper functions for you to get started:
persisted.as_bytespersisted.as_stringpersisted.as_picklepersisted.as_module(only reloading)
All of them call persisted.Persisted to create a Persisted object to interact with.
Metadata
Release files for persisted 1.0.0b2
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 |
|---|---|---|---|---|
| persisted-1.0.0b2.tar.gz | 5.0 kB | Without provenance | Details for persisted-1.0.0b2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| persisted-1.0.0b2-py3-none-any.whl | Python 3 | none | any | Details for persisted-1.0.0b2-py3-none-any.whl |
Total release size: 11.1 kB
Release files / persisted-1.0.0b2.tar.gz
| Download URL | persisted-1.0.0b2.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3fff963a6ee368602e46b3bcf00933bddc324878bc64d822be1164356a55317e
|
|
BLAKE2b-256 checksum How to use checksums |
4e63d0b55e591d7e0b139dc8103c6f8c50350d7e4aaf82f235d6f29c5d77daee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.10.3
|
Release files / persisted-1.0.0b2-py3-none-any.whl
| Download URL | persisted-1.0.0b2-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
228f43735c4b6f32f16c1a4ebb81e29641588b69963ff880243c291b0f000adb
|
|
BLAKE2b-256 checksum How to use checksums |
c9f6768ae6880e2f4ca802dcc7495cc9d07f66e4c62423847165f970771b776b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.10.3
|
Security for persisted 1.0.0b2
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.