Minimal pure python tornado memcached client
Project description
Asyncmc
====================
`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 pyton3
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/tree/master/exapmles>`_
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
========
+ `Tornado <https://github.com/tornadoweb/tornado>`__
+ `Memcached <http://memcached.org/>`_
LICENSE
=======
Asyncmc is licensed under MIT.
CHANGES
=======
0.1 (10-06-2015)
----------------
- Initial release
====================
`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 pyton3
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/tree/master/exapmles>`_
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
========
+ `Tornado <https://github.com/tornadoweb/tornado>`__
+ `Memcached <http://memcached.org/>`_
LICENSE
=======
Asyncmc is licensed under MIT.
CHANGES
=======
0.1 (10-06-2015)
----------------
- Initial release