mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-25 12:28:09 +01:00
python: move the usage example to quickstart.rst
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
This commit is contained in:
parent
fb52083bf7
commit
8dfbba05fa
2 changed files with 20 additions and 13 deletions
|
@ -15,25 +15,13 @@ Within :mod:`notmuch`, the classes :class:`Database`, :class:`Query` provide mos
|
||||||
|
|
||||||
This page contains the main API overview of notmuch |release|.
|
This page contains the main API overview of notmuch |release|.
|
||||||
|
|
||||||
Notmuch can be imported as::
|
|
||||||
|
|
||||||
import notmuch
|
|
||||||
|
|
||||||
or::
|
|
||||||
|
|
||||||
from notmuch import Query, Database
|
|
||||||
|
|
||||||
db = Database('path',create=True)
|
|
||||||
msgs = Query(db,'from:myself').search_messages()
|
|
||||||
|
|
||||||
for msg in msgs:
|
|
||||||
print (msg)
|
|
||||||
|
|
||||||
More information on specific topics can be found on the following pages:
|
More information on specific topics can be found on the following pages:
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 1
|
:maxdepth: 1
|
||||||
|
|
||||||
|
quickstart
|
||||||
status_and_errors
|
status_and_errors
|
||||||
notmuch
|
notmuch
|
||||||
|
|
||||||
|
|
19
bindings/python/docs/source/quickstart.rst
Normal file
19
bindings/python/docs/source/quickstart.rst
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
Quickstart and examples
|
||||||
|
=======================
|
||||||
|
|
||||||
|
.. todo:: write a nice introduction
|
||||||
|
.. todo:: improve the examples
|
||||||
|
|
||||||
|
Notmuch can be imported as::
|
||||||
|
|
||||||
|
import notmuch
|
||||||
|
|
||||||
|
or::
|
||||||
|
|
||||||
|
from notmuch import Query, Database
|
||||||
|
|
||||||
|
db = Database('path', create=True)
|
||||||
|
msgs = Query(db, 'from:myself').search_messages()
|
||||||
|
|
||||||
|
for msg in msgs:
|
||||||
|
print(msg)
|
Loading…
Reference in a new issue