Minimalist API for redis
Project description
tinyredis
Experimental minimalist API for redis
pip install tinyredis
Sample
import redis
from tinyredis import TinyRedis
from dataclasses import dataclass
@dataclass
class Todo: id:int; title:str; done:bool=False
todos = TinyRedis(redis.from_url(YOUR_URL), Todo)
todo = todos.insert(Todo(1, "Create README example"))
# or: todo = todos.insert(title="Create README example")
# if you don't pass `id`, a uuid4 id will be created for you
print(todos()) # Prints all todos
todo.done = True
todos.update(todo)
print(todos[todo.id])
todos.delete(todo.id)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tinyredis-0.0.2.tar.gz
(7.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
tinyredis-0.0.2-py3-none-any.whl
(10.3 kB
view details)
File details
Details for the file tinyredis-0.0.2.tar.gz.
File metadata
- Download URL: tinyredis-0.0.2.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c4e2ac545e8a8b4302d02daca7283e2d1f9a645e957d94272d4c9418366f8e97
|
|
| MD5 |
0b7e771e42790572c66b260aa08ca6b4
|
|
| BLAKE2b-256 |
d2d8bc664b459aa8b1df75c00c91733bb7c5e1b49f6b6dc4b309035febd30039
|
File details
Details for the file tinyredis-0.0.2-py3-none-any.whl.
File metadata
- Download URL: tinyredis-0.0.2-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a16a7eaea28c615e4313503d345175ec5174b222aa2123b4db876a45f2cfd16
|
|
| MD5 |
fdf042b7949f2f46cc93cece83709ca4
|
|
| BLAKE2b-256 |
404491fadb81c2bf5ddf63bcd05f07b3e2b9abe46667cd906460d6aa6c869071
|