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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

deltachat-1.108.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.8 MB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

deltachat-1.108.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (10.7 MB view details)

Uploaded PyPymanylinux: glibc 2.17+ ARM64

deltachat-1.108.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.8 MB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

deltachat-1.108.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (10.7 MB view details)

Uploaded PyPymanylinux: glibc 2.17+ ARM64

deltachat-1.108.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.8 MB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

deltachat-1.108.0-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (10.7 MB view details)

Uploaded PyPymanylinux: glibc 2.17+ ARM64

deltachat-1.108.0-cp310-cp310-musllinux_1_1_x86_64.whl (11.0 MB view details)

Uploaded CPython 3.10musllinux: musl 1.1+ x86-64

deltachat-1.108.0-cp310-cp310-musllinux_1_1_aarch64.whl (10.9 MB view details)

Uploaded CPython 3.10musllinux: musl 1.1+ ARM64

deltachat-1.108.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

deltachat-1.108.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (10.9 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64

deltachat-1.108.0-cp39-cp39-musllinux_1_1_x86_64.whl (11.0 MB view details)

Uploaded CPython 3.9musllinux: musl 1.1+ x86-64

deltachat-1.108.0-cp39-cp39-musllinux_1_1_aarch64.whl (10.9 MB view details)

Uploaded CPython 3.9musllinux: musl 1.1+ ARM64

deltachat-1.108.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.0 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

deltachat-1.108.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (10.9 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ ARM64

deltachat-1.108.0-cp38-cp38-musllinux_1_1_x86_64.whl (11.0 MB view details)

Uploaded CPython 3.8musllinux: musl 1.1+ x86-64

deltachat-1.108.0-cp38-cp38-musllinux_1_1_aarch64.whl (10.9 MB view details)

Uploaded CPython 3.8musllinux: musl 1.1+ ARM64

deltachat-1.108.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.0 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

deltachat-1.108.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (10.9 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ ARM64

deltachat-1.108.0-cp37-cp37m-musllinux_1_1_x86_64.whl (11.0 MB view details)

Uploaded CPython 3.7mmusllinux: musl 1.1+ x86-64

deltachat-1.108.0-cp37-cp37m-musllinux_1_1_aarch64.whl (10.9 MB view details)

Uploaded CPython 3.7mmusllinux: musl 1.1+ ARM64

deltachat-1.108.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.0 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64

deltachat-1.108.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (10.9 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ ARM64

File details

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

File metadata

File hashes

Hashes for deltachat-1.108.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4014dc1f7729b81565d263815007ad7dd316308abbb21498909121769edd28d9
MD5 01f5db7cf15c2dbc403f696439523235
BLAKE2b-256 d4c91c5d397ff45a5a323fbdee1fe3bd1042f0e6270e79f27f08c39f3d9fa819

See more details on using hashes here.

File details

Details for the file deltachat-1.108.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for deltachat-1.108.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 99baba05ad585c7293b26827b8f83f110aa90233a49c67721f48f41a47c51fe7
MD5 a56b1a8e4245dbbe3f45bd106f126510
BLAKE2b-256 1fef342317fb0d17ca9debc2cf980e135bc052cefd3fe6ca5eba8df965c02389

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for deltachat-1.108.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 34c3c626a8f10ec6700b8b3d1aa0495916315f0d12c7ff95e7171470af6ba8da
MD5 74066c6dc2e4fa25fd6ee31d0a1c26d3
BLAKE2b-256 6d28d2d82abc8998b784976051558caa7400f4ee9e62a785d57964220a0d90f4

See more details on using hashes here.

File details

Details for the file deltachat-1.108.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for deltachat-1.108.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 394a45c24c12baf460c29962d5066c30b4e36a7b449055e43933f0a77feecc0e
MD5 3765b8de479eea6db2491fe5d9ea5bea
BLAKE2b-256 4b7304a08a2bfaa090335f12c813caa9df7dd6c6eaf2c6bd98f9be32339b0ccb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for deltachat-1.108.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4842ca1196eda2ded96d53df7dda366c9d855489631e0e11d7080c112d120798
MD5 efed955456e9c2d464fb76140a97d377
BLAKE2b-256 2c160263dfd2857726496eedc802318917ecfedc0daebc2c5665fd108017ce41

See more details on using hashes here.

File details

Details for the file deltachat-1.108.0-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for deltachat-1.108.0-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 5a6b064ea2ff2d5fa6a346fcb9a9f646a27691129162944de0f1240e6bc61372
MD5 621d705a1c8978c3b81be73fd1c19de9
BLAKE2b-256 b508877f0fdeb51d79e239a9374b03487b50eddfd12a03c0baa5087242623538

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for deltachat-1.108.0-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 eb60be3077128a15a3be66683c1035c400c4f8f017c27c14e706528871d80d04
MD5 1e0ed0321803d2f4b78394bd9abacd1a
BLAKE2b-256 24f51a66b33d2220ecc6c02dd0b4de896b6d70781300caa2546b40d09919e9aa

See more details on using hashes here.

File details

Details for the file deltachat-1.108.0-cp310-cp310-musllinux_1_1_aarch64.whl.

File metadata

File hashes

Hashes for deltachat-1.108.0-cp310-cp310-musllinux_1_1_aarch64.whl
Algorithm Hash digest
SHA256 a7411b1383cc6fd3263344249d557db755c4c3ce035686aea557cff5358b96c4
MD5 44305c06989c7f920ee8f02e350f5155
BLAKE2b-256 5313721d620073b404519379ec71974de7be38cb7c8bd131d4f28be941a2a74f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for deltachat-1.108.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a8ee06d517be17891fee0d6a3d98e73ed21236e6179f0e489843d19f75b3dd3c
MD5 c9bf1b3e367481e7dfbe7b5d83490636
BLAKE2b-256 e68e2b091c91b706feaf0c4e7c8d95b6eccdd08ccd22a6e03883940fa680f260

See more details on using hashes here.

File details

Details for the file deltachat-1.108.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for deltachat-1.108.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 2682a2fcf799bf52bf1659ea2ee660d0d680710159ef0eb0392a87ce2ce55b4e
MD5 17ac2eab3e06e85bc54f0162e2f799fa
BLAKE2b-256 6c5cc98b4c1b9a2c5d473193a1941a33948571d60890678d606403eac7b80eb2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for deltachat-1.108.0-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 5c0e98d8c922069e010910722ece2ff8bc8521761374905832a1ac9f0e0627b6
MD5 fa6bbfe6c579c30fc30d4a89f37b16c5
BLAKE2b-256 05dd4b0cbe4654e16ade5f5bd7787eeef9d064e94f275b378f61b3b1301b2a1c

See more details on using hashes here.

File details

Details for the file deltachat-1.108.0-cp39-cp39-musllinux_1_1_aarch64.whl.

File metadata

File hashes

Hashes for deltachat-1.108.0-cp39-cp39-musllinux_1_1_aarch64.whl
Algorithm Hash digest
SHA256 cf7564a429de464c81bc34f501d6461cd696cd557d28b9f8cd352d5ff2fd6268
MD5 6d92e8b443122e8e8720daefd44a3b75
BLAKE2b-256 915df7668c7c47f5af43611dd38e2c272ffca30747307249ac5d187327858234

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for deltachat-1.108.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 88b2a0e19d663ef9b163ab48ebb6ccef70737309aa2138bb86acc4234d7408f5
MD5 bec21185a282869eac3530178210f1eb
BLAKE2b-256 106ed53e427b48005092f7c97c113a968da91caf91a2f7ae9e22c1e9b65bb71f

See more details on using hashes here.

File details

Details for the file deltachat-1.108.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for deltachat-1.108.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 537d16dcc19026b676e8513744bae1c3974b2ebeb4a8e8600b034e45ed2d64d3
MD5 221f62697a1bb48f4a492fdb245ae011
BLAKE2b-256 53b2271d2c00ffd30d3873d014615c8ed8d17db914173b5676917a8e6bf3c688

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for deltachat-1.108.0-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 631bcf120df2fa3391e48a8d5a7e2832f08dd14d417c4002c25e5628690cdffd
MD5 4e674872441744a030e2b1699e460ec4
BLAKE2b-256 606bb7cae16a12fc1a812c94c1d4024f5370b1f7d41f21213d7949c58f037051

See more details on using hashes here.

File details

Details for the file deltachat-1.108.0-cp38-cp38-musllinux_1_1_aarch64.whl.

File metadata

File hashes

Hashes for deltachat-1.108.0-cp38-cp38-musllinux_1_1_aarch64.whl
Algorithm Hash digest
SHA256 b1af0db1599e12248ec38fa76325f913743d402d334c8a4ccf615e7691d2023d
MD5 7fdee1346f0efa1322e2552d98d35b2c
BLAKE2b-256 fa282d7deff72c9c43570c35a399db627239436a52f8c4b54eaec3cb90d8bb6d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for deltachat-1.108.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3570851da633c39647567ec015737e57fc5190946bf2f8d1505a8caa55910732
MD5 7c15cbff2236da4462bc58e1ac3d3491
BLAKE2b-256 b779f359ee270c6fa7546f033fc48aa2cbd262d4ceb0c52c7ee247e0b4676dc2

See more details on using hashes here.

File details

Details for the file deltachat-1.108.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for deltachat-1.108.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 6dbcdd00a39dfae4cd042469aa5350e4f19c57a209a44a8a6ba8e44ca0cd4607
MD5 06622f752bea21830dd87f6f47a4e02c
BLAKE2b-256 0fd2adfcea1738c3806c3317c144d92a96b84cec23d2b86302199f28f48aa451

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for deltachat-1.108.0-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 05577a4bd8412403f0a7be479fcb66828453cdfbc1a69cb4858c1b14ba731daa
MD5 115e9873d6169b735a338b1959d63879
BLAKE2b-256 7e390230b14d82ab540d8f1d35c20a1e024c8885d6aa0bb9e0716111a3bbf210

See more details on using hashes here.

File details

Details for the file deltachat-1.108.0-cp37-cp37m-musllinux_1_1_aarch64.whl.

File metadata

File hashes

Hashes for deltachat-1.108.0-cp37-cp37m-musllinux_1_1_aarch64.whl
Algorithm Hash digest
SHA256 3ceb1e40399bbd7f6c940a541ef9761ffa858e564ccb26c897fe4787de84b8d0
MD5 b3f313ee78cbc8992cf2b1f80f743d04
BLAKE2b-256 80b93d128ca76b604aaa2cb84ce799d62196020ded31a67b9d0dad1f297758ce

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for deltachat-1.108.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 31e825a52d232333108554cfefedd76235db1a2d3f15b473e90075e2b386b793
MD5 ede34a65d57e798006732ee25b7394ff
BLAKE2b-256 fce3f90262fc6998a034aec47184f752aa8b889eae1c11f6189aabbc3517cbe0

See more details on using hashes here.

File details

Details for the file deltachat-1.108.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for deltachat-1.108.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 1d39fb0a3a55ab8e65f5d5b48660fcc798e2c767c0010a62858997f0c23c3c50
MD5 e8eda3409a8f85feec87a425bc838a6c
BLAKE2b-256 3c434f47112619c1250ae056a88e43db57a5aa904d6461df49e50182fb5f1b6c

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