Using MySQL and memcached with Python
The Python memcache module interfaces to memcached servers, and is written in pure Python (that is,
without using one of the C APIs). You can download and install a copy from Python Memcached.
To install, download the package and then run the Python installer:
python setup.py install
running install
running bdist_egg
running egg_info
creating python_memcached.egg-info
...
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing python_memcached-1.43-py2.4.egg
creating /usr/lib64/python2.4/site-packages/python_memcached-1.43-py2.4.egg
Extracting python_memcached-1.43-py2.4.egg to /usr/lib64/python2.4/site-packages
Adding python-memcached 1.43 to easy-install.pth file
Installed /usr/lib64/python2.4/site-packages/python_memcached-1.43-py2.4.egg
Processing dependencies for python-memcached==1.43
Finished processing dependencies for python-memcached==1.43
Once installed, the memcache module provides a class-based interface to your memcached servers.
When you store Python data structures as memcached items, they are automatically serialized (turned
into string values) using the Python cPickle or pickle modules.
To create a new memcache interface, import the memcache module and create a new instance of the
memcache.Client class. For example, if the memcached daemon is running on localhost using the
default port
... zobacz całą notatkę
Komentarze użytkowników (0)