mirror of
https://github.com/chatmail/core.git
synced 2026-04-28 10:56:29 +03:00
Four new APIs `add_transport_from_qr()`, `add_transport()`, `list_transports()`, `delete_transport()`, as described in the draft at "API". The `add_tranport*()` APIs automatically stops and starts I/O; for `configure()` the stopping and starting is done in the JsonRPC bindings, which is not where things like this should be done I think, the bindings should just translate the APIs. This also completely disables AEAP for now. I won't be available for a week, but if you want to merge this already, feel free to just commit all review suggestions and squash-merge.
Delta Chat RPC python client
RPC client connects to standalone Delta Chat RPC server deltachat-rpc-server
and provides asynchronous interface to it.
Getting started
To use Delta Chat RPC client, first build a deltachat-rpc-server with cargo build -p deltachat-rpc-server
or download a prebuilt release.
Install it anywhere in your PATH.
Create a virtual environment if you don't have one already and activate it.
$ python -m venv env
$ . env/bin/activate
Install deltachat-rpc-client from source:
$ cd deltachat-rpc-client
$ pip install .
Testing
- Build
deltachat-rpc-serverwithcargo build -p deltachat-rpc-server. - Install tox
pip install -U tox - Run
CHATMAIL_DOMAIN=nine.testrun.org PATH="../target/debug:$PATH" tox.
Additional arguments to tox are passed to pytest, e.g. tox -- -s does not capture test output.
Using in REPL
Setup a development environment:
$ tox --devenv env
$ . env/bin/activate
$ python
>>> from deltachat_rpc_client import *
>>> rpc = Rpc()
>>> rpc.start()
>>> dc = DeltaChat(rpc)
>>> system_info = dc.get_system_info()
>>> system_info["level"]
'awesome'
>>> rpc.close()