A simple redis-like in pure python3, fully asyncio compliant
Project description
redys
A simple redis-like in pure python3, fully asyncio/thread/process compliant !
features
- asyncio compliant
- client Sync (Client) & Async (AClient)
- very quick
classics
commands : get/set/delete/keys & incr/decrsets
commands : sadd/sremqueue
commands : rpush/lpush/rpop/lpoppubsub
commands : subscribe/unsubscribe/get_event & publishcache
commands : setexping
command ;-)- exchange everything that is pickable (except None)
- raise real python exception in client side
- minimal code size
- works well on GAE Standard (2nd generation/py37)
- unittests are autonomous (it runs a server)
- just in-memory !
why ?
Redis is great, but overbloated for my needs. Redys is simple, you can start the server side in an asyncio loop, and clients can interact with a simple in-memory db. Really useful when clients are in async/threads/process(workers)/multi-hosts world, to share a unique source of truth.
nb
- The sync client (
Client
) use threads, so it can't live in the same loop as the server (Server
). It's better to use it in another thread or process. - The async client (
AClient
) can live in the same loop as the server (Server
), but don't forget to await each methods (which are coroutines in async version) - Not fully/concurrency tested. Use at own risk ;-)
- See tests for examples
BTW, I use it in production for one year : and no problems at all !!!! (it works as excepted)
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
redys-0.9.6.tar.gz
(4.2 kB
view hashes)
Built Distribution
Close
Hashes for redys-0.9.6-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 466e38fd850093d44ed363786a4cf9f63ea38c6614fcf132cc83c36b28c6b0e7 |
|
MD5 | ea769329f53de63a8219a05d19294553 |
|
BLAKE2b-256 | a4b12885ccfe2a3efe312c1f9f4f807e5c9aae848374f58f20a31cf0f04ae09c |