An extensible key-value store backend for Django applications.
This module provides an abstraction layer for accessing a key-value storage.
Configuring your key-value store is a matter of adding a statement in this form to your Django settings module:
KEY_VALUE_STORE_BACKEND = 'scheme://store?parameters'
Where scheme is one of the following, persistent stores:
db (local table accessed through Django’s database connection)
googleappengine (Google AppEngine data store)
sdb (Amazon SimpleDB)
tokyotyrant (Tokyo Tyrant)
And some non-persistent stores, provided mainly for testing purposes:
locmem
memcached
store and parameters varies from one backend to another. Refer to the documentation included in each backend implementation for further details.
You can define a django_kvstore-backed custom model, in a fashion similar to Django models (although it does not support querying, except by primary key lookup).
Here’s an example of a custom model class using django_kvstore:
from django_kvstore import models
class MyData(models.Model):
my_key = models.Field(pk=True)
foo = models.Field()
bar = models.Field()
Typical usage for such a model:
key = "something_unique"
data = MyData.get(key)
if data is None:
data = MyData(my_key=key)
data.foo = "foo"
data.bar = "bar"
data.save()
and deletion:
key = "something_unique"
data = MyData.get(key)
if data is not None:
data.delete()
Metadata
Release files for django-kvstore 1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-kvstore-1.0.tar.gz | 7.1 kB | Without provenance | Details for django-kvstore-1.0.tar.gz |
Release files / django-kvstore-1.0.tar.gz
| Download URL | django-kvstore-1.0.tar.gz |
|---|---|
| Size | 7.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
285a43b3868ff3b906d28453af4d4488722a2981b83625c2516e202597773fa0
|
|
BLAKE2b-256 checksum How to use checksums |
dc30692e6fb6a0acc0d452393910fa38138b221ec6a5582e5264233df516cc40
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-kvstore 1.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.