cara: Capnproto Alternative RPC API
What is this?
This is a Python library that provides Cap'n proto as the schema layer on top of an RPC layer.
Currently, cara works with pseud, but it has been designed to work with any RPC library. If you use another one, feel free contact us to help integrate it.
Once you've installed capnproto and cara, you should be ready to go.
This script installs capnp to /usr/local/, but feel free to put it anywhere, as long as 'capnp' is on the PATH later on.
From here, we're going to assume you want to use this with pseud as the RPC layer. If you don't, then refer to your RPC layer's installation instructions.
pseud requires zeromq 4.1 or later, so install that first.
./install_zeromq41.sh export CARA_EXTRA="[pseud]"
Now you can install cara and this will build everything you need. If you're
using an extra, such as pseud, set
CARA_EXTRA to that.
pip install .$CARA_EXTRA
Using schemas with cara
Then you can define a schema in a
capnp compile -ocara filename.capnp # Outputs filename_capnp.py