skillfed

aiomcache

Minimal pure python memcached client

aiomcache v0.8.2 194.8K downloads/30d#9,824 on PyPI157
Permissive license BSD Active released

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 aiomcache

uv

uv add aiomcache

poetry

poetry add aiomcache

Installing 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

Environment :: Web EnvironmentFramework :: AsyncIOIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIXProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

asyncio memcached clientasync memcache librarynon-blocking memcachedaiomcache memcachedasync cache clientmemcached async operations
asynciocachingmemcached

More Database packages