https://github.com/ducin/pycached
simple key-value storage based on python/twisted
https://github.com/ducin/pycached
Last synced: about 1 year ago
JSON representation
simple key-value storage based on python/twisted
- Host: GitHub
- URL: https://github.com/ducin/pycached
- Owner: ducin
- License: mit
- Created: 2013-10-17T21:27:39.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2015-06-26T10:34:37.000Z (almost 11 years ago)
- Last Synced: 2024-12-25T11:30:09.162Z (over 1 year ago)
- Language: Python
- Size: 363 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# PyCached
PyCached is a simple key-value storage based on python/[twisted](http://twistedmatrix.com/) library.
## Commands
Following commands are provided:
| Command | Arguments | Description |
| ------------- |:-------------:| ------------:|
| version | - | returns pycached server version |
| count | - | returns number of cache entries |
| clear | - | removes all cache entries |
| items | - | returns all cache entries |
| status | - | returns pycached server status (uptime) |
| get | key | returns cache entry for a given key |
| set | key, value | sets/overwrites cache entry for a given key with a given value |
| delete | key | deletes cache entry for a given key |
## Clients
PyCached serves following clients:
* python
* PHP
* JavaScript (must run http server)
## Interactive console client
You may play with PyCached using interactive console client tool (just like you
do with python interactive shell). Simply start the service and then start the
client:
export PYTHONPATH="$PYTHONPATH:`pwd`/client/python"
./run-service 8081
./run-client localhost 8081
Then the python shell shall open with the `client` object ready to be used:
Python 2.7.2+ (default, Jul 20 2012, 22:12:53)
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> client
>>> client.version()
u'1.2'
## HTTP Access
### work in progress
PyCached is bundled with an HTTP server that connects to the main service. This
enables browser clients to send requests to the cache indirectly.
## Tests & Continuous Integration
PyCached is continuously integrated with travis:
[](https://travis-ci.org/ducin/pycached)
Automated test execution perform following steps:
* set environment variables (pycached host and port)
* run the server
* run tests (all tests rely on the same server process)
* kill the server process