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.0

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.0
File Size Uploaded Provenance Actions
durability-1.0.0.tar.gz 4.2 kB With provenance Details for durability-1.0.0.tar.gz

Built distribution (wheel)

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

Total release size: 8.7 kB

Release files / durability-1.0.0.tar.gz

Download URL durability-1.0.0.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
7bc451171b0c2dc6e8600903e79bfcd9905a76ece1ec6780bb5cdc5c737897a8
BLAKE2b-256 checksum
How to use checksums
65382921560fbc1df87d505c7bfb768af934433b9b4828759eb98072e6f54fd4
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.0-py3-none-any.whl

Download URL durability-1.0.0-py3-none-any.whl
Size 4.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2ab8336ee9e28e374654ef9eaec824ae3f22a962f7833bc866375775f8c52f8a
BLAKE2b-256 checksum
How to use checksums
c4bbb1642f1cc560f77c39f1e030802dc94816d9ed9e78e26bb872aba1dd0085
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.0

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.0.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.0 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