Skip to content

KrySeyt/myredis-py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

myredis-py

Python client library for myredis written in C with Python wrapper. Compatible with original Redis

Why did I choose C and use workarounds for asyncio and myasync for socket operations in C? Just for practice and fun. In any case, no one but me will use this library.

Setup

  • Create venv
python -m venv .venv 
  • Activate venv
. .venv/bin/activate 
  • Install myredis-py
pip install myredis-py@git+https://github.com/KrySeyt/myredis-py.git

Example

import asyncio

from myredis import AsyncRedis

async def main() -> None:
    async with AsyncRedis(host="localhost", port=6379) as redis:
        await redis.set("foo", "bar", lifetime=1.5)
        print(await redis.get("foo"))

if __name__ == "__main__":
    asyncio.run(main())

About

Python client for MyRedis

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published