root/README

Revision 289:40ab4b8aa484, 5.4 KB (checked in by Menno Smits <menno@…>, 4 weeks ago)

build_sphinx not sphinx_build

Line 
1Introduction
2------------
3IMAPClient aims to be a easy-to-use, Pythonic and complete IMAP client
4library with no dependencies outside the Python standard library.
5
6Features:
7- Arguments and return values are natural Python types.
8- IMAP server responses are fully parsed and readily usable.
9- IMAP unique message IDs (UIDs) are handled transparently. There is
10  no need to call different methods to use UIDs.
11- Escaping for internationalised mailbox names is transparently
12  handled.  Unicode mailbox names may be passed as input wherever a
13  folder name is accepted.
14- Time zones are transparently handled including when the server and
15  client are in different zones.
16- Convenience methods are provided for commonly used functionality.
17- Exceptions are raised when errors occur.
18
19
20Why IMAPClient?
21---------------
22You may ask: "why create another IMAP client library for Python?
23Doesn't the Python standard library already have imaplib?".
24
25The problem with imaplib is that it's very low-level. It expects
26string values where lists or tuples would be more appropriate and
27returns server responses almost unparsed. As IMAP server responses can
28be quite complex this means everyone using imaplib ends up writing
29their own flimsy parsing routines which break easily.
30
31Also, imaplib doesn't make good use of exceptions. This means you need
32to check the return value of each call to imaplib to see if what you
33just did was successful.
34
35IMAPClient actually uses imaplib internally. This may change at some
36point in the future.
37
38
39Current Status
40--------------
41IMAPClient is currently under development but it is unlikely that
42the existing API will change in backwards-incompatible ways. Changes
43planned for the near future will only add extra functionality to the
44API.
45
46You should feel confident using IMAPClient for production
47purposes. Any problems found will be fixed quickly once reported.
48
49The project's home page is a Trac instance at:
50
51    http://imapclient.freshfoo.com/ 
52
53Details about upcoming versions and planned features/fixes can be
54found there.
55
56
57Using IMAPClient
58----------------
59IMAPClient is listed on the PyPI (Python Package Index). To install
60via PyPI use the pip or easy_install tools:
61
62    pip install imapclient
63
64    easy_install IMAPClient
65
66To install from the source distribution:
67
68    python setup.py install
69
70The project is packaged using Distribute (mostly compatible with
71setuptools) and all the usual setup.py installation options are
72available. See http://packages.python.org/distribute/ for more info.
73
74
75Documentation
76-------------
77HTML documentation can be found at doc/html in the source
78distribution. The documentation is also available online at:
79
80    http://imapclient.readthedocs.org/
81
82The Sphinx source is at doc/src. If Sphinx is installed, the
83documentation can be rebuilt using:
84
85    python setup.py build_sphinx
86
87See imapclient/examples/example.py for a sample of how to use
88IMAPClient. If the IMAPClient was installed from PyPI the examples
89subdirectory can be found under the imapclient package installation
90directory.
91
92
93Mailing List
94------------
95The IMAPClient mailing list can be used to ask IMAPClient related
96questions and report bugs.
97
98* To send to the list and subscribe send an email to imapclient@librelist.com
99* Archives of the list are available at http://librelist.com/browser/imapclient/
100* See http://librelist.com/help.html for more information about the mailing list
101
102
103interact.py
104-----------
105This script connects an IMAPClient instance using the command line
106args given and starts an interactive session. This is useful for
107exploring the IMAPClient API and testing things out, avoiding the
108steps required to set up an IMAPClient instance.
109
110The IPython shell is used if it is installed. Otherwise the
111code.interact() function from the standard library is used.
112
113The interact functionality can also be accessed like this:
114
115    python -m imapclient.interact ...
116
117This works when IMAPClient has been installed from PyPI.
118
119
120livetest.py
121-----------
122This script contains a series of functional tests which exercise
123IMAPClient against a live IMAP account. It is useful for ensuring
124compatibility with a given IMAP server implementation. livetest.py
125must be used with an account that has an INBOX folder and write access
126to the account.
127
128WARNING: The operations performed by livetest.py are
129destructive. Emails and folders in the test account WILL BE
130DELETED. Please only run against a dummy account that you don't care
131about.
132
133Run livetest.py with the --help option to see usage.
134
135Please send the output of livetest.py to the mailing list if it fails
136to run successfully against a particular IMAP server. Reports of
137successful runs are also welcome.  Please include the type and version
138of the IMAP server.
139
140The livetest functionality can also be accessed like this:
141
142    python -m imapclient.livetest ...
143
144This works when IMAPClient has been installed from PyPI.
145
146
147Unit Tests
148----------
149There are comprehensive unit tests for the server response parser and
150a number of other parts of the code. These tests use the unittest2
151package which is also included as the standard unittest package in
152Python 2.7 and 3.2.
153
154Where unittest2 is included in the standard library (eg. Python 2.7
155and 3.2) you can run all unit tests like this (starting from the root
156directory of the IMAPClient source):
157
158     python -m unittest discover
159
160Alternatively, if unittest2 is installed separately use the unit2
161script (for Unix-like systems) or the unit2.py script:
162
163     unit2 discover
164     unit2.py discover
Note: See TracBrowser for help on using the browser.