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, supproting dataclasses, structtype, pydantic, ...

Features

  • Pure-Python
  • nearly 100% test coverage
  • Performance matters
  • Thread-safe and process-safe
  • Developed on Python 3.15
  • Tested on CPython 3.10, 3.11, 3.12, 3.13, 3.14, 3.15
  • Optional performance improved implementation bases on apsw.

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"])

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. Overhead is eliminated and operations where optimized. If APSW is installed (pip install diskstore[apsw]) it is used automatically for furhter performance improvements.

License

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

Copyright 2025-2026 Wolfgang Langner

Metadata

Release files for diskstore 0.6.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.6.0
File Size Uploaded
diskstore-0.6.0.tar.gz 15.9 kB Details

Built distribution (wheel)

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

Total release size: 35.8 kB

Release files / diskstore-0.6.0.tar.gz

Download URL diskstore-0.6.0.tar.gz
Size 15.9 kB
Tags Source
SHA-256 checksum
How to use checksums
6ea69fa2f27e816a4a44235f1179e788c8b2cd7e7888b86bd81ad015ef9d4549
BLAKE2b-256 checksum
How to use checksums
96a0a0dae8accbee23090851da2105a32a4fbea16a72ccf73c2befdb18b24380
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 1, 2026.

Transparency log

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

Download URL diskstore-0.6.0-py3-none-any.whl
Size 19.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
18737c54406f9a9391eaf76903a58281aa501c9e92ecc6558d50a8c48ccd096d
BLAKE2b-256 checksum
How to use checksums
5ac2b4648f16c1d91119a829586ca105f0584a6c38552a332a36c8d59d95a4c4
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 1, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.6.0 This release

2 release files

0.5.0

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