Skip to main content

DiskStore Sqlite based disk store

DiskStore is a BSD-3-Clause licensed disk storage library, written in pure Python.

Inspired by DiskCache library it implements a MutableMapping compatible sqlite based disk storage. Easy interface and very fast. Keys can be of basic sqlite storage classes defined by Python types int, float, str, bytes. Values can be of basic sqlite type or with custom configuration.

Features

  • Pure-Python
  • nearly 100% test coverage
  • Performance matters
  • Thread-safe and process-safe
  • Developed on Python 3.10
  • Tested on CPython 3.10, 3.11, 3.12, 3.13, 3.14, 3.15
  • Tested using GitHub Actions

Quickstart

Installing DiskStore:

$ uv pip install diskstore

or

$ uv add diskstore

There are three basic storage classes available. DiskStore, DiskRead and DiskCache.

User Guide

Work in progress, look at unit tests for examples.

Example:

from diskstore import DiskStore

ds = DiskStore("/tmp/diskstore.db")
ds["key"] = "my value"
print(ds["key"])

Everything is mostly stable and test coverage is nearly 100%. See the docs/ directory for the user guide and API reference.

Timings

These are rough measurements. Compared to Diskcache library.

Diskstore library:

set: 28.8 µs get: 3.23 µs set/delete: 84 µs

Diskcache library:

set: 196 µs get: 15.5 µs set/delete: 535 µs

Why is the Diskstore library faster than others. Every overhead is eliminitated and it uses the faster sqlite library apsw with up to date sqlite library version.

License

DiskStore is distributed under the terms of the BSD-3-Clause license.

Copyright 2025-2026 Wolfgang Langner

Metadata

Release files for diskstore 0.5.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 diskstore 0.5.0
File Size Uploaded
diskstore-0.5.0.tar.gz 10.8 kB Details

Built distribution (wheel)

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

Total release size: 23.7 kB

Release files / diskstore-0.5.0.tar.gz

Download URL diskstore-0.5.0.tar.gz
Size 10.8 kB
Tags Source
SHA-256 checksum
How to use checksums
3b9605f2cf572d21a9e98ac91da8e9a8f8cffbfee89b164f20360de7012d33b2
BLAKE2b-256 checksum
How to use checksums
cd363b8083ed05f9ae2d6303636e0366008e35c64b498034504d7b1d17c06bc0
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 Sep 20, 2026.

Transparency log

Release files / diskstore-0.5.0-py3-none-any.whl

Download URL diskstore-0.5.0-py3-none-any.whl
Size 12.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
359a5905a0caf3151a8d23d59d015dd6fe8bde67553ad6da448c7cd1921b8e74
BLAKE2b-256 checksum
How to use checksums
2952a83bb258efa6510bf083e607321415ca1ac8d75bc2b26a264d4bf0e19969
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 Sep 20, 2026.

Transparency log

Release history Release notifications | RSS feed

0.6.0

2 release files

This release

0.5.0 This release

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

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