1 .. cnotmuch documentation master file, created by
2 sphinx-quickstart on Tue Feb 2 10:00:47 2010.
4 .. currentmodule:: cnotmuch
6 Welcome to :mod:`cnotmuch`'s documentation
7 ===========================================
9 The :mod:`cnotmuch` module provides an interface to the `notmuch <http://notmuchmail.org>`_ functionality, directly interfacing to a shared notmuch library.
10 The classes :class:`notmuch.Database`, :class:`notmuch.Query` provide most of the core functionality, returning :class:`notmuch.Messages` and :class:`notmuch.Tags`.
12 .. moduleauthor:: Sebastian Spaeth <Sebastian@SSpaeth.de>
14 :License: This module is covered under the GNU GPL v3 (or later).
16 This page contains the main API overview. More information on specific topics can be found on the following pages: (none here yet)
18 Notmuch can be imported as::
20 from cnotmuch import notmuch
24 from cnotmuch.notmuch import Query,Database
30 :mod:`notmuch` -- The Notmuch interface
31 =============================================
33 .. automodule:: cnotmuch.notmuch
35 :todo: Document nmlib,STATUS
37 :class:`Database` -- The underlying notmuch database
38 -----------------------------------------------------
40 .. autoclass:: Database([path=None[, create=False[, mode=MODE.READ_ONLY]]])
42 .. automethod:: create
44 .. automethod:: open(path, status=MODE.READ_ONLY)
46 .. automethod:: get_path
48 .. automethod:: find_message
50 .. automethod:: get_all_tags
53 .. attribute:: Database.MODE
55 Defines constants that are used as the mode in which to open a database.
58 Open the database in read-only mode
61 Open the database in read-write mode
63 .. autoattribute:: db_p
65 :class:`Query` -- A search query
66 -----------------------------------------------
70 .. automethod:: create
72 .. attribute:: Query.SORT
74 Defines constants that are used as the mode in which to open a database.
77 Sort by message date, oldest first.
80 Sort by message date, newest first.
83 Sort by email message ID
85 .. automethod:: set_sort
87 .. automethod:: search_messages
89 :class:`Messages` -- A bunch of messages
90 ----------------------------------------
92 .. autoclass:: Messages
94 .. automethod:: collect_tags
96 .. automethod:: __len__
98 :class:`Message` -- A single message
99 ----------------------------------------
101 .. autoclass:: Message
104 :class:`Tags` -- Notmuch tags
105 -----------------------------
110 .. automethod:: __len__
112 .. automethod:: __str__
114 :exc:`NotmuchError` -- A Notmuch execution error
115 ------------------------------------------------
116 .. autoexception:: NotmuchError
119 This execption inherits directly from :exc:`Exception` and is raised on errors during the notmuch execution.
121 :class:`STATUS` -- Notmuch operation return status
122 --------------------------------------------------
123 .. autoclass:: STATUS