Skip to main content

Python client for Delta Chat core JSON-RPC interface

Project description

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

  1. Build deltachat-rpc-server with cargo build -p deltachat-rpc-server.
  2. 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()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

deltachat-rpc-client-1.137.0.tar.gz (32.4 kB view hashes)

Uploaded Source

Built Distribution

deltachat_rpc_client-1.137.0-py3-none-any.whl (29.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page