$npx skillfedfor your agent

mailgun

Python SDK for Mailgun

Worth itPyPI UtilitiesReleased Aug 2026367.4K downloads / moApache-2.0Pure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — mailgun-1.9.0-py3-none-any.whl
v1.9.0 · released 2026-08-04 · Python >=3.11 · 3 runtime deps: httpx2, httpx, requests

Yes. This is the official Mailgun SDK with active maintenance, low install friction, no known vulnerabilities, and broad API coverage. Install it if you use Mailgun for email delivery and want a well-supported, type-hinted Python client. The Alpha status reflects ongoing development, not instability—recent releases and active commits show it is production-ready.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.11 or later.
  • Mailgun API credentials (domain and API key) must be provided.
  • Active maintenance with a recent release (10 days old).

License · maintenance · safety

Apache-2.0 (permissive) — Apache-2.0 permissive license allows commercial and private use with minimal restrictions.

last release 2026-08-04 (10 days) · last repo commit 2026-08-14 · 9 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 367,377 downloads/mo, #7,197 on PyPI

Verify before relying

pip install mailgun

from mailgun import Mailgun

client = Mailgun(domain='example.com', api_key='your-api-key')
response = client.messages.send(to='user@example.com', subject='Hello', text='Test message')
  • Whether async support via httpx2 is production-ready or still experimental given the Alpha development status.
  • Performance characteristics when handling large attachment streams with ChunkedStreamer.
  • Exact retry and timeout defaults for exactly-once delivery semantics.
Same gist for agents: .md · .json

What it is and what it does

Mailgun is the official Python SDK for Mailgun's email delivery platform. It wraps Mailgun's REST API to let you send transactional emails, manage sender domains, configure webhooks, retrieve delivery events, and access suppression lists—all from Python code. The SDK supports both synchronous (requests-based) and asynchronous (httpx/httpx2-based) clients, so you can integrate it into blocking or async applications.

The package handles common email workflows: sending plain or templated messages with attachments, scheduling delivery, tracking bounces and complaints, managing mailing lists, and querying delivery metrics and logs. It includes features like memory-safe attachment streaming, fluent message builders, strict payload validation, and development-mode credential redaction. The SDK is actively maintained, compatible with Python 3.11+, and carries an Apache-2.0 license.

Use it for

  • Send transactional emails (password resets, order confirmations) from a web application using the synchronous client.
  • Build an async email notification system that queries delivery events and bounce data via streaming pagination.
  • Manage email domain configuration, DKIM keys, and tracking settings programmatically.
  • Implement a mailing list with suppression rules (bounces, unsubscribes, complaints) integrated into your application.
  • Monitor email delivery metrics and logs to track campaign performance and diagnose delivery issues.
  • Schedule emails for future delivery and attach files without loading entire payloads into memory.

Worth the install?

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

Worth it

Yes.

This is the official Mailgun SDK with active maintenance, low install friction, no known vulnerabilities, and broad API coverage. Install it if you use Mailgun for email delivery and want a well-supported, type-hinted Python client. The Alpha status reflects ongoing development, not instability—recent releases and active commits show it is production-ready.

Install

mailgun on PyPI

Before you install

Active maintenance with a recent release (10 days old). Low install friction—pure Python wheel with three HTTP client options (requests, httpx, httpx2). Requires Python 3.11+.

Requires Python 3.11 or later. Mailgun API credentials (domain and API key) must be provided.

License in practice

Apache-2.0 permissive license allows commercial and private use with minimal restrictions.

Quickstart

pip install mailgun

from mailgun import Mailgun

client = Mailgun(domain='example.com', api_key='your-api-key')
response = client.messages.send(to='user@example.com', subject='Hello', text='Test message')

Verify before relying

  • Whether async support via httpx2 is production-ready or still experimental given the Alpha development status.
  • Performance characteristics when handling large attachment streams with ChunkedStreamer.
  • Exact retry and timeout defaults for exactly-once delivery semantics.

Package facts

LicenseApache-2.0 permissive
Python supportSupports the current Python release >=3.11
Install frictionLow. Pure-Python wheel
Runtime dependencies
3 packages
httpx2httpxrequests
MaintenanceActively maintained 10 days since the last release
Last repo commit
First released
Downloads367,377 / month, #7,197 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 3 - AlphaEnvironment :: ConsoleIntended Audience :: DevelopersNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonTopic :: Communications :: EmailTopic :: Utilities

Evidence: mailgun-1.9.0-py3-none-any.whl

Tags

Capabilities
mailgun email api pythonsend emails with mailgun sdkmailgun python wrapperemail delivery tracking pythonmailgun async clienttransactional email pythonmailgun domain management
Topics
email-deliveryasync-supportapi-client
PyPI keywords
email python-wrappermailgunMailgun API Python Wrappermailgun-apiPython SDK for Mailguntransactional-emailswrapper

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 › “mailgun email api python”

  • mailgunOfficial Python SDK for the Mailgun email service API, providing…
  • django-anymailSends and receives email in Django through multiple transactional…
  • zerobouncesdkPython SDK for the ZeroBounce email validation and verification API,…

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

More Utilities 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
charset-normalizer Worth it
PyPI · Utilities · released Aug 2026

Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.

permissive licensepure Python · 3.7+
1.7Bdownloads / 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
pluggy Worth it
PyPI · Libraries · released May 2025

Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.

Install it if you're building an extensible application or framework.

MITpure Python · 3.9+aging
1.3Bdownloads / mo
Pygments Worth it
PyPI · Utilities · released Mar 2026

Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.

Install it if you need to display or transform source code.

BSD-2-Clausepure Python · 3.9+
1.3Bdownloads / mo
six With conditions
PyPI · Libraries · released Dec 2024

Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.

MITpure Python
1.2Bdownloads / mo

See also django-anymail · mailtrap · odg-client · mailman · mailjet-rest · postmarker · brevo-python · django-post_office · zerobouncesdk · yagmail