or::
- from notmuch import Query,Database
+ 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:
.. automodule:: notmuch
-:todo: Document nmlib,STATUS
-
:class:`notmuch.Database` -- The underlying notmuch database
---------------------------------------------------------------------
.. automethod:: create_query
- .. note:: :meth:`create_query` was broken in release
- 0.1 and is fixed since 0.1.1.
-
.. attribute:: Database.MODE
Defines constants that are used as the mode in which to open a database.
.. autoattribute:: db_p
+
:class:`notmuch.Query` -- A search query
-------------------------------------------------
.. automethod:: count_messages
+ .. automethod:: count_threads
+
:class:`Messages` -- A bunch of messages
----------------------------------------
.. method:: __len__()
- .. warning:: :meth:`__len__` was removed in version 0.6 as it exhausted
- the iterator and broke list(Messages()). Use the
- :meth:`Query.count_messages` function or use
- `len(list(msgs))`.
+ .. warning::
+
+ :meth:`__len__` was removed in version 0.6 as it exhausted the iterator and broke
+ list(Messages()). Use the :meth:`Query.count_messages` function or use `len(list(msgs))`.
:class:`Message` -- A single message
----------------------------------------
.. method:: __len__
- .. warning:: :meth:`__len__` was removed in version 0.6 as it
- exhausted the iterator and broke list(Tags()). Use
- :meth:`len(list(msgs))` instead if you need to know the
- number of tags.
+ .. warning::
+
+ :meth:`__len__` was removed in version 0.6 as it exhausted the iterator and broke
+ list(Tags()). Use :meth:`len(list(msgs))` instead if you need to know the number of
+ tags.
.. automethod:: __str__