aiomcache
Minimal pure python memcached client
What it is and what it does
aiomcache is a pure Python memcached client built for asyncio, enabling non-blocking cache operations in async Python applications. It provides a familiar API for standard memcached commands—get, set, delete, multi_get—while supporting modern async/await syntax. The library includes a FlagClient variant for applications that need to register callbacks to process or set memcached flags, useful when cache values carry metadata.
The package targets Python 3.8 and later, depends only on typing-extensions, and is distributed as a wheel with low installation friction. It is actively maintained, has no known vulnerabilities, and works across Linux, macOS, and Windows. Most use cases involve integrating memcached caching into async web frameworks or services where blocking I/O would degrade performance.
Use it for:
- Cache frequently accessed data in async web applications to reduce database queries.
- Implement session storage in async HTTP services using memcached as a distributed backend.
- Batch retrieve multiple cache keys in parallel within async request handlers.
- Use FlagClient to store and retrieve structured data with metadata flags in memcached.
- Build async task queues or rate-limiting systems backed by memcached counters.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Asyncio-based memcached client providing non-blocking get, set, delete, and multi-get operations with optional flag handling for callback-based value processing.
Yes. The package is actively maintained, has no security vulnerabilities, installs with minimal friction, and fills a clear niche for async Python applications needing memcached integration. The BSD license is permissive. Install it if your async application needs non-blocking cache access; skip it only if you don't use asyncio or don't need memcached.
Install
aiomcache on PyPI
pip
pip install aiomcacheuv
uv add aiomcachepoetry
poetry add aiomcacheInstalling aiomcache
Before you install
Low friction: pure Python wheel with a single runtime dependency (typing-extensions). Actively maintained with recent commits and no known vulnerabilities.
License in practice
BSD permissive license allows commercial and private use with minimal restrictions.
Quickstart
import asyncio
import aiomcache
async def example():
mc = aiomcache.Client("127.0.0.1", 11211)
await mc.set(b"key", b"value")
value = await mc.get(b"key")
print(value)
asyncio.run(example())
Requires a running memcached server (default localhost:11211).
Verify before relying
- Performance characteristics compared to synchronous memcache clients or other async alternatives.
- Whether FlagClient's callback mechanism is suitable for high-throughput scenarios.
- TLS support details and any additional conn_args configuration options available.
Package facts
| License | BSD (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — typing-extensions |
| Maintenance | actively maintained — 829 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 194,807/month — #9,824 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: aiomcache-0.8.2-py3-none-any.whl
Tags
More Database packages
psycopg2-binary is a PostgreSQL database…
copyleft · top 1,000 on PyPI
redisPython client library for connecting to and…
permissive · top 1,000 on PyPI
ydbYDB Python SDK is the official client library…
permissive · top 1,000 on PyPI
snowflake-connector-pythonConnects Python applications to Snowflake data…
permissive · top 1,000 on PyPI
sqlparsesqlparse tokenizes SQL text into a tree of…
permissive · top 1,000 on PyPI
dbt-adaptersProvides base adapter protocols and shared…
permissive · top 1,000 on PyPI
aiocacheProvides asyncio-compatible caching with…
unclear · top 5,000 on PyPI
google-cloud-memcacheA Python client library for creating and…
permissive · top 1,000 on PyPI
pymemcacheA pure-Python memcached client implementing the…
permissive · top 5,000 on PyPI
python-memcachedPure Python client library for connecting to…
permissive · top 5,000 on PyPI
pylibmcpylibmc is a Python client for memcached, the…
permissive · top 15,000 on PyPI
gcloud-aio-storageProvides an asyncio-based Python client for…
permissive · top 1,000 on PyPI
aiotoolsaiotools provides idiomatic asyncio utilities…
permissive · top 15,000 on PyPI
fastapi-cache2Caches FastAPI endpoint and function results…
permissive · top 5,000 on PyPI
gcloud-aio-bigqueryProvides an asyncio-based Python client for…
permissive · top 1,000 on PyPI