mirror of
https://github.com/chatmail/core.git
synced 2026-04-05 23:22:11 +03:00
* import python, try to adapt for rust * add missing wrapper functions * - try to write up how to build python bindings - strike some unused functions from deltachat.h * adjustments to make tox work * try to run circle-ci with python build * don't do docs * running cargo test as well * don't run cargo test anymore, that's done in other ci jobs * also build docs * don't run doxygen anymore * subst C with Rust * a try to get better wheels Closes #41
39 lines
1.0 KiB
ReStructuredText
39 lines
1.0 KiB
ReStructuredText
|
|
|
|
examples
|
|
========
|
|
|
|
|
|
Playing around on the commandline
|
|
----------------------------------
|
|
|
|
Once you have :doc:`installed deltachat bindings <install>`
|
|
you can start playing from the python interpreter commandline::
|
|
|
|
For example you can type ``python`` and then::
|
|
|
|
# instantiate and configure deltachat account
|
|
import deltachat
|
|
ac = deltachat.Account("/tmp/db")
|
|
|
|
# start configuration activity and smtp/imap threads
|
|
ac.start_threads()
|
|
ac.configure(addr="test2@hq5.merlinux.eu", mail_pw="********")
|
|
|
|
# create a contact and send a message
|
|
contact = ac.create_contact("someother@email.address")
|
|
chat = ac.create_chat_by_contact(contact)
|
|
chat.send_text_message("hi from the python interpreter command line")
|
|
|
|
Checkout our :doc:`api` for the various high-level things you can do
|
|
to send/receive messages, create contacts and chats.
|
|
|
|
|
|
Looking at a real example
|
|
-------------------------
|
|
|
|
The `deltabot repository <https://github.com/deltachat/deltabot#deltachat-example-bot>`_
|
|
contains a real-life example of Python bindings usage.
|
|
|
|
|