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
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
Built Distributions
Hashes for deltachat-1.93.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e2462ffc7fcd600bdb53286fd7febbf930b47b947d8d54af14ccef9bfcff52ce |
|
MD5 | 7ee65c07683f1b386158bf811c7eb1b8 |
|
BLAKE2b-256 | 4f9f2948e47b081125b46d659c601014e7e2852f2c2bdf04faae6341eed9ab5c |
Hashes for deltachat-1.93.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d1a3caaee953779c6ff67ebb90fd2c6e1e42a7e6f4796e629711ae50deaa35d |
|
MD5 | 7d89eca22f4767b903d0bd69bfb6bd01 |
|
BLAKE2b-256 | fda5a0f5f59c6ecdb2c86e5670df298aaefbd3bb8f6f44cfce0fbbd77aa2c8ab |
Hashes for deltachat-1.93.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29183e9757c4cc386a8437c08358547287fee764a0335ee1f71a8af43e9cc649 |
|
MD5 | f9c0b8e976e375b87c28caad8c79dfad |
|
BLAKE2b-256 | 9808a7154eac5fa8b7cadea6177921c2e6c5dcb296f88811e27d72ce9bfa34f4 |
Hashes for deltachat-1.93.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b27d8b7df1ca590e747f5f7eb59f71e7ad283c2a3e6f0db7f3192cbbc86d0658 |
|
MD5 | a6a8bcfaa593c9ea12e83c9c99fb5a65 |
|
BLAKE2b-256 | 9b462e975cca0366caf33c83dce20eab0a6635014d0f0d5e858cba95d90a80c7 |
Hashes for deltachat-1.93.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e5bb8c89cac10df6a9a17aaf939f4fe1d08f6b4685cf1aa943138c272a4cf7c |
|
MD5 | e26ef61a70fa7f0090c621c7e6f3a42d |
|
BLAKE2b-256 | d72dc96506010915f937c3a0cf46e732449375ef4f5abc422f42d021368af733 |
Hashes for deltachat-1.93.0-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | da3a8890e4c56742334bbd50ade0e59a2ae5b41463db66e7371dc5af9dcd5ff1 |
|
MD5 | 9a2d22d6bb38bb4cbd0dbae7c84f9e81 |
|
BLAKE2b-256 | 2df0e85298d73a036a42edd0e93c5009f81a8b365cdf5bfe7dcf5b2d9a430449 |
Hashes for deltachat-1.93.0-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b82e1d335fb5371eaece8fcca8b3ced52e8b8f8f85fdacd7613147e5b01cb4a |
|
MD5 | 3ef8866061894ac2ec849d63a160818b |
|
BLAKE2b-256 | 2c3949b56d641e0ae41857f790b6c3fd757832fe407e307ab8724bbfd220ef9b |
Hashes for deltachat-1.93.0-cp310-cp310-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0195d413e9615a8d59459d5eb231376e087a8f2c729ca1e823b332f342a1be94 |
|
MD5 | 5d937228d2f9b76b71d87ad12e08215c |
|
BLAKE2b-256 | 93ab1995cca512ebc85332cba7d40b568d25e2bcec5afd093cd0def64b6bed61 |
Hashes for deltachat-1.93.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a9cd95acc4b9d17c287db12f8568565a41fe3a2d225e06665caf96dcc2d4c938 |
|
MD5 | 6bb448311a2fff1d23a6c0c721a3c7c2 |
|
BLAKE2b-256 | a472e1912fcc827b5b0852dfb738e7a2a42a0c65878bee406e8b0d88e397a18b |
Hashes for deltachat-1.93.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bccf0fc40298f2cacd954f0272163312e47d951dae5c7246d66754a77cd22f55 |
|
MD5 | 0b6d8925e8d7a6f24f99688294b3e40a |
|
BLAKE2b-256 | 18b9d5b4bdeb75903159cae6836fa444ff717a970f8e948321cc3f11eccd9e58 |
Hashes for deltachat-1.93.0-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dff9ecf123d99e4d7630156676bbb9bfde0b97189444e5d534e1f96a92dc16ec |
|
MD5 | 5912d981d846e61292028bb651fcb012 |
|
BLAKE2b-256 | 2838e71f69a61d323bf52ece7c25976707a133eb043898bb6821c01f28094dd5 |
Hashes for deltachat-1.93.0-cp39-cp39-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3caa043af3b1d353c1614efc29ea250bc7449e7f2dd6fbcde0b883b058c48b90 |
|
MD5 | fc93828a700af39e6f3c97771d606139 |
|
BLAKE2b-256 | 5fd9651725da9c0c66a6c817731361c6e94bb5f38876342f1fb53a9ce8677ee3 |
Hashes for deltachat-1.93.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2941931f6a5dceaf99700d59b45a5a67b1acfe51db11b6b2daef0a35fd4880d3 |
|
MD5 | 756bef7861a6b1f47568a5f9f235adbb |
|
BLAKE2b-256 | 08d27a06f2a87eb4b30b45d793167db306051742535644307f583e43b2bee3fe |
Hashes for deltachat-1.93.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | daf0ff18a83e449b69a85110d2c449e98cca5e16d0f4b9ac7e6d0c2a6ca632ae |
|
MD5 | 9a6c7ab23c91f1c79f093895f0aae96a |
|
BLAKE2b-256 | 3e1a5240d03039bff9cb689561ccd3ba4cd7b83882cc2156487a86fd9e2da9d2 |
Hashes for deltachat-1.93.0-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3e239143b4437b957b305df815a828faeef9b6acb23db1569f246cdc01ff2ee |
|
MD5 | bdc77445954f696a2087d1fcd8a3d537 |
|
BLAKE2b-256 | 3604833543f6032b0f61a229a2c5090f22d55b448ff7fe737908a520619bd48d |
Hashes for deltachat-1.93.0-cp38-cp38-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28b0064853d4ba2e837b611c64cd47458b306cc41c343019da0095889940df55 |
|
MD5 | 5d7a6b51c32b8600f5eae80d58f75bb8 |
|
BLAKE2b-256 | 0b6ad3b795250f1c9f64b45fcb1b8db019a70bced9edfb4e2cba7e8c759385b6 |
Hashes for deltachat-1.93.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d8b0fa11272172d1258c6585c468b5e4fd5aefee950790bc511e95f0be5641a |
|
MD5 | 4098fa241849e002529e024bef36413d |
|
BLAKE2b-256 | a27e777799a13b1a1eabf046e23a550b443d4fbb7b590b760f7e77349c0e2397 |
Hashes for deltachat-1.93.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76c159831d96b8d2239d6267115b55fce8a6abe261d012dc1f1fac3fda5f39ee |
|
MD5 | 213ac7b2b1f0066cd32b1353ff6805ad |
|
BLAKE2b-256 | dce96611444774a74ae92dc0a206db067b8ae89c9befca0534d32d62384dd94f |
Hashes for deltachat-1.93.0-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3165acb2b6119153655fc83e70ec6353d064905213e04a1d19a1da96536007df |
|
MD5 | d8701a2f86137e31c242c2c68ef04ca8 |
|
BLAKE2b-256 | 53ee6419acfe2493e18a7acdf7af0fc9f73ed0b3de51573aeca850d7f6f9030f |
Hashes for deltachat-1.93.0-cp37-cp37m-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56eed1c704548c446d6edc77cd1066c2b8426b9e53eb64ddad407dfbcff73869 |
|
MD5 | e4e7a5b1f89089e1280ba2a5723c7d41 |
|
BLAKE2b-256 | 684f2d7cd7832681778f8f7c82f1ebe0e45a99dd117d64d363ae7cf60a43ad17 |
Hashes for deltachat-1.93.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63850cb3734961f24b5eced221d95af3829bbd9c51c1dd0538779223edafaa7f |
|
MD5 | bed731f69fbc73dddb55b6ead2c5d2c8 |
|
BLAKE2b-256 | 5a0a64cf991f2e712d102f609d34cde548905d09392b7fb2e5ce7da8413271f5 |
Hashes for deltachat-1.93.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 292bebf5fe07485fb88bf254f70c84ea42488d134e9b10eed5248afc9defa1a2 |
|
MD5 | 66087f449091d4445e6cdd35c58c9c27 |
|
BLAKE2b-256 | 575c73c6dcd0abc8c9fe6232519d19b45026111a6300a57650029798671fd55d |