Skip to main content

DiskStore Sqlite based disk store

DiskStore is an Apache2/MIT 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

Copyright 2025-2026 Wolfgang Langner

Licensed under the Apache License, Version 2.0 (the "License") or MIT; you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0
https://mit-license.org/

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Metadata

Release files for diskstore 0.3.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 diskstore 0.3.1
File Size Uploaded
diskstore-0.3.1.tar.gz 9.1 kB Details

Built distribution (wheel)

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

Total release size: 20.0 kB

Release files / diskstore-0.3.1.tar.gz

Download URL diskstore-0.3.1.tar.gz
Size 9.1 kB
Tags Source
SHA-256 checksum
How to use checksums
0fa5d81e51844a50e17410023823082c2ec5ae381cf70f4e4ea43c9e306c75f6
BLAKE2b-256 checksum
How to use checksums
a758e3b00c88c6e8998b0c3e198c154b891288a4205e2a1d7b8daa4a2be9edf6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jul 5, 2026.

Transparency log

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

Download URL diskstore-0.3.1-py3-none-any.whl
Size 11.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0b43c93e9193b030308301258beb0e266f7409ef4e228365cae1ab3f4a87a63e
BLAKE2b-256 checksum
How to use checksums
7ff0f2eda0004811906464e8a8d29948512ba275833356e78961cb4255e8658a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jul 5, 2026.

Transparency log

Release history Release notifications | RSS feed

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

This release

0.3.1 This release

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