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 drop in replacement for python-memcached that uses ultramemcache

Project Description
Travis test status: [![Build Status](https://travis-ci.org/nicholasserra/python-ultramemcached.svg?branch=master)](https://travis-ci.org/nicholasserra/python-ultramemcached)

#Overview
A drop in replacement for python-memcached to use [ultramemcache](https://github.com/esnme/ultramemcache) as an interface instead of python sockets. Requires ultramemcache. Usage is the same as [python-memcached](http://www.tummy.com/Community/software/python-memcached/) .

#Installation
Install via pip.
```
pip install python-ultramemcached
```

#Usage
```python
import ultramemcache
mc = ultramemcache.Client(['127.0.0.1:11211'], debug=0)

mc.set("some_key", "Some value")
value = mc.get("some_key")

mc.set("another_key", 3)
mc.delete("another_key")

mc.set("key", "1") # note that the key used for incr/decr must be a string.
mc.incr("key")
mc.decr("key")
````

#Usage with Django
To use this package with Django, implement your own subclass of Django's `BaseMemcachedCache` backend like this:

```python
from django.core.cache.backends.memcached import BaseMemcachedCache

class UltraMemcachedCache(BaseMemcachedCache):
"An implementation of a cache binding using python-ultramemcached"
def __init__(self, server, params):
import ultramemcache
super(MemcachedCache, self).__init__(server, params,
library=ultramemcache,
value_not_found_exception=ValueError)
```
Release History

Release History

This version
History Node

0.0.4

History Node

0.0.3

History Node

0.0.2

History Node

0.0.1

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
python-ultramemcached-0.0.4.tar.gz (12.2 kB) Copy SHA256 Checksum SHA256 Source Aug 4, 2014

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