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

Built distribution (wheel)

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

Total release size: 9.9 kB

Release files / durability-1.1.2.tar.gz

Download URL durability-1.1.2.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
2dc31bcbc8aa5aa3783c0b60ba3ffa6fcedd9a949c10a426baf7dba57ef2d087
BLAKE2b-256 checksum
How to use checksums
abd731129030107091aafe32d019f4fedde03310f7a2e076118712bfb29760e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 22, 2026.

Transparency log

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

Download URL durability-1.1.2-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
38d6da7b342172a2181267d56dba20d19d35d33aca96bd7a60f0a2bde4b3dcb1
BLAKE2b-256 checksum
How to use checksums
d8fab635ac4c12bc6de06b5eb69c45281e1e6a8c06662f775a808778e49235c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 22, 2026.

Transparency log

Security for durability 1.1.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.1.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 Nov 22, 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.1.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