Skip to content

panuph/pyfatcache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

pyfatcache: a simple python client for twitter's fatcache

See example below.

import pyfatcache

conn = pyfatcache.get_conn()   # for specific server use get_conn(host=XXXX, port=YYYY)
conn.delete("a")
print "expect (None, None) / get %s" % (str(conn.get("a")),)
conn.set("a", "a", flags=1)
print "expect ('a', 1) / get %s" % (str(conn.get("a")),)
conn.set("a", dict(name="pyfatcache"))
print "expect ({'name': 'pyfatcache'}, 0) / get %s" % (str(conn.get("a")),)
conn.set("a", None)
print "expect (None, 0) / get %s" % (str(conn.get("a")),)
conn.close()

In fact, you can run the example above via command line:

python -m pyfatcache

For detailed information, see pyfatcache.py directly.

All information about twitter's fatcache is available here

The library does not do much, as this is all that I need currently. If you need other features, please feel free to raise issues or, even better, implement them yourselves and submit pull requests, which are always welcome :-)

About

A simple python client for twitter's fatcache

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages