diff options
| author | Anton Khirnov <anton@khirnov.net> | 2023-10-19 11:54:07 +0200 |
|---|---|---|
| committer | Anton Khirnov <anton@khirnov.net> | 2023-10-19 11:54:07 +0200 |
| commit | 493f6d76e5f5010cce0b00eb1877de705db19a12 (patch) | |
| tree | 75f1c44b38281882a5166bd8d05c1789b3034632 | |
| parent | e839d326595281884e5f1359e3a72d1b657e8989 (diff) | |
bindings: update for the new Python bindings
| -rw-r--r-- | bindings.mdwn | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/bindings.mdwn b/bindings.mdwn index 8871028..9288c0a 100644 --- a/bindings.mdwn +++ b/bindings.mdwn @@ -19,20 +19,19 @@ The Notmuch command-line interface is based on the C library. Notmuch includes Python bindings to the Notmuch shared library. Please refer to the nice and extensive [Notmuch Python API -documentation](http://notmuch.readthedocs.org/projects/notmuch-python/). +documentation](https://notmuchmail.org/doc/latest/python-bindings.html). The bindings are very simple to use. As an example, given you have the Python bindings installed (or simply set your PYTHONPATH environment variable to point to the .../bindings/python directory), this snippet will produce a list of mails matching the given expression: - >>> import notmuch - >>> db = notmuch.Database() - >>> query = db.create_query('tag:inbox AND NOT tag:killed') - >>> list(query.search_messages()) # doctest:+ELLIPSIS + >>> from notmuch2 import Database + >>> db = Database() + >>> messages = list(db.messages('tag:inbox AND NOT tag:killed')) [...] -[The source](https://git.notmuchmail.org/git/notmuch/tree/HEAD:/bindings/python/) +[The source](https://git.notmuchmail.org/git/notmuch/tree/HEAD:/bindings/python-cffi/) ## Ruby |
