Skip to main content

Valkey cache backend for Django

Pypi Python versions docs downloads/month Published on Django Packages

Introduction

django-valkey is a BSD licensed, full featured Valkey cache and session backend for Django.

this project is a fork of the wonderful django-redis project. they wrote all the good codes.

Why use django-valkey?

  • Valkey is a free licenced and well maintained key/value database

  • Uses native valkey-py url notation connection strings

  • async support

  • Pluggable clients

  • Pluggable parsers

  • Pluggable serializers

  • Primary/secondary support in the default client

  • Comprehensive test suite

  • Used in production in several projects as cache and session storage

  • Supports infinite timeouts

  • Facilities for raw access to Valkey client/connection pool

  • Highly configurable (can emulate memcached exception behavior, for example)

  • Unix sockets supported by default

Requirements

User guide

Documentation

check out our Docs for a complete explanation

Installation

Install with pip:

python -m pip install django-valkey

Install with c bindings:

python -m pip install django-valkey[libvalkey]

Install 3rd party compression

python -m pip install django-valkey[lz4]
python -m pip install django-valkey[zstd]  # not needed since python 3.14
python -m pip install django-valkey[brotli]

Install with 3rd party serializers

python -m pip install django-valkey[msgpack]
python -m pip install django-valkey[msgspec]

Contribution

contribution rules are like other projects,being respectful and keeping the ethics. also make an issue before going through troubles of coding, someone might already be doing what you want to do.

Todo

  1. Fix the CI in cluster branch.

  2. Add cluster to documentations.

License

Copyright (v) 2024 Amirreza Sohrabi far
Copyright (c) 2011-2016 Andrey Antukh <niwi@niwi.nz>
Copyright (c) 2011 Sean Bleier

All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
   notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
   notice, this list of conditions and the following disclaimer in the
   documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
   derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS`` AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Metadata

Release files for django-valkey 0.5.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 django-valkey 0.5.0
File Size Uploaded Provenance Actions
django_valkey-0.5.0.tar.gz 91.1 kB With provenance Details for django_valkey-0.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-valkey 0.5.0
File Interpreter ABI Platform Actions
django_valkey-0.5.0-py3-none-any.whl Python 3 none any Details for django_valkey-0.5.0-py3-none-any.whl

Total release size: 142.8 kB

Release files / django_valkey-0.5.0.tar.gz

Download URL django_valkey-0.5.0.tar.gz
Size 91.1 kB
Tags Source
SHA-256 checksum
How to use checksums
fdd1983be15a04b93c34b3b1c473b559b1b94ce7b95d3db2760f121b80e38ee1
BLAKE2b-256 checksum
How to use checksums
b5c42dc225b4123caa428bb644f80067920e6b8e9bf2cc3a83ee1f104cf3872b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 9, 2026.

Transparency log

Release files / django_valkey-0.5.0-py3-none-any.whl

Download URL django_valkey-0.5.0-py3-none-any.whl
Size 51.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bf91682e5cd733960aecc72421272513c12ce8efc4aa9c70bd8994540ea28f6b
BLAKE2b-256 checksum
How to use checksums
9e194982b373e57135919353d1305820fd6b5e14dc56b3d278cc16a5e947fb47
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 9, 2026.

Transparency log

Security for django-valkey 0.5.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for django_valkey-0.5.0.tar.gz

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 Nov 9, 2026.

Transparency log

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.

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