IMAPClient 2.0.0__tar.gz → 4.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- imapclient-4.0.0/AUTHORS.rst +51 -0
- imapclient-4.0.0/IMAPClient.egg-info/PKG-INFO +196 -0
- imapclient-4.0.0/IMAPClient.egg-info/SOURCES.txt +43 -0
- imapclient-4.0.0/IMAPClient.egg-info/entry_points.txt +3 -0
- imapclient-4.0.0/PKG-INFO +196 -0
- {IMAPClient-2.0.0 → imapclient-4.0.0}/README.rst +24 -50
- {IMAPClient-2.0.0 → imapclient-4.0.0}/imapclient/__init__.py +5 -6
- imapclient-4.0.0/imapclient/config.py +219 -0
- {IMAPClient-2.0.0 → imapclient-4.0.0}/imapclient/datetime_util.py +12 -15
- {IMAPClient-2.0.0 → imapclient-4.0.0}/imapclient/exceptions.py +6 -5
- {IMAPClient-2.0.0 → imapclient-4.0.0}/imapclient/fixed_offset.py +14 -15
- imapclient-4.0.0/imapclient/imap4.py +18 -0
- {IMAPClient-2.0.0 → imapclient-4.0.0}/imapclient/imap_utf7.py +32 -30
- {IMAPClient-2.0.0 → imapclient-4.0.0}/imapclient/imapclient.py +778 -335
- imapclient-4.0.0/imapclient/interact.py +155 -0
- {IMAPClient-2.0.0 → imapclient-4.0.0/imapclient}/livetest.py +368 -257
- {IMAPClient-2.0.0 → imapclient-4.0.0}/imapclient/response_lexer.py +35 -35
- imapclient-4.0.0/imapclient/response_parser.py +287 -0
- {IMAPClient-2.0.0 → imapclient-4.0.0}/imapclient/response_types.py +49 -22
- imapclient-4.0.0/imapclient/testable_imapclient.py +41 -0
- imapclient-4.0.0/imapclient/tls.py +45 -0
- imapclient-4.0.0/imapclient/typing_imapclient.py +4 -0
- imapclient-4.0.0/imapclient/util.py +63 -0
- imapclient-4.0.0/imapclient/version.py +17 -0
- imapclient-4.0.0/pyproject.toml +149 -0
- imapclient-4.0.0/setup.cfg +4 -0
- imapclient-4.0.0/tests/test_auth.py +32 -0
- imapclient-4.0.0/tests/test_datetime_util.py +80 -0
- imapclient-4.0.0/tests/test_enable.py +69 -0
- imapclient-4.0.0/tests/test_fixed_offset.py +70 -0
- imapclient-4.0.0/tests/test_folder_status.py +61 -0
- imapclient-4.0.0/tests/test_imap_utf7.py +50 -0
- imapclient-4.0.0/tests/test_imapclient.py +1126 -0
- imapclient-4.0.0/tests/test_init.py +105 -0
- imapclient-4.0.0/tests/test_response_lexer.py +96 -0
- imapclient-4.0.0/tests/test_response_parser.py +716 -0
- imapclient-4.0.0/tests/test_search.py +164 -0
- imapclient-4.0.0/tests/test_sort.py +42 -0
- imapclient-4.0.0/tests/test_starttls.py +65 -0
- imapclient-4.0.0/tests/test_store.py +150 -0
- imapclient-4.0.0/tests/test_thread.py +43 -0
- imapclient-4.0.0/tests/test_util_functions.py +177 -0
- IMAPClient-2.0.0/IMAPClient.egg-info/PKG-INFO +0 -38
- IMAPClient-2.0.0/IMAPClient.egg-info/SOURCES.txt +0 -84
- IMAPClient-2.0.0/IMAPClient.egg-info/requires.txt +0 -7
- IMAPClient-2.0.0/MANIFEST.in +0 -7
- IMAPClient-2.0.0/NEWS.rst +0 -7
- IMAPClient-2.0.0/PKG-INFO +0 -38
- IMAPClient-2.0.0/doc/html/_modules/imapclient/exceptions.html +0 -122
- IMAPClient-2.0.0/doc/html/_modules/imapclient/imapclient.html +0 -1717
- IMAPClient-2.0.0/doc/html/_modules/imapclient/response_types.html +0 -207
- IMAPClient-2.0.0/doc/html/_modules/imapclient/testable_imapclient.html +0 -130
- IMAPClient-2.0.0/doc/html/_modules/imapclient/tls.html +0 -143
- IMAPClient-2.0.0/doc/html/_modules/index.html +0 -82
- IMAPClient-2.0.0/doc/html/_sources/advanced.rst.txt +0 -148
- IMAPClient-2.0.0/doc/html/_sources/advanced.txt +0 -148
- IMAPClient-2.0.0/doc/html/_sources/api.rst.txt +0 -68
- IMAPClient-2.0.0/doc/html/_sources/api.txt +0 -68
- IMAPClient-2.0.0/doc/html/_sources/concepts.rst.txt +0 -139
- IMAPClient-2.0.0/doc/html/_sources/concepts.txt +0 -139
- IMAPClient-2.0.0/doc/html/_sources/contributing.rst.txt +0 -83
- IMAPClient-2.0.0/doc/html/_sources/contributing.txt +0 -83
- IMAPClient-2.0.0/doc/html/_sources/index.rst.txt +0 -129
- IMAPClient-2.0.0/doc/html/_sources/index.txt +0 -129
- IMAPClient-2.0.0/doc/html/_sources/installation.rst.txt +0 -30
- IMAPClient-2.0.0/doc/html/_sources/installation.txt +0 -30
- IMAPClient-2.0.0/doc/html/_sources/quickstart.rst.txt +0 -7
- IMAPClient-2.0.0/doc/html/_sources/quickstart.txt +0 -29
- IMAPClient-2.0.0/doc/html/_sources/releases.rst.txt +0 -869
- IMAPClient-2.0.0/doc/html/_sources/releases.txt +0 -880
- IMAPClient-2.0.0/doc/html/_static/basic.css +0 -599
- IMAPClient-2.0.0/doc/html/_static/comment-bright.png +0 -0
- IMAPClient-2.0.0/doc/html/_static/comment-close.png +0 -0
- IMAPClient-2.0.0/doc/html/_static/comment.png +0 -0
- IMAPClient-2.0.0/doc/html/_static/contents.png +0 -0
- IMAPClient-2.0.0/doc/html/_static/down-pressed.png +0 -0
- IMAPClient-2.0.0/doc/html/_static/down.png +0 -0
- IMAPClient-2.0.0/doc/html/_static/file.png +0 -0
- IMAPClient-2.0.0/doc/html/_static/minus.png +0 -0
- IMAPClient-2.0.0/doc/html/_static/navigation.png +0 -0
- IMAPClient-2.0.0/doc/html/_static/plus.png +0 -0
- IMAPClient-2.0.0/doc/html/_static/pygments.css +0 -65
- IMAPClient-2.0.0/doc/html/_static/sphinxdoc.css +0 -345
- IMAPClient-2.0.0/doc/html/_static/up-pressed.png +0 -0
- IMAPClient-2.0.0/doc/html/_static/up.png +0 -0
- IMAPClient-2.0.0/doc/html/advanced.html +0 -334
- IMAPClient-2.0.0/doc/html/api.html +0 -1025
- IMAPClient-2.0.0/doc/html/concepts.html +0 -279
- IMAPClient-2.0.0/doc/html/contributing.html +0 -196
- IMAPClient-2.0.0/doc/html/index.html +0 -316
- IMAPClient-2.0.0/doc/html/installation.html +0 -142
- IMAPClient-2.0.0/doc/html/py-modindex.html +0 -118
- IMAPClient-2.0.0/doc/html/quickstart.html +0 -119
- IMAPClient-2.0.0/doc/html/releases.html +0 -979
- IMAPClient-2.0.0/doc/html/search.html +0 -93
- IMAPClient-2.0.0/doc/src/advanced.rst +0 -148
- IMAPClient-2.0.0/doc/src/api.rst +0 -68
- IMAPClient-2.0.0/doc/src/concepts.rst +0 -139
- IMAPClient-2.0.0/doc/src/conf.py +0 -217
- IMAPClient-2.0.0/doc/src/contributing.rst +0 -83
- IMAPClient-2.0.0/doc/src/index.rst +0 -129
- IMAPClient-2.0.0/doc/src/installation.rst +0 -30
- IMAPClient-2.0.0/doc/src/releases.rst +0 -880
- IMAPClient-2.0.0/imapclient/config.py +0 -202
- IMAPClient-2.0.0/imapclient/imap4.py +0 -16
- IMAPClient-2.0.0/imapclient/interact.py +0 -96
- IMAPClient-2.0.0/imapclient/response_parser.py +0 -236
- IMAPClient-2.0.0/imapclient/testable_imapclient.py +0 -50
- IMAPClient-2.0.0/imapclient/tls.py +0 -63
- IMAPClient-2.0.0/imapclient/util.py +0 -39
- IMAPClient-2.0.0/imapclient/version.py +0 -23
- IMAPClient-2.0.0/interact.py +0 -10
- IMAPClient-2.0.0/setup.cfg +0 -16
- IMAPClient-2.0.0/setup.py +0 -80
- {IMAPClient-2.0.0 → imapclient-4.0.0}/COPYING +0 -0
- {IMAPClient-2.0.0 → imapclient-4.0.0}/IMAPClient.egg-info/dependency_links.txt +0 -0
- {IMAPClient-2.0.0 → imapclient-4.0.0}/IMAPClient.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
IMAPClient was created by Menno Finlay-Smits <inbox@menno.io>. The
|
|
2
|
+
project is now maintained by Nicolas Le Manchet and Menno
|
|
3
|
+
Finlay-Smits.
|
|
4
|
+
|
|
5
|
+
Many thanks go to the following people for their help with this
|
|
6
|
+
project:
|
|
7
|
+
|
|
8
|
+
- Maxime Lorant
|
|
9
|
+
- Mathieu Agopian
|
|
10
|
+
- Chris Arndt
|
|
11
|
+
- Jp Calderone
|
|
12
|
+
- John Louis del Rosario
|
|
13
|
+
- Dave Eckhardt
|
|
14
|
+
- Eben Freeman
|
|
15
|
+
- Helder Guerreiro
|
|
16
|
+
- Mark Hammond
|
|
17
|
+
- Johannes Heckel
|
|
18
|
+
- Thomas Jost
|
|
19
|
+
- Lukasz Mierzwa
|
|
20
|
+
- Naveen Nathan
|
|
21
|
+
- Brian Neal
|
|
22
|
+
- Phil Peterson
|
|
23
|
+
- Aviv Salem
|
|
24
|
+
- Andrew Scheller
|
|
25
|
+
- Thomas Steinacher
|
|
26
|
+
- Zac Witte
|
|
27
|
+
- Hans-Peter Jansen
|
|
28
|
+
- Carson Ip
|
|
29
|
+
- Jonny Hatch
|
|
30
|
+
- Jasper Spaans
|
|
31
|
+
- Fabio Manganiello
|
|
32
|
+
- Samir M
|
|
33
|
+
- Devin Bayer
|
|
34
|
+
- Mantas Mikulėnas
|
|
35
|
+
- @zrose584
|
|
36
|
+
- Michał Górny
|
|
37
|
+
- François Deppierraz
|
|
38
|
+
- Jasper Spaans
|
|
39
|
+
- Boni Lindsley
|
|
40
|
+
- Tobias Kölling
|
|
41
|
+
- @pinoatrome
|
|
42
|
+
- Shoaib Ahmed
|
|
43
|
+
- John Villalovos
|
|
44
|
+
- Claude Paroz
|
|
45
|
+
- Stefan Wójcik
|
|
46
|
+
- Andrzej Bartosiński
|
|
47
|
+
- @axoroll7
|
|
48
|
+
- Sean Whalen
|
|
49
|
+
- Peter Wienemann
|
|
50
|
+
- Arnout Engelen
|
|
51
|
+
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: IMAPClient
|
|
3
|
+
Version: 4.0.0
|
|
4
|
+
Summary: Easy-to-use, Pythonic and complete IMAP client library
|
|
5
|
+
Author-email: Menno Finlay-Smits <hello@menno.io>
|
|
6
|
+
Maintainer-email: IMAPClient Maintainers <imapclient@groups.io>
|
|
7
|
+
Project-URL: Homepage, https://github.com/mjs/imapclient/
|
|
8
|
+
Keywords: imap,client,email,mail
|
|
9
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
12
|
+
Classifier: Natural Language :: English
|
|
13
|
+
Classifier: Programming Language :: Python
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Topic :: Communications :: Email :: Post-Office :: IMAP
|
|
16
|
+
Classifier: Topic :: Internet
|
|
17
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
18
|
+
Classifier: Topic :: System :: Networking
|
|
19
|
+
Requires-Python: >=3.8.0
|
|
20
|
+
Description-Content-Type: text/x-rst
|
|
21
|
+
License-File: COPYING
|
|
22
|
+
License-File: AUTHORS.rst
|
|
23
|
+
Dynamic: license-file
|
|
24
|
+
|
|
25
|
+
Essentials
|
|
26
|
+
----------
|
|
27
|
+
IMAPClient is an easy-to-use, Pythonic and complete IMAP client
|
|
28
|
+
library.
|
|
29
|
+
|
|
30
|
+
========================= ========================================
|
|
31
|
+
Current version 3.0.1
|
|
32
|
+
Supported Python versions 3.8 - 3.14
|
|
33
|
+
License New BSD
|
|
34
|
+
Project home https://github.com/mjs/imapclient/
|
|
35
|
+
PyPI https://pypi.python.org/pypi/IMAPClient
|
|
36
|
+
Documentation https://imapclient.readthedocs.io/
|
|
37
|
+
Discussions https://github.com/mjs/imapclient/discussions
|
|
38
|
+
Test Status |build master|
|
|
39
|
+
========================= ========================================
|
|
40
|
+
|
|
41
|
+
.. |build master| image:: https://github.com/mjs/imapclient/actions/workflows/main.yml/badge.svg
|
|
42
|
+
:target: https://github.com/mjs/imapclient/actions
|
|
43
|
+
:alt: master branch
|
|
44
|
+
|
|
45
|
+
Features
|
|
46
|
+
--------
|
|
47
|
+
- Arguments and return values are natural Python types.
|
|
48
|
+
- IMAP server responses are fully parsed and readily usable.
|
|
49
|
+
- IMAP unique message IDs (UIDs) are handled transparently. There is
|
|
50
|
+
no need to call different methods to use UIDs.
|
|
51
|
+
- Escaping for internationalised mailbox names is transparently
|
|
52
|
+
handled. Unicode mailbox names may be passed as input wherever a
|
|
53
|
+
folder name is accepted.
|
|
54
|
+
- Time zones are transparently handled including when the server and
|
|
55
|
+
client are in different zones.
|
|
56
|
+
- Convenience methods are provided for commonly used functionality.
|
|
57
|
+
- Exceptions are raised when errors occur.
|
|
58
|
+
|
|
59
|
+
Example
|
|
60
|
+
-------
|
|
61
|
+
|
|
62
|
+
.. code-block:: python
|
|
63
|
+
|
|
64
|
+
from imapclient import IMAPClient
|
|
65
|
+
|
|
66
|
+
# context manager ensures the session is cleaned up
|
|
67
|
+
with IMAPClient(host="imap.host.org") as client:
|
|
68
|
+
client.login('someone', 'secret')
|
|
69
|
+
client.select_folder('INBOX')
|
|
70
|
+
|
|
71
|
+
# search criteria are passed in a straightforward way
|
|
72
|
+
# (nesting is supported)
|
|
73
|
+
messages = client.search(['NOT', 'DELETED'])
|
|
74
|
+
|
|
75
|
+
# fetch selectors are passed as a simple list of strings.
|
|
76
|
+
response = client.fetch(messages, ['FLAGS', 'RFC822.SIZE'])
|
|
77
|
+
|
|
78
|
+
# `response` is keyed by message id and contains parsed,
|
|
79
|
+
# converted response items.
|
|
80
|
+
for message_id, data in response.items():
|
|
81
|
+
print('{id}: {size} bytes, flags={flags}'.format(
|
|
82
|
+
id=message_id,
|
|
83
|
+
size=data[b'RFC822.SIZE'],
|
|
84
|
+
flags=data[b'FLAGS']))
|
|
85
|
+
|
|
86
|
+
Why IMAPClient?
|
|
87
|
+
---------------
|
|
88
|
+
You may ask: "why create another IMAP client library for Python?
|
|
89
|
+
Doesn't the Python standard library already have imaplib?".
|
|
90
|
+
|
|
91
|
+
The problem with imaplib is that it's very low-level. It expects
|
|
92
|
+
string values where lists or tuples would be more appropriate and
|
|
93
|
+
returns server responses almost unparsed. As IMAP server responses can
|
|
94
|
+
be quite complex this means everyone using imaplib ends up writing
|
|
95
|
+
their own fragile parsing routines.
|
|
96
|
+
|
|
97
|
+
Also, imaplib doesn't make good use of exceptions. This means you need
|
|
98
|
+
to check the return value of each call to imaplib to see if what you
|
|
99
|
+
just did was successful.
|
|
100
|
+
|
|
101
|
+
IMAPClient actually uses imaplib internally. This may change at some
|
|
102
|
+
point in the future.
|
|
103
|
+
|
|
104
|
+
Installing IMAPClient
|
|
105
|
+
---------------------
|
|
106
|
+
IMAPClient is listed on PyPI and can be installed with `uv
|
|
107
|
+
<https://docs.astral.sh/uv/>`_::
|
|
108
|
+
|
|
109
|
+
uv add imapclient
|
|
110
|
+
|
|
111
|
+
More installation methods are described in the documentation.
|
|
112
|
+
|
|
113
|
+
Documentation
|
|
114
|
+
-------------
|
|
115
|
+
IMAPClient's manual is available at http://imapclient.readthedocs.io/.
|
|
116
|
+
Release notes can be found at
|
|
117
|
+
http://imapclient.readthedocs.io/#release-history.
|
|
118
|
+
|
|
119
|
+
See the `examples` directory in the root of project source for
|
|
120
|
+
examples of how to use IMAPClient.
|
|
121
|
+
|
|
122
|
+
Current Status
|
|
123
|
+
--------------
|
|
124
|
+
You should feel confident using IMAPClient for production purposes.
|
|
125
|
+
|
|
126
|
+
In order to clearly communicate version compatibility, IMAPClient
|
|
127
|
+
will strictly adhere to the `Semantic Versioning <http://semver.org>`_
|
|
128
|
+
scheme from version 1.0 onwards.
|
|
129
|
+
|
|
130
|
+
The project's home page is https://github.com/mjs/imapclient/ (this
|
|
131
|
+
currently redirects to the IMAPClient Github site). Details about
|
|
132
|
+
upcoming versions and planned features/fixes can be found in the issue
|
|
133
|
+
tracker on Github. The maintainers also blog about IMAPClient
|
|
134
|
+
news. Those articles can be found `here
|
|
135
|
+
<http://menno.io/tags/imapclient>`_.
|
|
136
|
+
|
|
137
|
+
Discussions
|
|
138
|
+
-----------
|
|
139
|
+
`Github Discussions`_ can be used to ask questions, propose changes or praise
|
|
140
|
+
the project maintainers :)
|
|
141
|
+
|
|
142
|
+
.. _`Github Discussions`: https://github.com/mjs/imapclient/discussions
|
|
143
|
+
|
|
144
|
+
Working on IMAPClient
|
|
145
|
+
---------------------
|
|
146
|
+
The `contributing documentation
|
|
147
|
+
<http://imapclient.rtfd.io/en/master/contributing.html>`_ contains
|
|
148
|
+
information for those interested in improving IMAPClient.
|
|
149
|
+
|
|
150
|
+
IMAP Servers
|
|
151
|
+
------------
|
|
152
|
+
IMAPClient is heavily tested against Dovecot, Gmail, Fastmail.fm
|
|
153
|
+
(who use a modified Cyrus implementation), Office365 and Yahoo. Access
|
|
154
|
+
to accounts on other IMAP servers/services for testing would be
|
|
155
|
+
greatly appreciated.
|
|
156
|
+
|
|
157
|
+
Interactive Console
|
|
158
|
+
-------------------
|
|
159
|
+
This script connects an IMAPClient instance using the command line
|
|
160
|
+
args given and starts an interactive session. This is useful for
|
|
161
|
+
exploring the IMAPClient API and testing things out, avoiding the
|
|
162
|
+
steps required to set up an IMAPClient instance.
|
|
163
|
+
|
|
164
|
+
The IPython shell is used if it is installed. Otherwise the
|
|
165
|
+
code.interact() function from the standard library is used.
|
|
166
|
+
|
|
167
|
+
The interactive console functionality can be accessed by running the
|
|
168
|
+
``imapclient-interact`` script that is installed alongside IMAPClient,
|
|
169
|
+
or by invoking the interact module like this::
|
|
170
|
+
|
|
171
|
+
uv run python -m imapclient.interact ...
|
|
172
|
+
|
|
173
|
+
"Live" Tests
|
|
174
|
+
------------
|
|
175
|
+
IMAPClient includes a series of live, functional tests which exercise
|
|
176
|
+
it against a live IMAP account. These are useful for ensuring
|
|
177
|
+
compatibility with a given IMAP server implementation.
|
|
178
|
+
|
|
179
|
+
The livetest functionality is run using the ``imapclient-livetest``
|
|
180
|
+
script that is installed alongside IMAPClient::
|
|
181
|
+
|
|
182
|
+
uv run imapclient-livetest <livetest.ini> [ optional unittest arguments ]
|
|
183
|
+
|
|
184
|
+
The configuration file format is
|
|
185
|
+
`described in the main documentation <http://imapclient.rtfd.io/#configuration-file-format>`_.
|
|
186
|
+
|
|
187
|
+
**WARNING**: The operations used by livetest are destructive and could
|
|
188
|
+
cause unintended loss of data. That said, as of version 0.9, livetest
|
|
189
|
+
limits its activity to a folder it creates and subfolders of that
|
|
190
|
+
folder. It *should* be safe to use with any IMAP account but please
|
|
191
|
+
don't run livetest against a truly important IMAP account.
|
|
192
|
+
|
|
193
|
+
Please include the output of imapclient-livetest with an issue if it
|
|
194
|
+
fails to run successfully against a particular IMAP server. Reports of
|
|
195
|
+
successful runs are also welcome. Please include the type and version
|
|
196
|
+
of the IMAP server, if known.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
AUTHORS.rst
|
|
2
|
+
COPYING
|
|
3
|
+
README.rst
|
|
4
|
+
pyproject.toml
|
|
5
|
+
IMAPClient.egg-info/PKG-INFO
|
|
6
|
+
IMAPClient.egg-info/SOURCES.txt
|
|
7
|
+
IMAPClient.egg-info/dependency_links.txt
|
|
8
|
+
IMAPClient.egg-info/entry_points.txt
|
|
9
|
+
IMAPClient.egg-info/top_level.txt
|
|
10
|
+
imapclient/__init__.py
|
|
11
|
+
imapclient/config.py
|
|
12
|
+
imapclient/datetime_util.py
|
|
13
|
+
imapclient/exceptions.py
|
|
14
|
+
imapclient/fixed_offset.py
|
|
15
|
+
imapclient/imap4.py
|
|
16
|
+
imapclient/imap_utf7.py
|
|
17
|
+
imapclient/imapclient.py
|
|
18
|
+
imapclient/interact.py
|
|
19
|
+
imapclient/livetest.py
|
|
20
|
+
imapclient/response_lexer.py
|
|
21
|
+
imapclient/response_parser.py
|
|
22
|
+
imapclient/response_types.py
|
|
23
|
+
imapclient/testable_imapclient.py
|
|
24
|
+
imapclient/tls.py
|
|
25
|
+
imapclient/typing_imapclient.py
|
|
26
|
+
imapclient/util.py
|
|
27
|
+
imapclient/version.py
|
|
28
|
+
tests/test_auth.py
|
|
29
|
+
tests/test_datetime_util.py
|
|
30
|
+
tests/test_enable.py
|
|
31
|
+
tests/test_fixed_offset.py
|
|
32
|
+
tests/test_folder_status.py
|
|
33
|
+
tests/test_imap_utf7.py
|
|
34
|
+
tests/test_imapclient.py
|
|
35
|
+
tests/test_init.py
|
|
36
|
+
tests/test_response_lexer.py
|
|
37
|
+
tests/test_response_parser.py
|
|
38
|
+
tests/test_search.py
|
|
39
|
+
tests/test_sort.py
|
|
40
|
+
tests/test_starttls.py
|
|
41
|
+
tests/test_store.py
|
|
42
|
+
tests/test_thread.py
|
|
43
|
+
tests/test_util_functions.py
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: IMAPClient
|
|
3
|
+
Version: 4.0.0
|
|
4
|
+
Summary: Easy-to-use, Pythonic and complete IMAP client library
|
|
5
|
+
Author-email: Menno Finlay-Smits <hello@menno.io>
|
|
6
|
+
Maintainer-email: IMAPClient Maintainers <imapclient@groups.io>
|
|
7
|
+
Project-URL: Homepage, https://github.com/mjs/imapclient/
|
|
8
|
+
Keywords: imap,client,email,mail
|
|
9
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
12
|
+
Classifier: Natural Language :: English
|
|
13
|
+
Classifier: Programming Language :: Python
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Topic :: Communications :: Email :: Post-Office :: IMAP
|
|
16
|
+
Classifier: Topic :: Internet
|
|
17
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
18
|
+
Classifier: Topic :: System :: Networking
|
|
19
|
+
Requires-Python: >=3.8.0
|
|
20
|
+
Description-Content-Type: text/x-rst
|
|
21
|
+
License-File: COPYING
|
|
22
|
+
License-File: AUTHORS.rst
|
|
23
|
+
Dynamic: license-file
|
|
24
|
+
|
|
25
|
+
Essentials
|
|
26
|
+
----------
|
|
27
|
+
IMAPClient is an easy-to-use, Pythonic and complete IMAP client
|
|
28
|
+
library.
|
|
29
|
+
|
|
30
|
+
========================= ========================================
|
|
31
|
+
Current version 3.0.1
|
|
32
|
+
Supported Python versions 3.8 - 3.14
|
|
33
|
+
License New BSD
|
|
34
|
+
Project home https://github.com/mjs/imapclient/
|
|
35
|
+
PyPI https://pypi.python.org/pypi/IMAPClient
|
|
36
|
+
Documentation https://imapclient.readthedocs.io/
|
|
37
|
+
Discussions https://github.com/mjs/imapclient/discussions
|
|
38
|
+
Test Status |build master|
|
|
39
|
+
========================= ========================================
|
|
40
|
+
|
|
41
|
+
.. |build master| image:: https://github.com/mjs/imapclient/actions/workflows/main.yml/badge.svg
|
|
42
|
+
:target: https://github.com/mjs/imapclient/actions
|
|
43
|
+
:alt: master branch
|
|
44
|
+
|
|
45
|
+
Features
|
|
46
|
+
--------
|
|
47
|
+
- Arguments and return values are natural Python types.
|
|
48
|
+
- IMAP server responses are fully parsed and readily usable.
|
|
49
|
+
- IMAP unique message IDs (UIDs) are handled transparently. There is
|
|
50
|
+
no need to call different methods to use UIDs.
|
|
51
|
+
- Escaping for internationalised mailbox names is transparently
|
|
52
|
+
handled. Unicode mailbox names may be passed as input wherever a
|
|
53
|
+
folder name is accepted.
|
|
54
|
+
- Time zones are transparently handled including when the server and
|
|
55
|
+
client are in different zones.
|
|
56
|
+
- Convenience methods are provided for commonly used functionality.
|
|
57
|
+
- Exceptions are raised when errors occur.
|
|
58
|
+
|
|
59
|
+
Example
|
|
60
|
+
-------
|
|
61
|
+
|
|
62
|
+
.. code-block:: python
|
|
63
|
+
|
|
64
|
+
from imapclient import IMAPClient
|
|
65
|
+
|
|
66
|
+
# context manager ensures the session is cleaned up
|
|
67
|
+
with IMAPClient(host="imap.host.org") as client:
|
|
68
|
+
client.login('someone', 'secret')
|
|
69
|
+
client.select_folder('INBOX')
|
|
70
|
+
|
|
71
|
+
# search criteria are passed in a straightforward way
|
|
72
|
+
# (nesting is supported)
|
|
73
|
+
messages = client.search(['NOT', 'DELETED'])
|
|
74
|
+
|
|
75
|
+
# fetch selectors are passed as a simple list of strings.
|
|
76
|
+
response = client.fetch(messages, ['FLAGS', 'RFC822.SIZE'])
|
|
77
|
+
|
|
78
|
+
# `response` is keyed by message id and contains parsed,
|
|
79
|
+
# converted response items.
|
|
80
|
+
for message_id, data in response.items():
|
|
81
|
+
print('{id}: {size} bytes, flags={flags}'.format(
|
|
82
|
+
id=message_id,
|
|
83
|
+
size=data[b'RFC822.SIZE'],
|
|
84
|
+
flags=data[b'FLAGS']))
|
|
85
|
+
|
|
86
|
+
Why IMAPClient?
|
|
87
|
+
---------------
|
|
88
|
+
You may ask: "why create another IMAP client library for Python?
|
|
89
|
+
Doesn't the Python standard library already have imaplib?".
|
|
90
|
+
|
|
91
|
+
The problem with imaplib is that it's very low-level. It expects
|
|
92
|
+
string values where lists or tuples would be more appropriate and
|
|
93
|
+
returns server responses almost unparsed. As IMAP server responses can
|
|
94
|
+
be quite complex this means everyone using imaplib ends up writing
|
|
95
|
+
their own fragile parsing routines.
|
|
96
|
+
|
|
97
|
+
Also, imaplib doesn't make good use of exceptions. This means you need
|
|
98
|
+
to check the return value of each call to imaplib to see if what you
|
|
99
|
+
just did was successful.
|
|
100
|
+
|
|
101
|
+
IMAPClient actually uses imaplib internally. This may change at some
|
|
102
|
+
point in the future.
|
|
103
|
+
|
|
104
|
+
Installing IMAPClient
|
|
105
|
+
---------------------
|
|
106
|
+
IMAPClient is listed on PyPI and can be installed with `uv
|
|
107
|
+
<https://docs.astral.sh/uv/>`_::
|
|
108
|
+
|
|
109
|
+
uv add imapclient
|
|
110
|
+
|
|
111
|
+
More installation methods are described in the documentation.
|
|
112
|
+
|
|
113
|
+
Documentation
|
|
114
|
+
-------------
|
|
115
|
+
IMAPClient's manual is available at http://imapclient.readthedocs.io/.
|
|
116
|
+
Release notes can be found at
|
|
117
|
+
http://imapclient.readthedocs.io/#release-history.
|
|
118
|
+
|
|
119
|
+
See the `examples` directory in the root of project source for
|
|
120
|
+
examples of how to use IMAPClient.
|
|
121
|
+
|
|
122
|
+
Current Status
|
|
123
|
+
--------------
|
|
124
|
+
You should feel confident using IMAPClient for production purposes.
|
|
125
|
+
|
|
126
|
+
In order to clearly communicate version compatibility, IMAPClient
|
|
127
|
+
will strictly adhere to the `Semantic Versioning <http://semver.org>`_
|
|
128
|
+
scheme from version 1.0 onwards.
|
|
129
|
+
|
|
130
|
+
The project's home page is https://github.com/mjs/imapclient/ (this
|
|
131
|
+
currently redirects to the IMAPClient Github site). Details about
|
|
132
|
+
upcoming versions and planned features/fixes can be found in the issue
|
|
133
|
+
tracker on Github. The maintainers also blog about IMAPClient
|
|
134
|
+
news. Those articles can be found `here
|
|
135
|
+
<http://menno.io/tags/imapclient>`_.
|
|
136
|
+
|
|
137
|
+
Discussions
|
|
138
|
+
-----------
|
|
139
|
+
`Github Discussions`_ can be used to ask questions, propose changes or praise
|
|
140
|
+
the project maintainers :)
|
|
141
|
+
|
|
142
|
+
.. _`Github Discussions`: https://github.com/mjs/imapclient/discussions
|
|
143
|
+
|
|
144
|
+
Working on IMAPClient
|
|
145
|
+
---------------------
|
|
146
|
+
The `contributing documentation
|
|
147
|
+
<http://imapclient.rtfd.io/en/master/contributing.html>`_ contains
|
|
148
|
+
information for those interested in improving IMAPClient.
|
|
149
|
+
|
|
150
|
+
IMAP Servers
|
|
151
|
+
------------
|
|
152
|
+
IMAPClient is heavily tested against Dovecot, Gmail, Fastmail.fm
|
|
153
|
+
(who use a modified Cyrus implementation), Office365 and Yahoo. Access
|
|
154
|
+
to accounts on other IMAP servers/services for testing would be
|
|
155
|
+
greatly appreciated.
|
|
156
|
+
|
|
157
|
+
Interactive Console
|
|
158
|
+
-------------------
|
|
159
|
+
This script connects an IMAPClient instance using the command line
|
|
160
|
+
args given and starts an interactive session. This is useful for
|
|
161
|
+
exploring the IMAPClient API and testing things out, avoiding the
|
|
162
|
+
steps required to set up an IMAPClient instance.
|
|
163
|
+
|
|
164
|
+
The IPython shell is used if it is installed. Otherwise the
|
|
165
|
+
code.interact() function from the standard library is used.
|
|
166
|
+
|
|
167
|
+
The interactive console functionality can be accessed by running the
|
|
168
|
+
``imapclient-interact`` script that is installed alongside IMAPClient,
|
|
169
|
+
or by invoking the interact module like this::
|
|
170
|
+
|
|
171
|
+
uv run python -m imapclient.interact ...
|
|
172
|
+
|
|
173
|
+
"Live" Tests
|
|
174
|
+
------------
|
|
175
|
+
IMAPClient includes a series of live, functional tests which exercise
|
|
176
|
+
it against a live IMAP account. These are useful for ensuring
|
|
177
|
+
compatibility with a given IMAP server implementation.
|
|
178
|
+
|
|
179
|
+
The livetest functionality is run using the ``imapclient-livetest``
|
|
180
|
+
script that is installed alongside IMAPClient::
|
|
181
|
+
|
|
182
|
+
uv run imapclient-livetest <livetest.ini> [ optional unittest arguments ]
|
|
183
|
+
|
|
184
|
+
The configuration file format is
|
|
185
|
+
`described in the main documentation <http://imapclient.rtfd.io/#configuration-file-format>`_.
|
|
186
|
+
|
|
187
|
+
**WARNING**: The operations used by livetest are destructive and could
|
|
188
|
+
cause unintended loss of data. That said, as of version 0.9, livetest
|
|
189
|
+
limits its activity to a folder it creates and subfolders of that
|
|
190
|
+
folder. It *should* be safe to use with any IMAP account but please
|
|
191
|
+
don't run livetest against a truly important IMAP account.
|
|
192
|
+
|
|
193
|
+
Please include the output of imapclient-livetest with an issue if it
|
|
194
|
+
fails to run successfully against a particular IMAP server. Reports of
|
|
195
|
+
successful runs are also welcome. Please include the type and version
|
|
196
|
+
of the IMAP server, if known.
|
|
@@ -4,32 +4,20 @@ IMAPClient is an easy-to-use, Pythonic and complete IMAP client
|
|
|
4
4
|
library.
|
|
5
5
|
|
|
6
6
|
========================= ========================================
|
|
7
|
-
Current version
|
|
8
|
-
Supported Python versions
|
|
7
|
+
Current version 3.0.1
|
|
8
|
+
Supported Python versions 3.8 - 3.14
|
|
9
9
|
License New BSD
|
|
10
10
|
Project home https://github.com/mjs/imapclient/
|
|
11
11
|
PyPI https://pypi.python.org/pypi/IMAPClient
|
|
12
12
|
Documentation https://imapclient.readthedocs.io/
|
|
13
|
-
|
|
13
|
+
Discussions https://github.com/mjs/imapclient/discussions
|
|
14
|
+
Test Status |build master|
|
|
14
15
|
========================= ========================================
|
|
15
16
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
===================== ==============
|
|
20
|
-
``1.x`` unit tests |build 1.x|
|
|
21
|
-
``master`` unit tests |build master|
|
|
22
|
-
===================== ==============
|
|
23
|
-
|
|
24
|
-
.. |build 1.x| image:: https://travis-ci.org/mjs/imapclient.svg?branch=1.x
|
|
25
|
-
:target: https://travis-ci.org/mjs/imapclient/branches
|
|
26
|
-
:alt: 1.x branch
|
|
27
|
-
|
|
28
|
-
.. |build master| image:: https://travis-ci.org/mjs/imapclient.svg?branch=master
|
|
29
|
-
:target: https://travis-ci.org/mjs/imapclient/branches
|
|
17
|
+
.. |build master| image:: https://github.com/mjs/imapclient/actions/workflows/main.yml/badge.svg
|
|
18
|
+
:target: https://github.com/mjs/imapclient/actions
|
|
30
19
|
:alt: master branch
|
|
31
20
|
|
|
32
|
-
|
|
33
21
|
Features
|
|
34
22
|
--------
|
|
35
23
|
- Arguments and return values are natural Python types.
|
|
@@ -91,9 +79,10 @@ point in the future.
|
|
|
91
79
|
|
|
92
80
|
Installing IMAPClient
|
|
93
81
|
---------------------
|
|
94
|
-
IMAPClient is listed on PyPI and can be installed with
|
|
82
|
+
IMAPClient is listed on PyPI and can be installed with `uv
|
|
83
|
+
<https://docs.astral.sh/uv/>`_::
|
|
95
84
|
|
|
96
|
-
|
|
85
|
+
uv add imapclient
|
|
97
86
|
|
|
98
87
|
More installation methods are described in the documentation.
|
|
99
88
|
|
|
@@ -108,8 +97,7 @@ examples of how to use IMAPClient.
|
|
|
108
97
|
|
|
109
98
|
Current Status
|
|
110
99
|
--------------
|
|
111
|
-
You should feel confident using IMAPClient for production
|
|
112
|
-
purposes. Any problems found will be fixed quickly once reported.
|
|
100
|
+
You should feel confident using IMAPClient for production purposes.
|
|
113
101
|
|
|
114
102
|
In order to clearly communicate version compatibility, IMAPClient
|
|
115
103
|
will strictly adhere to the `Semantic Versioning <http://semver.org>`_
|
|
@@ -122,26 +110,12 @@ tracker on Github. The maintainers also blog about IMAPClient
|
|
|
122
110
|
news. Those articles can be found `here
|
|
123
111
|
<http://menno.io/tags/imapclient>`_.
|
|
124
112
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
will also be announced there.
|
|
130
|
-
|
|
131
|
-
The mailing list is hosted at `Groups.io
|
|
132
|
-
<http://groups.io>`_. Interaction via both email and the web is
|
|
133
|
-
supported. To join the list, see the list archives or just find out
|
|
134
|
-
more, visit https://groups.io/g/imapclient. The key details of the
|
|
135
|
-
list are:
|
|
136
|
-
|
|
137
|
-
* Post: imapclient@groups.io
|
|
138
|
-
* Subscribe: imapclient+subscribe@groups.io
|
|
139
|
-
* Unsubscribe: imapclient+unsubscribe@groups.io
|
|
140
|
-
* Web: https://groups.io/g/imapclient
|
|
141
|
-
* Web archives: https://groups.io/g/imapclient/messages
|
|
113
|
+
Discussions
|
|
114
|
+
-----------
|
|
115
|
+
`Github Discussions`_ can be used to ask questions, propose changes or praise
|
|
116
|
+
the project maintainers :)
|
|
142
117
|
|
|
143
|
-
|
|
144
|
-
inbox@menno.io.
|
|
118
|
+
.. _`Github Discussions`: https://github.com/mjs/imapclient/discussions
|
|
145
119
|
|
|
146
120
|
Working on IMAPClient
|
|
147
121
|
---------------------
|
|
@@ -166,11 +140,11 @@ steps required to set up an IMAPClient instance.
|
|
|
166
140
|
The IPython shell is used if it is installed. Otherwise the
|
|
167
141
|
code.interact() function from the standard library is used.
|
|
168
142
|
|
|
169
|
-
The interactive console functionality can be accessed running the
|
|
170
|
-
interact
|
|
171
|
-
interact module like this::
|
|
143
|
+
The interactive console functionality can be accessed by running the
|
|
144
|
+
``imapclient-interact`` script that is installed alongside IMAPClient,
|
|
145
|
+
or by invoking the interact module like this::
|
|
172
146
|
|
|
173
|
-
python -m imapclient.interact ...
|
|
147
|
+
uv run python -m imapclient.interact ...
|
|
174
148
|
|
|
175
149
|
"Live" Tests
|
|
176
150
|
------------
|
|
@@ -178,10 +152,10 @@ IMAPClient includes a series of live, functional tests which exercise
|
|
|
178
152
|
it against a live IMAP account. These are useful for ensuring
|
|
179
153
|
compatibility with a given IMAP server implementation.
|
|
180
154
|
|
|
181
|
-
The livetest functionality
|
|
182
|
-
|
|
155
|
+
The livetest functionality is run using the ``imapclient-livetest``
|
|
156
|
+
script that is installed alongside IMAPClient::
|
|
183
157
|
|
|
184
|
-
|
|
158
|
+
uv run imapclient-livetest <livetest.ini> [ optional unittest arguments ]
|
|
185
159
|
|
|
186
160
|
The configuration file format is
|
|
187
161
|
`described in the main documentation <http://imapclient.rtfd.io/#configuration-file-format>`_.
|
|
@@ -192,7 +166,7 @@ limits its activity to a folder it creates and subfolders of that
|
|
|
192
166
|
folder. It *should* be safe to use with any IMAP account but please
|
|
193
167
|
don't run livetest against a truly important IMAP account.
|
|
194
168
|
|
|
195
|
-
Please
|
|
196
|
-
to run successfully against a particular IMAP server. Reports of
|
|
169
|
+
Please include the output of imapclient-livetest with an issue if it
|
|
170
|
+
fails to run successfully against a particular IMAP server. Reports of
|
|
197
171
|
successful runs are also welcome. Please include the type and version
|
|
198
172
|
of the IMAP server, if known.
|
|
@@ -5,9 +5,8 @@
|
|
|
5
5
|
# version_info provides the version number in programmer friendly way.
|
|
6
6
|
# The 4th part will be either alpha, beta or final.
|
|
7
7
|
|
|
8
|
-
from
|
|
9
|
-
|
|
10
|
-
from .
|
|
11
|
-
from .
|
|
12
|
-
from .
|
|
13
|
-
from .version import author as __author__, version as __version__, version_info
|
|
8
|
+
from .imapclient import * # noqa: F401,F403
|
|
9
|
+
from .response_parser import * # noqa: F401,F403
|
|
10
|
+
from .tls import * # noqa: F401,F403
|
|
11
|
+
from .version import version as __version__ # noqa: F401
|
|
12
|
+
from .version import version_info # noqa: F401
|