Skip to main content

Minimal pure python tornado memcached client

Project description

# Asyncmc

![Build state](https://travis-ci.org/ErDmKo/asyncmc.svg?branch=master)

[Asyncmc](https://github.com/ErDmKo/asyncmc) is a memcached client for [Tornado](https://github.com/tornadoweb/tornado) web framework.
Asyncmc work with python 2.7 and python 3

## Quick links

* [Source (github)](https://github.com/ErDmKo/asyncmc)

* [License](https://raw.githubusercontent.com/ErDmKo/asyncmc/master/LICENSE.txt)

* [Examples](https://github.com/ErDmKo/asyncmc/blob/master/examples)

## Hello, Memcached

Here is a simple "Hello, Memcached" example for Tornado with Memcached

```python

import tornado.ioloop
from tornado import gen
import asyncmc

loop = tornado.ioloop.IOLoop.instance()

@gen.coroutine
def out():
mc = asyncmc.Client(servers=['localhost:11211'], loop=loop)
yield mc.set(b"some_key", b"Some value")
value = yield mc.get(b"some_key")
print(value)
values = yield mc.multi_get(b"some_key", b"other_key")
print(values)
yield mc.delete(b"another_key")

loop.run_sync(out)
```

## Requires

+ [Tornado](https://github.com/tornadoweb/tornado)
+ [Memcached](http://memcached.org/)

## Installation

To install asyncmc, simply:

```bash

$ pip install asyncmc

```

# LICENSE

Asyncmc is licensed under MIT.

Project details


Download files

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

Source Distribution

asyncmc-0.6.7.tar.gz (12.2 kB view details)

Uploaded Source

File details

Details for the file asyncmc-0.6.7.tar.gz.

File metadata

  • Download URL: asyncmc-0.6.7.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for asyncmc-0.6.7.tar.gz
Algorithm Hash digest
SHA256 905c28f65b3ebc7e96133ac3984e81bacc1a654857db16f3e9981d01ebb4523c
MD5 92ae52e48ec4cefd873ac3107e7fdd2e
BLAKE2b-256 7b07d88f6d5b924a8af7bbf0f0f4ea765097e8d3ac6fbc44d9db25a3297675b6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page