Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aio-libs/aiomcache
Minimal asyncio memcached client
https://github.com/aio-libs/aiomcache
asyncio memcached
Last synced: 3 days ago
JSON representation
Minimal asyncio memcached client
- Host: GitHub
- URL: https://github.com/aio-libs/aiomcache
- Owner: aio-libs
- License: bsd-2-clause
- Created: 2014-02-04T06:31:22.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2024-10-21T03:29:49.000Z (14 days ago)
- Last Synced: 2024-10-21T06:37:15.401Z (14 days ago)
- Topics: asyncio, memcached
- Language: Python
- Size: 271 KB
- Stars: 141
- Watchers: 12
- Forks: 38
- Open Issues: 7
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGES.rst
- License: LICENSE
Awesome Lists containing this project
- awesome-asyncio-cn - aiomcache - 访问 Memcached 的 Asyncio(PEP 3156) 驱动库。 (数据库驱动)
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 aiomcacheasync 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`