Documentation Overview
Welcome to the flaskJSONRPCServer 0.9.2 documentation.
flaskJSONRPCServer was started as a simple, powerful and highload-ready JSON-RPC server. Main goals is power functionality, ability for serving many WSGI-apps and servers in one program, defence from dead-connections (in some cases clients don't correctly closes connections and this causes to locked file-descriptors) and high perfomance.
How to install ¶
With pip
Latest stable build can be simply installed with pip.
pip install flaskJSONRPCServer
Manually
- Download the most recent tarball from the download page.
- Unpack the tarball.
- Run
python setup.py install
.
Note that the last command will automatically download and install setuptools if you don’t already have it installed. This requires a working Internet connection.
This will install flaskJSONRPCServer into your Python installation’s site-packages directory.
Installing the development version
- Install Git
- Run
git clone git://github.com/byaka/flaskJSONRPCServer.git
- Run
cd flaskJSONRPCServer
- Run
pip install --editable
.
Gevent
For production use strongly recommendet to install gevent backend and switch all servers to use it by passing <gevent>
to constructor.
server=server=flaskJSONRPCServer(["127.0.0.1", "8080"], gevent=True)
Quick start ¶
Start using flaskJSONRPCServer is really simple!
First of all, you need ability to send json-rpc requests to server. You can do it with different ways, for example:
- Using special library (like jsonrpclib) and Python Interpreter.
- Send request via cURL in correct format
- Any another way.
After this you can simply run one of examples, included to package.
python -m flaskJSONRPCServer -x simple.py
And send first request (for example {"jsonrpc": "2.0", "method": "echo", "params": ['Hello world!'], "id": 1}
).
Sources of all included examples can be finded here.