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. rpc.start() performs a health-check RPC call to verify the server started successfully and will raise an error if startup fails (e.g. if the accounts directory could not be used).

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. Install tox pip install -U tox
  3. Run CHATMAIL_DOMAIN=ci-chatmail.testrun.org PATH="../target/debug:$PATH" tox.

Additional arguments to tox are passed to pytest, e.g. tox -- -s does not capture test output.

Activating current checkout of deltachat-rpc-client and -server for development

Go to root repository directory and run:

$ scripts/make-rpc-testenv.sh 
$ source venv/bin/activate 

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


Release history Release notifications | RSS feed

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-2.51.0.tar.gz (57.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

deltachat_rpc_client-2.51.0-py3-none-any.whl (36.6 kB view details)

Uploaded Python 3

File details

Details for the file deltachat_rpc_client-2.51.0.tar.gz.

File metadata

  • Download URL: deltachat_rpc_client-2.51.0.tar.gz
  • Upload date:
  • Size: 57.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for deltachat_rpc_client-2.51.0.tar.gz
Algorithm Hash digest
SHA256 e904b4a5bec3a95578594f037d0eaf4409f1b9e5ea0be8ef4bcdba917c51e6f3
MD5 2296f64dcb9eab731faa227ed8cf18f1
BLAKE2b-256 c7022d32269b35e5d4c912f71a074dca01ab378c5071c700743b1f9c4c7a220f

See more details on using hashes here.

Provenance

The following attestation bundles were made for deltachat_rpc_client-2.51.0.tar.gz:

Publisher: publish-deltachat-rpc-client-pypi.yml on chatmail/core

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file deltachat_rpc_client-2.51.0-py3-none-any.whl.

File metadata

File hashes

Hashes for deltachat_rpc_client-2.51.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aa67faf7efc2f28d65714f0b7181804c61f95cd65d4819f44604d8b2a162c0c1
MD5 3da5d4a8c282bf7e89e42c72328da786
BLAKE2b-256 044749e1b07bb5a608cb9ebac5d5bd933f608f0c51d06674a50b6b1432cd6b65

See more details on using hashes here.

Provenance

The following attestation bundles were made for deltachat_rpc_client-2.51.0-py3-none-any.whl:

Publisher: publish-deltachat-rpc-client-pypi.yml on chatmail/core

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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