python-binary-memcached
A pure python module to access memcached via its binary protocol with SASL auth support
What it is and what it does
python-binary-memcached is a pure Python client for memcached that communicates using the binary protocol rather than the text protocol. It supports SASL authentication, making it suitable for hosted memcached services like Heroku that require credentials. The library is thread-safe and offers both a standard client for single-server or replicated setups and a DistributedClient that uses consistent hashing to distribute keys across multiple memcached servers.
The package depends on six and uhashring for consistent hashing when using the distributed client. It has been actively maintained since 2011, with recent updates adding TLS support and protocol argument exposure. The library is classified as Beta and supports Python 3.8, 3.9, 3.10, 3.11, 3.12.
Use it for:
- Connect to Heroku memcached or other SASL-authenticated memcached services from Python applications.
- Distribute cached data across multiple memcached servers using consistent hashing to minimize cache invalidation on server changes.
- Secure memcached connections with TLS encryption in production environments.
- Replace text-protocol memcached clients when binary protocol features or authentication are required.
- Build thread-safe caching layers in multi-threaded Python applications.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A pure Python client library for accessing memcached using the binary protocol with SASL authentication support, including distributed key hashing and TLS encryption.
Yes. The package is actively maintained, has no known vulnerabilities, installs with minimal friction, and solves a specific problem—binary protocol access with authentication—that text-protocol clients do not. It is suitable for production use, particularly when integrating with hosted memcached services that require SASL authentication.
Install
python-binary-memcached on PyPI
pip
pip install python-binary-memcacheduv
uv add python-binary-memcachedpoetry
poetry add python-binary-memcachedInstalling python-binary-memcached
Before you install
Low friction: pure Python wheel with only two runtime dependencies (six and uhashring). Active maintenance with a recent release on 2026-04-28 and continuous repository activity.
License in practice
Permissive license allows commercial and private use without restriction or attribution requirement.
Quickstart
pip install python-binary-memcached
import bmemcached
client = bmemcached.Client(('127.0.0.1:11211',), 'user', 'password')
client.set('key', 'value')
print(client.get('key'))
Requires a running memcached server accessible at the specified host and port.
Verify before relying
- Whether the package supports Python versions beyond 3.8, 3.9, 3.10, 3.11, 3.12.
- Performance characteristics compared to other memcached clients for high-throughput scenarios.
- Thread safety guarantees and behavior under concurrent access patterns.
Package facts
| License | not declared (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — six, uhashring |
| Maintenance | actively maintained — 108 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 154,757/month — #10,845 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: python_binary_memcached-0.32.0-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
python-memcachedPure Python client library for connecting to…
permissive · top 5,000 on PyPI
aiomcacheAsyncio-based memcached client providing…
permissive · top 15,000 on PyPI
pymemcacheA pure-Python memcached client implementing the…
permissive · top 5,000 on PyPI
pure-saslpure-sasl is a pure Python client-side SASL…
permissive · top 5,000 on PyPI
google-cloud-memcacheA Python client library for creating and…
permissive · top 1,000 on PyPI
pylibmcpylibmc is a Python client for memcached, the…
permissive · top 15,000 on PyPI
pure-transportProvides a Thrift transport for PyHive…
permissive · top 15,000 on PyPI
django-cache-urlConfigures Django cache backends from…
permissive · top 15,000 on PyPI
scrampScramp implements the SCRAM authentication…
permissive · top 1,000 on PyPI
archspecArchspec provides APIs to detect, query, and…
permissive · top 15,000 on PyPI