Redis-Backed Data Structures for Python
Redis-backed Python data structures that function like built-ins but store data on a Redis server, enabling shared access across distributed systems.
🚀 Features
- Drop-in Replacements: Use familiar Python data structures (
list,dict,set, etc.) with minimal changes to your code. - Redis-Powered: Data is stored on the Redis server, enabling easy sharing across processes, services, or systems.
- Seamless Integration: Works like native Python data structures while leveraging Redis for distributed use cases.
📥 Installation
Install the library using pip:
pip install py_redis_ds
💡 Usage
Here’s a quick example of how to use a Redis-backed list:
from py_redis_ds.builtins import List
from redis import Redis
redis = Redis()
# Initialize a Redis-backed list
rlist = List(name="my_shared_list", redis=redis)
# Add elements
rlist.append("Hello")
rlist.append("World")
# Access elements
print(rlist[0]) # Output: Hello
# Iterate through the list
for item in rlist:
print(item)
# Shared access in another script or service
rlist2 = List(name="my_shared_list", redis=redis)
print(rlist2[1]) # Output: World
📚 Supported Data Structures
| Data Structure | Redis-Backed Equivalent |
|---|---|
list |
py_redis_ds.builtins.List |
dict |
py_redis_ds.builtins.Dict |
set |
py_redis_ds.builtins.Set |
queue.Queue |
py_redis_ds.queue.Queue |
queue.LifoQueue |
py_redis_ds.queue.LifoQueue |
queue.PriorityQueue |
py_redis_ds.queue.PriorityQueue |
collections.deque |
py_redis_ds.collections.Deque |
collections.defaultdict |
py_redis_ds.collections.DefaultDict |
(Support for more data structures coming soon!)
🌟 Why Use Redis-Backed Structures?
- Shared State: Easily share data between processes, microservices, or distributed systems.
- Scalability: Offload data storage to Redis, reducing memory usage in individual processes.
- Simplicity: Use familiar Python syntax while leveraging Redis's power.
🤝 Contributing
Contributions are welcome! Please check out our CONTRIBUTING.md for guidelines.
📜 License
This project is licensed under the MIT License. See the LICENSE file for details.
We’re excited to see how you use Redis-Backed Data Structures! If you have any questions or feedback, feel free to open an issue or start a discussion.
Metadata
Release files for py-redis-ds 0.0.1
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 |
|---|---|---|---|---|
| py_redis_ds-0.0.1.tar.gz | 6.3 kB | With provenance | Details for py_redis_ds-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| py_redis_ds-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for py_redis_ds-0.0.1-py3-none-any.whl |
Total release size: 13.4 kB
Release files / py_redis_ds-0.0.1.tar.gz
| Download URL | py_redis_ds-0.0.1.tar.gz |
|---|---|
| Size | 6.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6e39f8ce8fc4b178221f757c1771599169c842e98195761713b0e89e8ed3e86e
|
|
BLAKE2b-256 checksum How to use checksums |
4c61301d1c9b76501beae57b2ba1116aa15b5ef11d43395ff2cf3371fee790a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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 Mar 29, 2025.
Transparency logRelease files / py_redis_ds-0.0.1-py3-none-any.whl
| Download URL | py_redis_ds-0.0.1-py3-none-any.whl |
|---|---|
| Size | 7.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6ff442c276bc11a9ffe772db1a79ad328f22b4cffb27090494c7e12a2db12a23
|
|
BLAKE2b-256 checksum How to use checksums |
5220e624ed45ad01996698ad5ad0cc18a4115d56961e0e4e3e2027e4761132c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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 Mar 29, 2025.
Transparency logSecurity for py-redis-ds 0.0.1
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.
Attestation for py_redis_ds-0.0.1.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 Mar 29, 2025.
Transparency logA 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.