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%. Documentation is missing.

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.4.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.4.0
File Size Uploaded
diskstore-0.4.0.tar.gz 9.9 kB Details

Built distribution (wheel)

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

Total release size: 21.9 kB

Release files / diskstore-0.4.0.tar.gz

Download URL diskstore-0.4.0.tar.gz
Size 9.9 kB
Tags Source
SHA-256 checksum
How to use checksums
043977fdc1dfffa773c132eca7b5a4bf3bbc6ba89cca396cc48294e03b4f556e
BLAKE2b-256 checksum
How to use checksums
565a69364634aae0eea669ae239ebbcb49369d7d5bfd2094da009f3200cb59c7
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 13, 2026.

Transparency log

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

Download URL diskstore-0.4.0-py3-none-any.whl
Size 12.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cf65068ee18770cab4f97fb450302c01afef5c3ee858eb152245d7481c274cbd
BLAKE2b-256 checksum
How to use checksums
f7a24caa7137de74cc3349430f5fda67552c131b7ad9116e03d509e3da37e896
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 13, 2026.

Transparency log

Release history Release notifications | RSS feed

0.6.0

2 release files

0.5.0

2 release files

This release

0.4.0 This release

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