]> git.cworth.org Git - notmuch-wiki/blobdiff - bindings.mdwn
News for release 0.38.3
[notmuch-wiki] / bindings.mdwn
index e52030c799ecdcd4a60638df4a532d9d73c5b9a2..9288c0ab1e3fc762271741a8014251f855420c49 100644 (file)
@@ -1,17 +1,46 @@
 [[!img notmuch-logo.png alt="Notmuch logo" class="left"]]
 # Notmuch Language Bindings [DRAFT]
 
-The Notmuch library, `libnotmuch`, can be used from many programming languages
-using the Notmuch language bindings. The [[command line interface|manpages]] and
-many of the [[email clients and frontends|frontends]] are based on the language
-bindings.
+The Notmuch library, `libnotmuch`, can be used from many programming
+languages using the Notmuch language bindings. The [command line
+interface](https://notmuchmail.org/doc/latest/man1/notmuch.html) and
+the [[email clients and frontends|frontends]] are based on the
+language bindings.
 
 [[!toc levels=2]]
 
 ## C and C++
 
+`libnotmuch` is a shared C library. [The API](https://git.notmuchmail.org/git/notmuch/blob/HEAD:/lib/notmuch.h)
+
+The Notmuch command-line interface is based on the C library.
+
 ## Python
 
+Notmuch includes Python bindings to the Notmuch shared library. Please refer to
+the nice and extensive [Notmuch Python API
+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:
+
+        >>> 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-cffi/)
+
 ## Ruby
 
+[The source](https://git.notmuchmail.org/git/notmuch/tree/HEAD:/bindings/ruby/)
+
+The [client for
+vim](https://git.notmuchmail.org/git/notmuch/blob/HEAD:/vim/README) is in Ruby,
+so worth a look.
+
 ## Go
+
+[The source](https://git.notmuchmail.org/git/notmuch/tree/HEAD:/contrib/go/)