]> git.notmuchmail.org Git - notmuch/blob - docs/source/index.rst
Improve source documentation
[notmuch] / docs / source / index.rst
1 .. cnotmuch documentation master file, created by
2    sphinx-quickstart on Tue Feb  2 10:00:47 2010.
3
4 .. currentmodule:: cnotmuch.notmuch
5
6 Welcome to notmuch's documentation!
7 ===================================
8
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:`Database`, :class:`Query` provide most of the core functionality, returning :class:`Messages` and :class:`Tags`.
11
12 .. moduleauthor:: Sebastian Spaeth <Sebastian@SSpaeth.de>
13
14 :License: This module is covered under the GNU GPL v3 (or later).
15
16 This page contains the main API overview. More information on specific topics can be found on the following pages: (none here yet)
17
18 Notmuch can be imported as:
19
20  from cnotmuch import notmuch
21
22 or:
23
24  from cnotmuch.notmuch import Query,Database
25
26 .. toctree::
27    :maxdepth: 1
28
29
30
31 :mod:`notmuch` -- The Notmuch interface
32 =============================================
33
34 Document from cnotmuch.globals import nmlib,STATUS
35
36 :class:`Database` -- The underlying notmuch database
37 -----------------------------------------------------
38
39 .. autoclass:: Database([path=None[, create=False[, mode=MODE.READ_ONLY]]])
40
41    .. automethod:: create
42
43    .. automethod:: open(path, status=MODE.READ_ONLY)
44
45    .. automethod:: get_path
46
47    .. automethod:: find_message
48
49    .. automethod:: get_all_tags
50
51
52    .. attribute:: Database.MODE
53
54      Defines constants that are used as the mode in which to open a database.
55
56      READ_ONLY
57        Open the database in read-only mode
58
59      READ_WRITE
60        Open the database in read-write mode
61
62    .. autoattribute:: db_p
63
64 :class:`Query` -- Represents a notmuch Query
65 -----------------------------------------------
66
67 .. autoclass:: Query
68    :members:
69
70 :class:`Messages` -- A bunch of messages
71 ----------------------------------------
72
73 .. autoclass:: Messages
74    :members:
75
76 :class:`Message` -- A single message
77 ----------------------------------------
78
79 .. autoclass:: Message
80    :members:
81
82 :class:`Tags` -- A bunch of notmuch tags
83 ----------------------------------------
84
85 .. autoclass:: Tags
86    :members:
87
88    .. data: '__notmuchcmd__'
89
90       This is the actual binary that will be executed in order to run a notmuch command. This is set to *notmuch* and should usually not be changed.
91
92 :exc:`NotmuchError` -- A Notmuch execution error
93 ------------------------------------------------
94 .. autoexception:: NotmuchError
95    :members:
96
97    This execption inherits directly from :exc:`Exception` and is raised on errors during the notmuch execution.
98
99 :class:`STATUS` -- Notmuch operation return status
100 --------------------------------------------------
101 .. autoclass:: STATUS
102    :members:
103
104 Indices and tables
105 ==================
106
107 * :ref:`genindex`
108 * :ref:`search`
109