Skip to main content

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 !

on pypi/redys

features

  • asyncio compliant
  • client Sync (Client) & Async (AClient)
  • 100% tested on all platforms ("3.7", "3.8", "3.9", "3.10", "3.11" on ubuntu-latest, macos-latest, windows-latest) NEW
  • very quick
  • classics commands : get/set/delete/keys & incr/decr
  • sets commands : sadd/srem
  • queue commands : rpush/lpush/rpop/lpop
  • pubsub commands : subscribe/unsubscribe/get_event & publish
  • cache commands : setex
  • ping() command ;-)
  • KILL() command (so a client can kill the server) NEW
  • 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)
  • 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 since 2018: and no problems at all !!!! (it works as excepted)

Project details


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.11.tar.gz (8.0 kB view hashes)

Uploaded Source

Built Distribution

redys-0.9.11-py3-none-any.whl (9.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page