Skip to main content

Durability

A tiny Python persistence library.


PyPI Version

Installation

pip install durability

Why

I don't want to have to mess with state/data files. You have to read and write to them whenever you make a change, worry about different locations for them across platforms, and troubleshoot the system. This autosaves and uses the OS's existing dir for application data.

How to use

Durability provides a DataStore object that may be passed the name of your project (so that files don't conflict). It will automatically use your script/lib's name if you don't provide one.
In "normal mode" each key of a DataStore is another file, but in "simple mode" (which you can use by setting the parameter simple to True) to get an interface where each key corresponds to a value in the same file.

Here's an example of using it in simple mode:

from durability import DataStore

store = DataStore("durability-example", simple = True)

#If no existing count, set it to 0
if "count" not in store:
    store["count"] = 0

#Increment and display it
store["count"] += 1
print(store["count"])

#Automatically saves! No hassle necessary.

vs in normal mode:

from durability import DataStore

store = DataStore("durability-example")

store["config"] = {"threads": 3, "username": "abc"}
store["currentConnections"] = ["192.168.1.13", "100.90.116.124"]

Metadata

Release files for durability 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for durability 1.0.2
File Size Uploaded Provenance Actions
durability-1.0.2.tar.gz 4.3 kB With provenance Details for durability-1.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for durability 1.0.2
File Interpreter ABI Platform Actions
durability-1.0.2-py3-none-any.whl Python 3 none any Details for durability-1.0.2-py3-none-any.whl

Total release size: 8.8 kB

Release files / durability-1.0.2.tar.gz

Download URL durability-1.0.2.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
63d5cd6ff4d8aff9c382782100eac1221352899bc7d99bf05cb3d9b432da12ce
BLAKE2b-256 checksum
How to use checksums
98a15055c96c2991b47c4d73519bb8afe152b74a9a7199f6bd2d700fe1afe09f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.

Transparency log

Release files / durability-1.0.2-py3-none-any.whl

Download URL durability-1.0.2-py3-none-any.whl
Size 4.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d207b169566dca94e01baa2141b33ef370c4ee5dbf0ee427229af1984ecd2302
BLAKE2b-256 checksum
How to use checksums
031e90b08208ee95e9708cbddad8278af033ef48cdaa468b8784943f098a377e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.

Transparency log

Security for durability 1.0.2

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for durability-1.0.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page