$npx skillfedfor your agent

aioimaplib

Python asyncio IMAP4rev1 client library

With conditionsPyPI Python ModulesReleased Jan 2025721.7K downloads / moGPL-3.0Pure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — aioimaplib-2.0.1-py3-none-any.whl
v2.0.1 · released 2025-01-16 · Python <4.0,>=3.9

Yes, if you need async IMAP access in a Python 3.9+ asyncio application and accept GPLv3 copyleft. The library is actively maintained, has zero known vulnerabilities, installs with no dependencies, and covers the majority of IMAP commands. Not suitable for proprietary closed-source projects due to license; consider alternatives if you need STARTTLS or AUTHENTICATE (non-XOAUTH2) support.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.9 or later.
  • IMAP4ClientProtocol is not thread-safe; each instance must run in the same thread.
  • Low friction: pure Python wheel with no runtime dependencies.

License · maintenance · safety

GPL-3.0 (copyleft) — GPLv3 copyleft license: any derivative work or software that links this library must also be released under GPLv3. Acceptable for open-source projects; requires careful review for proprietary or closed-source applications.

last release 2025-01-16 (575 days) · last repo commit 2026-05-19 · 168 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 721,738 downloads/mo, #5,230 on PyPI

Verify before relying

import asyncio
from aioimaplib import aioimaplib

async def check_mailbox(host, user, password):
    imap_client = aioimaplib.IMAP4_SSL(host=host)
    await imap_client.wait_hello_from_server()
    await imap_client.login(user, password)
    res, data = await imap_client.select()
    print(f'Messages in INBOX: {data[0]}')
    await imap_client.logout()

asyncio.run(check_mailbox('my.imap.server', 'user', 'pass'))
  • Whether OAuth2 support works reliably with Google Mail (documented as tested with Outlook only as of 2023-01-01)
  • Compatibility with IMAP servers beyond those listed (dovecot, Gmail, Outlook, Yahoo, free.fr, orange.fr, mailden.net)
Same gist for agents: .md · .json

What it is and what it does

aioimaplib is an asyncio port of Python's standard imaplib, designed to let you interact with IMAP mail servers using async/await syntax instead of blocking I/O. It has no runtime dependencies and implements 23 of 25 IMAP4rev1 commands from RFC 3501, plus RFC 2177 IDLE support for efficient server-push notification of new messages.

The library is tested against Python 3.9 through 3.12 and actively maintained. It handles concurrent IMAP commands according to protocol rules (sync commands block; async commands can run in parallel), supports SSL connections, and integrates with Python's standard logging. IDLE mode lets you wait for new mail without CPU-intensive polling by reading server pushes from an async queue. Note that close() only closes the mailbox state, not the TCP connection; you must call logout() to properly disconnect.

Use it for

  • Build a mail-fetching daemon that checks multiple IMAP accounts concurrently without blocking threads
  • Implement real-time email notifications using IDLE mode to wait for new messages on the server
  • Integrate IMAP mailbox access into an asyncio-based web service or bot without spawning threads
  • Migrate existing imaplib code to async/await for better concurrency in I/O-bound applications
  • Monitor multiple mailboxes in parallel and react to server-pushed events as they arrive

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need async IMAP access in a Python 3.9+ asyncio application and accept GPLv3 copyleft.

The library is actively maintained, has zero known vulnerabilities, installs with no dependencies, and covers the majority of IMAP commands. Not suitable for proprietary closed-source projects due to license; consider alternatives if you need STARTTLS or AUTHENTICATE (non-XOAUTH2) support.

Install

aioimaplib on PyPI

Before you install

Low friction: pure Python wheel with no runtime dependencies. Actively maintained with recent commits and tested against Python 3.9, 3.10, 3.11, 3.12.

Requires Python 3.9 or later. IMAP4ClientProtocol is not thread-safe; each instance must run in the same thread.

License in practice

GPLv3 copyleft license: any derivative work or software that links this library must also be released under GPLv3. Acceptable for open-source projects; requires careful review for proprietary or closed-source applications.

Quickstart

import asyncio
from aioimaplib import aioimaplib

async def check_mailbox(host, user, password):
    imap_client = aioimaplib.IMAP4_SSL(host=host)
    await imap_client.wait_hello_from_server()
    await imap_client.login(user, password)
    res, data = await imap_client.select()
    print(f'Messages in INBOX: {data[0]}')
    await imap_client.logout()

asyncio.run(check_mailbox('my.imap.server', 'user', 'pass'))

Verify before relying

  • Whether OAuth2 support works reliably with Google Mail (documented as tested with Outlook only as of 2023-01-01)
  • Compatibility with IMAP servers beyond those listed (dovecot, Gmail, Outlook, Yahoo, free.fr, orange.fr, mailden.net)

Package facts

LicenseGPL-3.0 copyleft
Python supportSupports the current Python release <4.0,>=3.9
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceActively maintained 575 days since the last release
Last repo commit
First released
Downloads721,738 / month, #5,230 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Intended Audience :: DevelopersLicense :: OSI Approved :: GNU General Public License v3 (GPLv3)Natural Language :: EnglishProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.9Topic :: Communications :: Email :: Post-Office :: IMAPTopic :: InternetTopic :: Software Development :: Libraries :: Python Modules

Evidence: aioimaplib-2.0.1-py3-none-any.whl

Tags

Capabilities
async imap clientasyncio email libraryimap4 asyncionon-blocking mail fetchimap idle supportpython async emailimap server connection
Topics
asyncioemail-protocolcopyleft-gpl
PyPI keywords
asynciomailimap

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “async imap client”

  • aioimaplibAn asyncio-based IMAP4rev1 client library that brings async/await…
  • IMAPClientIMAPClient provides a Pythonic interface to IMAP servers, handling…
  • imap-toolsA high-level Python library for IMAP email operations: fetch, search,…

Give your agent the search over MCP, or paste the wish link into any chat.

More Python Modules packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.

Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also IMAPClient · imap-tools · fastapi-mail · aiosmtplib · aiocoap · robotframework-imaplibrary2 · apache-airflow-providers-imap · aioresponses · mailsuite · aioftp