{"id":13725111,"url":"https://github.com/mjs/imapclient","last_synced_at":"2025-10-08T18:33:09.283Z","repository":{"id":37103480,"uuid":"66842227","full_name":"mjs/imapclient","owner":"mjs","description":"An easy-to-use, Pythonic and complete IMAP client library","archived":false,"fork":false,"pushed_at":"2024-10-28T18:45:31.000Z","size":3586,"stargazers_count":537,"open_issues_count":63,"forks_count":87,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-05-08T14:58:44.505Z","etag":null,"topics":["imap","imap-client","python","python-2","python-3"],"latest_commit_sha":null,"homepage":"https://imapclient.readthedocs.io/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mjs.png","metadata":{"files":{"readme":"README.rst","changelog":"NEWS.rst","contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.rst","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-08-29T12:36:44.000Z","updated_at":"2025-04-17T17:04:55.000Z","dependencies_parsed_at":"2024-06-18T12:39:42.862Z","dependency_job_id":"da3597cb-35de-4e75-b156-3c4e132d80c7","html_url":"https://github.com/mjs/imapclient","commit_stats":{"total_commits":956,"total_committers":57,"mean_commits":"16.771929824561404","dds":"0.36924686192468614","last_synced_commit":"391cc6d66d35c16bed11292ff00835646cd50ae5"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mjs%2Fimapclient","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mjs%2Fimapclient/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mjs%2Fimapclient/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mjs%2Fimapclient/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mjs","download_url":"https://codeload.github.com/mjs/imapclient/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254067462,"owners_count":22009188,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["imap","imap-client","python","python-2","python-3"],"created_at":"2024-08-03T01:02:13.304Z","updated_at":"2025-10-08T18:33:04.245Z","avatar_url":"https://github.com/mjs.png","language":"Python","readme":"Essentials\n----------\nIMAPClient is an easy-to-use, Pythonic and complete IMAP client\nlibrary.\n\n=========================  ========================================\nCurrent version            3.0.1\nSupported Python versions  3.7 - 3.11\nLicense                    New BSD\nProject home               https://github.com/mjs/imapclient/\nPyPI                       https://pypi.python.org/pypi/IMAPClient\nDocumentation              https://imapclient.readthedocs.io/\nDiscussions                https://github.com/mjs/imapclient/discussions\nTest Status                |build master|\n=========================  ========================================\n\n.. |build master| image:: https://github.com/mjs/imapclient/actions/workflows/main.yml/badge.svg\n   :target: https://github.com/mjs/imapclient/actions\n   :alt: master branch\n\nFeatures\n--------\n- Arguments and return values are natural Python types.\n- IMAP server responses are fully parsed and readily usable.\n- IMAP unique message IDs (UIDs) are handled transparently. There is\n  no need to call different methods to use UIDs.\n- Escaping for internationalised mailbox names is transparently\n  handled.  Unicode mailbox names may be passed as input wherever a\n  folder name is accepted.\n- Time zones are transparently handled including when the server and\n  client are in different zones.\n- Convenience methods are provided for commonly used functionality.\n- Exceptions are raised when errors occur.\n\nExample\n-------\n\n.. code-block:: python\n\n    from imapclient import IMAPClient\n\n    # context manager ensures the session is cleaned up\n    with IMAPClient(host=\"imap.host.org\") as client:\n        client.login('someone', 'secret')\n        client.select_folder('INBOX')\n\n        # search criteria are passed in a straightforward way\n        # (nesting is supported)\n        messages = client.search(['NOT', 'DELETED'])\n\n        # fetch selectors are passed as a simple list of strings.\n        response = client.fetch(messages, ['FLAGS', 'RFC822.SIZE'])\n\n        # `response` is keyed by message id and contains parsed,\n        # converted response items.\n        for message_id, data in response.items():\n            print('{id}: {size} bytes, flags={flags}'.format(\n                id=message_id,\n                size=data[b'RFC822.SIZE'],\n                flags=data[b'FLAGS']))\n\nWhy IMAPClient?\n---------------\nYou may ask: \"why create another IMAP client library for Python?\nDoesn't the Python standard library already have imaplib?\".\n\nThe problem with imaplib is that it's very low-level. It expects\nstring values where lists or tuples would be more appropriate and\nreturns server responses almost unparsed. As IMAP server responses can\nbe quite complex this means everyone using imaplib ends up writing\ntheir own fragile parsing routines.\n\nAlso, imaplib doesn't make good use of exceptions. This means you need\nto check the return value of each call to imaplib to see if what you\njust did was successful.\n\nIMAPClient actually uses imaplib internally. This may change at some\npoint in the future.\n\nInstalling IMAPClient\n---------------------\nIMAPClient is listed on PyPI and can be installed with pip::\n\n    pip install imapclient\n\nMore installation methods are described in the documentation.\n\nDocumentation\n-------------\nIMAPClient's manual is available at http://imapclient.readthedocs.io/.\nRelease notes can be found at\nhttp://imapclient.readthedocs.io/#release-history.\n\nSee the `examples` directory in the root of project source for\nexamples of how to use IMAPClient.\n\nCurrent Status\n--------------\nYou should feel confident using IMAPClient for production purposes. \n\nIn order to clearly communicate version compatibility, IMAPClient\nwill strictly adhere to the `Semantic Versioning \u003chttp://semver.org\u003e`_\nscheme from version 1.0 onwards.\n\nThe project's home page is https://github.com/mjs/imapclient/ (this\ncurrently redirects to the IMAPClient Github site). Details about\nupcoming versions and planned features/fixes can be found in the issue\ntracker on Github. The maintainers also blog about IMAPClient\nnews. Those articles can be found `here\n\u003chttp://menno.io/tags/imapclient\u003e`_.\n\nDiscussions\n-----------\n`Github Discussions`_ can be used to ask questions, propose changes or praise\nthe project maintainers :)\n\n.. _`Github Discussions`: https://github.com/mjs/imapclient/discussions\n\nWorking on IMAPClient\n---------------------\nThe `contributing documentation\n\u003chttp://imapclient.rtfd.io/en/master/contributing.html\u003e`_ contains\ninformation for those interested in improving IMAPClient.\n\nIMAP Servers\n------------\nIMAPClient is heavily tested against Dovecot, Gmail, Fastmail.fm\n(who use a modified Cyrus implementation), Office365 and Yahoo. Access\nto accounts on other IMAP servers/services for testing would be\ngreatly appreciated.\n\nInteractive Console\n-------------------\nThis script connects an IMAPClient instance using the command line\nargs given and starts an interactive session. This is useful for\nexploring the IMAPClient API and testing things out, avoiding the\nsteps required to set up an IMAPClient instance.\n\nThe IPython shell is used if it is installed. Otherwise the\ncode.interact() function from the standard library is used.\n\nThe interactive console functionality can be accessed running the\ninteract.py script in the root of the source tree or by invoking the\ninteract module like this::\n\n    python -m imapclient.interact ...\n\n\"Live\" Tests\n------------\nIMAPClient includes a series of live, functional tests which exercise\nit against a live IMAP account. These are useful for ensuring\ncompatibility with a given IMAP server implementation.\n\nThe livetest functionality are run from the root of the project source\nlike this::\n\n    python livetest.py \u003clivetest.ini\u003e [ optional unittest arguments ]\n\nThe configuration file format is\n`described in the main documentation \u003chttp://imapclient.rtfd.io/#configuration-file-format\u003e`_.\n\n**WARNING**: The operations used by livetest are destructive and could\ncause unintended loss of data. That said, as of version 0.9, livetest\nlimits its activity to a folder it creates and subfolders of that\nfolder. It *should* be safe to use with any IMAP account but please\ndon't run livetest against a truly important IMAP account.\n\nPlease include the output of livetest.py with an issue if it fails\nto run successfully against a particular IMAP server. Reports of\nsuccessful runs are also welcome.  Please include the type and version\nof the IMAP server, if known.\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmjs%2Fimapclient","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmjs%2Fimapclient","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmjs%2Fimapclient/lists"}