python: move the usage example to quickstart.rst

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
This commit is contained in:
Justus Winter 2012-02-24 01:18:54 +01:00
parent fb52083bf7
commit 8dfbba05fa
2 changed files with 20 additions and 13 deletions

View file

@ -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|.
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:
.. toctree::
:maxdepth: 1
quickstart
status_and_errors
notmuch

View 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)