Original code by Ken Robertson. Significant contributions by Jonathan Stoppani. This version being maintained by Tyler Neylon at: https://github.com/tylerneylon/python-ernie
Python-Ernie is a port of the Ruby-based Ernie server by Tom Preston-Werner. Python-Ernie is the Python server implementation for the BERT-RPC specification.
See the full BERT-RPC specification at bert-rpc.org.
To install Python-Ernie, you will also need to install the Python port of BERT serializers and Erlastic.
$ git clone git://github.com/samuel/python-erlastic.git $ cd python-erlastic $ sudo python setup.py install $ git clone git://github.com/samuel/python-bert.git $ cd python-bert $ sudo python setup.py install
To install python-ernie itself, git clone this repo and run this from the python-ernie directory:
$ sudo python setup.py install
from ernie import mod, start def calc_add(a, b): return a + b mod('calc').fun('add', calc_add) if __name__ == "__main__": start()
If you'd like to hack on Python-Ernie, start by forking my repo on GitHub:
Just create your own fork, hack on it, and then send me a pull request once done.
- Update exception handling to return traceback
- Ensure correct handling around read operations
- See if I can clean up the way you define your modules
Copyright (c) 2009 Ken Robert
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.