Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

A simple implementation of a namespaced memcached client

Project Description

Abstract

NSMemcached is simple yet efficient Python implementation of a namespaced client for memcached on top of the python-memcached package.

Quick Start

Sample usage:

>>> from nsmemcached import Client
>>> ns_client = Client(['127.0.0.1:11211'])
>>> ns_client.set('foo', 'bar', ns='barspace')
True
>>> ns_client.get('foo', ns='barspace')
bar
>>> ns_client.get('foo')
None
>>> ns_client.clear_ns('barspace')
>>> ns_client.get('foo', ns='barspace')
None

Yes, that simple.

Caveats

Namespace keys are stored in dedicated keys, so every time you request a namespaced item you’ll make two queries to the memcached server instead of one, so expect a tiny slowdown compared to the way of using the standard, non-namespaced memcached API.

Dependencies and Compatibility

NSMemcached requires the use of Python 2.4 or more recent.

Installing python-memcached package is required in order to use this library, as well as a working memcached server instance, obviously.

NSMemcached is fully compatible with the API of the standard python-memcached client.

License

This code is released under the terms of the MIT License.

Author

Nicolas Perriault, AKEI, <np at akei com>

Release History

Release History

This version
History Node

0.2.1

History Node

0.2.0

History Node

0.1.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
NSMemcached-0.2.1.tar.gz (3.1 kB) Copy SHA256 Checksum SHA256 Source May 6, 2011

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting