Skip to main content

A trivial, persistent, dictionary-like object, backed by SQLite.

Project description

Build Status

A trivial, persistent, dictionary-like object, backed by SQLite.


$ python install

Or just drop the file into your package.


Basic usage:

>>> from permadict import Permadict
>>> d = Permadict("db.sqlite")
>>> d["key"] = "value"
>>> print(d["key"])

As a context manager:

>>> with Permadict("db.sqlite") as d:
...     d["something"] = 1.2345
>>> with Permadict("db.sqlite") as d:
...     print(d["something"])


>>> d = Permadict("db.sqlite")
>>> for k, v in d.items():
...     print(k, v)
something 1.2345
>>> for key in d.keys():
...     print(key)

Deleting an item:

>>> del d["something"]

Clearing all items:

>>> d.clear()


Keys must be strings. Values are stored as BLOB type after being pickled, so your Python objects must be picklable.

Permadict doesn’t act entirely like a dict: some methods are missing, whether that be on purpose (as with dict.copy) or simply due to negligence.


I needed a way to share small amounts of data between processes. SQLite provides a safe way to do so. Also, why not?

Project details

Release history Release notifications

This version
History Node


History Node


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
permadict-1.0.1-py2.py3-none-any.whl (4.7 kB) Copy SHA256 hash SHA256 Wheel py2.py3 Mar 19, 2017

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page