]> git.notmuchmail.org Git - notmuch/blobdiff - bindings/python/docs/source/index.rst
Merge branch 'release'
[notmuch] / bindings / python / docs / source / index.rst
index d58ba97efb391fff9e7cc8b367bcce0c6720b439..f7d3d6058e3b058a171da31a365d57b2b02abd0f 100644 (file)
@@ -21,13 +21,20 @@ Notmuch can be imported as::
 
 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:
 
 .. toctree::
    :maxdepth: 1
 
+   status_and_errors
    notmuch   
 
 :mod:`notmuch` -- The Notmuch interface
@@ -35,8 +42,6 @@ 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
 ---------------------------------------------------------------------
 
@@ -54,6 +59,10 @@ More information on specific topics can be found on the following pages:
 
    .. automethod:: upgrade
 
+   .. automethod:: begin_atomic
+
+   .. automethod:: end_atomic
+
    .. automethod:: get_directory
 
    .. automethod:: add_message
@@ -62,13 +71,12 @@ More information on specific topics can be found on the following pages:
 
    .. automethod:: find_message
 
+   .. automethod:: find_message_by_filename
+
    .. automethod:: get_all_tags
 
    .. 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.
@@ -81,6 +89,7 @@ More information on specific topics can be found on the following pages:
 
    .. autoattribute:: db_p
 
+
 :class:`notmuch.Query` -- A search query
 -------------------------------------------------
 
@@ -129,10 +138,10 @@ More information on specific topics can be found on the following pages:
 
    .. method:: __len__()
 
-   .. note:: :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
 ----------------------------------------
@@ -157,7 +166,7 @@ More information on specific topics can be found on the following pages:
          query. This allows us to distinguish matches from the rest
          of the messages in that thread.
 
-  .. automethod:: get_flag
+   .. automethod:: get_flag
 
    .. automethod:: set_flag
    
@@ -167,6 +176,10 @@ More information on specific topics can be found on the following pages:
 
    .. automethod:: get_tags
 
+   .. automethod:: maildir_flags_to_tags
+
+   .. automethod:: tags_to_maildir_flags
+
    .. automethod:: remove_tag
 
    .. automethod:: add_tag
@@ -177,7 +190,9 @@ More information on specific topics can be found on the following pages:
 
    .. automethod:: thaw
 
-   .. automethod:: format_as_text
+   .. automethod:: format_message_as_json
+
+   .. automethod:: format_message_as_text
 
    .. automethod:: __str__
 
@@ -188,7 +203,13 @@ More information on specific topics can be found on the following pages:
 .. autoclass:: Tags
    :members:
 
-   .. automethod:: __len__
+   .. 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.
 
    .. automethod:: __str__
 
@@ -252,32 +273,8 @@ More information on specific topics can be found on the following pages:
 
    .. autoattribute:: notmuch.database.Directory.path
 
-:exc:`NotmuchError` -- A Notmuch execution error
-------------------------------------------------
-.. autoexception:: NotmuchError
-   :members:
-
-   This execption inherits directly from :exc:`Exception` and is raised on errors during the notmuch execution.
-
-:class:`STATUS` -- Notmuch operation return status
---------------------------------------------------
-
-.. data:: STATUS
-
-  STATUS is a class, whose attributes provide constants that serve as return indicators for notmuch functions. Currently the following ones are defined. For possible return values and specific meaning for each method, see the method description.
-
-  * SUCCESS
-  * OUT_OF_MEMORY
-  * READ_ONLY_DATABASE
-  * XAPIAN_EXCEPTION
-  * FILE_ERROR
-  * FILE_NOT_EMAIL
-  * DUPLICATE_MESSAGE_ID
-  * NULL_POINTER
-  * TAG_TOO_LONG
-  * UNBALANCED_FREEZE_THAW
-  * NOT_INITIALIZED
 
+The `next page <status_and_errors.html>`_ contains information on possible Status and Error values.
 
 Indices and tables
 ==================