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

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

Built distribution (wheel)

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

Total release size: 8.7 kB

Release files / durability-1.0.1.tar.gz

Download URL durability-1.0.1.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
398f935d6e5f764d2d0b6e922e6d9829a419dee1ba209a0e05f50f10c69a2bff
BLAKE2b-256 checksum
How to use checksums
48587af296963d67792136560be18cb47b0c6bc1966a0eaa3d391a40336477d1
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.1-py3-none-any.whl

Download URL durability-1.0.1-py3-none-any.whl
Size 4.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9693bcd2d4c6590713121efe981c926e37119ffd5d1e34181115f640aae15818
BLAKE2b-256 checksum
How to use checksums
1dce6542d9a2a7247802554ff3367b46dd5ba0c743357529d4a8fc56aaec5ca2
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.1

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