==========================================================================================================
CHARUN - A python bridge to CouchDB
http://github.com/kr1/charun
CHARUN is a server that listens on a UDP socket for incoming json-formatted data which is transformed in python objects, manipulated and sent to a couchdb instance. Think of it as a doorman.
Intended use cases are: logging app data which has to be filtered, aggregated or otherwise tagged before being stored.
It is written in python and uses uses the twisted framework. The basic modules are:
-
charun
holds the code that handles incoming data.
-
CouchDBConnect
couchdb related code for connection and storage
-
charun_tac.py
application configuration (twisted.application) that holds all connection informations, database names.
-
dependencies
you need to have python and the twisted framework installed. furthermore, you need a couchdb instance to write to.
And if you want to run the tests you need the Mock module and the unittest2 module. -
How to run
run charun as a daemon with:
twistd -y charun_tac.py
it will log to the tmp directory and will write its pid to a file called twistd.pid to the current directory.
stop the application with:
kill `cat twistd.pid`
you can run the application in foreground with:
twistd -noy charun_tac.py
-
run the tests
nosetests will discover the tests automatically, just run:
nosetests -v
if you want more control over which tests to run:
you can run all tests by calling:
python test_director.py
you can run only unit tests:
python test_director.py unit
or only integration tests:
python test_director.py integration