Skip to content

luizalabs/asyncmc

 
 

Repository files navigation

Asyncmc

image

Asyncmc is a memcached client for Tornado web framework. Asyncmc work with python 2.7 and python 3

Hello, Memcached

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

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

Installation

To install asyncmc, simply:

$ pip install asyncmc

LICENSE

Asyncmc is licensed under MIT.

About

Async Memcached client for Tornado

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.3%
  • Makefile 0.7%