Skip to main content

Python bindings for the Delta Chat Core library using CFFI against the Rust-implemented libdeltachat

Project description

This package provides Python bindings to the deltachat-core library which implements IMAP/SMTP/MIME/OpenPGP e-mail standards and offers a low-level Chat/Contact/Message API to user interfaces and bots.

Installing pre-built packages (Linux-only)

If you have a Linux system you may try to install the deltachat binary “wheel” packages without any “build-from-source” steps. Otherwise you need to compile the Delta Chat bindings yourself.

We recommend to first install virtualenv, then create a fresh Python virtual environment and activate it in your shell:

virtualenv env  # or: python -m venv
source env/bin/activate

Afterwards, invoking python or pip install only modifies files in your env directory and leaves your system installation alone.

For Linux we build wheels for all releases and push them to a python package index. To install the latest release:

pip install deltachat

To verify it worked:

python -c "import deltachat"

Running tests

Recommended way to run tests is using tox. After successful binding installation you can install tox and run the tests:

pip install tox
tox -e py3

This will run all “offline” tests and skip all functional end-to-end tests that require accounts on real e-mail servers.

Running “live” tests with temporary accounts

If you want to run live functional tests you can set DCC_NEW_TMP_EMAIL to a URL that creates e-mail accounts. Most developers use https://testrun.org URLs created and managed by mailadm.

Please feel free to contact us through a github issue or by e-mail and we’ll send you a URL that you can then use for functional tests like this:

export DCC_NEW_TMP_EMAIL=<URL you got from us>

With this account-creation setting, pytest runs create ephemeral e-mail accounts on the http://testrun.org server. These accounts exists only for one hour and then are removed completely. One hour is enough to invoke pytest and run all offline and online tests:

tox -e py3

Each test run creates new accounts.

Installing bindings from source

Install Rust and Cargo first. The easiest is probably to use rustup.

Bootstrap Rust and Cargo by using rustup:

curl https://sh.rustup.rs -sSf | sh

Then clone the deltachat-core-rust repo:

git clone https://github.com/deltachat/deltachat-core-rust
cd deltachat-core-rust

To install the Delta Chat Python bindings make sure you have Python3 installed. E.g. on Debian-based systems apt install python3 python3-pip python3-venv should give you a usable python installation.

Ensure you are in the deltachat-core-rust/python directory, create the virtual environment with dependencies using tox and activate it in your shell:

cd python
tox --devenv env
source env/bin/activate

You should now be able to build the python bindings using the supplied script:

python3 install_python_bindings.py

The core compilation and bindings building might take a while, depending on the speed of your machine.

Building manylinux based wheels

Building portable manylinux wheels which come with libdeltachat.so can be done with Docker or Podman.

If you want to build your own wheels, build container image first:

$ cd deltachat-core-rust # cd to deltachat-core-rust working tree
$ docker build -t deltachat/coredeps scripts/coredeps

This will use the scripts/coredeps/Dockerfile to build container image called deltachat/coredeps. You can afterwards find it with:

$ docker images

This docker image can be used to run tests and build Python wheels for all interpreters:

$ docker run -e DCC_NEW_TMP_EMAIL \
   --rm -it -v $(pwd):/mnt -w /mnt \
   deltachat/coredeps scripts/run_all.sh

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

Uploaded Source

Built Distributions

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

deltachat-1.96.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.2 MB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

deltachat-1.96.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.2 MB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

deltachat-1.96.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.2 MB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

deltachat-1.96.0-cp310-cp310-musllinux_1_1_x86_64.whl (10.5 MB view details)

Uploaded CPython 3.10musllinux: musl 1.1+ x86-64

deltachat-1.96.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.4 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

deltachat-1.96.0-cp39-cp39-musllinux_1_1_x86_64.whl (10.5 MB view details)

Uploaded CPython 3.9musllinux: musl 1.1+ x86-64

deltachat-1.96.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.4 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

deltachat-1.96.0-cp38-cp38-musllinux_1_1_x86_64.whl (10.5 MB view details)

Uploaded CPython 3.8musllinux: musl 1.1+ x86-64

deltachat-1.96.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.4 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

deltachat-1.96.0-cp37-cp37m-musllinux_1_1_x86_64.whl (10.5 MB view details)

Uploaded CPython 3.7mmusllinux: musl 1.1+ x86-64

deltachat-1.96.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.4 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64

File details

Details for the file deltachat-1.96.0.tar.gz.

File metadata

  • Download URL: deltachat-1.96.0.tar.gz
  • Upload date:
  • Size: 118.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: devpi-server/6.7.0 (py3.8.11; linux)

File hashes

Hashes for deltachat-1.96.0.tar.gz
Algorithm Hash digest
SHA256 a5065b98c70ac8a31268957517fa6d4a991e8701c2d63e1a99171c0010252980
MD5 d755728e0f757c74f13fb27543fcd5bb
BLAKE2b-256 1d1c638c47a36a0e9cee6508680f22e5a20dd83e2ad6e4334ca27e3e6f40abfd

See more details on using hashes here.

File details

Details for the file deltachat-1.96.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for deltachat-1.96.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a2abc930d8ed97826b0ac054b8a84d354f76985ff6644d36f01631bc5b0daff6
MD5 dafe751a2c67e6a113a497ed6c706f19
BLAKE2b-256 eba8d465d241dd47bdee7decdfc3888f6515300887298676cc262b6eb4b46cfe

See more details on using hashes here.

File details

Details for the file deltachat-1.96.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for deltachat-1.96.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bc8808dd6b220a77a5deb388157bce46ea66a2d60d058f9d1484998f391dff73
MD5 4b9d95a16ca63cafda7e9de425bec8e1
BLAKE2b-256 888da7538b0e2029649dff7fdbab675825955722c987177b24a439cff4860d23

See more details on using hashes here.

File details

Details for the file deltachat-1.96.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for deltachat-1.96.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1b825bcf406b5ccd8b492bdf013c738b08cec87a4f58bcdac14e75a9639613e5
MD5 f3861188aff3a4101f5222b9bdc626cc
BLAKE2b-256 4cb13e2a4f0e20e1d2b02f31b9ea85a35d5ae117613ad931e41d9d5892ff47ac

See more details on using hashes here.

File details

Details for the file deltachat-1.96.0-cp310-cp310-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for deltachat-1.96.0-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 acf9dfc4c25d69ac15a6570388bae1b0b53fded1b1ffa475fe19bedc330f5b47
MD5 5d864a23f62ee9d11b69d505f2146b3c
BLAKE2b-256 9418f143c0e3de0dbcef71c774c3a7267b2e617cb760183c2e78085670a7d4b7

See more details on using hashes here.

File details

Details for the file deltachat-1.96.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for deltachat-1.96.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 784dde4d2034ad055305545475e2cfd456e8c98ea11ed246dc4d85f22aafe26e
MD5 8c5a7651e55493011cb294c581ca0dac
BLAKE2b-256 fe5cdad045560bf75c7d1261565d007b9fe812a9a895631e716a1aacaf079bfd

See more details on using hashes here.

File details

Details for the file deltachat-1.96.0-cp39-cp39-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for deltachat-1.96.0-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 f4f8ee8c8831596d53803c9f0af787e3bd5b9ce0c631687c09994a8f89205a38
MD5 e97e7d2aa84dc216beedc2fd1df00495
BLAKE2b-256 9b76c21eb1007a2b658a77d8e48fa64244168429d768ad52e715106af64da790

See more details on using hashes here.

File details

Details for the file deltachat-1.96.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for deltachat-1.96.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 01a5cc8f876a45956f060378184704e8be2820644466ba75785194bdf61f52c0
MD5 35c068dcf25b71f73704e768b0bd9fb6
BLAKE2b-256 6343366c1b9e2a920fb4c3ff3f3e827df39aad4bde2a2b56385162606f42be81

See more details on using hashes here.

File details

Details for the file deltachat-1.96.0-cp38-cp38-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for deltachat-1.96.0-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 20d34859dd41269a9935b98add128844d3a41729389c2eeefedf8f896df44b58
MD5 ba8a16977a3638d52b5e550aca4edaeb
BLAKE2b-256 cb3e0d05eee254636847ad1afe93f1c50fa7366e1efbba4357e1b447b891b3fd

See more details on using hashes here.

File details

Details for the file deltachat-1.96.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for deltachat-1.96.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2f79a0cb79e38db96ff0968551c30bc576ca945868fc0af1a64a73b079655d5a
MD5 aaeb473c42abdddc2557f4ed71bfaf5b
BLAKE2b-256 ae7608fac84b44296a880d11a76f28c27af2fa814216c744d9ced5aea2dba3f1

See more details on using hashes here.

File details

Details for the file deltachat-1.96.0-cp37-cp37m-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for deltachat-1.96.0-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 e2f68c6f10cb2732693675d3092eade1d721de58579d86ed7c0b1e4bb867ca3d
MD5 4c9ed3f22eb33477268b1a51ac479177
BLAKE2b-256 cb8a42a7df4d63a05cde38666aa7ddadb08a0201057cae7f1f384eb7afbae820

See more details on using hashes here.

File details

Details for the file deltachat-1.96.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for deltachat-1.96.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 db1e81f5b70fc84bd861a7d4d56e2be38b6114ecc03afa254c02039d2b47e6af
MD5 cdb4b0861740e0538ce37366a2581fbe
BLAKE2b-256 2aa4f2cda7be519de0328f86c0242cf3469a1c9e4653933d0c56b0bdf6e8e59c

See more details on using hashes here.

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