aiomcache

aiomcache

Minimal asyncio memcached client

Stars: 141

Visit
 screenshot

aiomcache is a Python library that provides an asyncio (PEP 3156) interface to work with memcached. It allows users to interact with memcached servers asynchronously, making it suitable for high-performance applications that require non-blocking I/O operations. The library offers similar functionality to other memcache clients and includes features like setting and getting values, multi-get operations, and deleting keys. Version 0.8 introduces the `FlagClient` class, which enables users to register callbacks for setting or processing flags, providing additional flexibility and customization options for working with memcached servers.

README:

memcached client for asyncio

asyncio (PEP 3156) library to work with memcached.

Getting started

The API looks very similar to the other memcache clients:

.. code:: python

import asyncio
import aiomcache

async def hello_aiomcache():
    mc = aiomcache.Client("127.0.0.1", 11211)
    await mc.set(b"some_key", b"Some value")
    value = await mc.get(b"some_key")
    print(value)
    values = await mc.multi_get(b"some_key", b"other_key")
    print(values)
    await mc.delete(b"another_key")

asyncio.run(hello_aiomcache())

Version 0.8 introduces FlagClient which allows registering callbacks to set or process flags. See examples/simple_with_flag_handler.py

For Tasks:

Click tags to check more tools for each tasks

For Jobs:

Alternative AI tools for aiomcache

Similar Open Source Tools

For similar tasks

For similar jobs