--- id: exchangelib version: "5.6.0" license: BSD-2-Clause license_treatment: permissive maintenance: active --- # exchangelib — Client for Microsoft Exchange Web Services (EWS) License: permissive · Maintenance: active · Downloads: 2.0M/mo ## What it is and what it does exchangelib is a Django-style ORM wrapper around Microsoft Exchange Web Services (EWS), designed to simplify programmatic access to on-premise Exchange 2007-2016 servers and Office365. It abstracts the complexity of the EWS protocol, offering a Pythonic interface for common mailbox operations: searching, creating, updating, and deleting items across mail, calendar, tasks, contacts, and distribution lists. The library includes built-in autodiscover support to locate the correct EWS endpoint automatically. The package depends on 12 runtime libraries including requests for HTTP communication, defusedxml for secure XML parsing, OAuth support via oauthlib and requests_oauthlib, NTLM authentication via requests_ntlm, and timezone handling through tzdata and tzlocal. It requires Python 3.10 or later and is distributed as a pure Python wheel, making installation straightforward across platforms. Use it for: - Automate mailbox management tasks like archiving, filtering, or bulk-moving emails based on custom criteria. - Sync Exchange calendar events to external systems or build calendar-aware applications. - Extract contact information and distribution lists for directory synchronization or reporting. - Build monitoring or audit tools that query mailbox metadata and message properties. - Integrate Office365 mailbox data into data pipelines or ETL workflows. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. exchangelib is an ORM-style client library for Microsoft Exchange Web Services (EWS), providing programmatic access to Exchange mailbox data including mail, calendar, tasks, contacts, and distribution lists. Yes, if you need to programmatically interact with Exchange or Office365 mailboxes. The library is actively maintained, has no known vulnerabilities, low install friction, and a permissive license. The Python 3.10+ requirement and dependency on network connectivity to an Exchange server are the only real constraints; verify autodiscover and authentication methods match your deployment before committing. ## Install pip install exchangelib uv add exchangelib poetry add exchangelib ## Installing exchangelib Before you install: Low install friction with a pure Python wheel distribution. The package is actively maintained with a recent release and 1268 repository stars, indicating stable community adoption. License in practice: BSD-2-Clause is a permissive license that allows commercial and private use with minimal restrictions, making this package suitable for most projects. Quickstart: from exchangelib import Credentials, Account credentials = Credentials("user@example.com", "password") account = Account("user@example.com", credentials=credentials, autodiscover=True) for item in account.inbox.all()[:10]: print(item.subject, item.sender) Requires Python 3.10 or later; Exchange server connectivity and valid credentials required. Verify before relying: - Whether autodiscover works reliably across all Exchange versions (2007-2016) and Office365 tenants. - Performance characteristics when handling large mailboxes or complex queries. - Specific authentication methods supported beyond basic credentials and OAuth. ## Package facts - License: BSD-2-Clause (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 2.0M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags exchange web services client, microsoft exchange mailbox access, ews python library, office365 mailbox automation, exchange calendar contacts tasks, email-automation, exchange-integration [View on SkillFed](https://skillfed.io/packages/exchangelib) · [View on PyPI](https://pypi.org/project/exchangelib/)