mailjet-rest
Mailjet V3 API wrapper
What it is and what it does
mailjet-rest is the official Python client for Mailjet's email delivery APIs. It wraps Mailjet's v3, v3.1 (Send API), and v1 (Content API) endpoints, handling authentication, request serialization, and error handling so you can send transactional emails, manage contacts, and interact with templates and segmentation features without building HTTP calls manually.
The package is designed for Python 3.10+ and emphasizes resource safety through context manager support, local-first payload validation, and type hints for IDE autocompletion. It supports both simple email sends and complex payloads via a MessageBuilder, and returns raw response objects for standard HTTP errors rather than raising exceptions, giving you fine-grained control over error handling.
Use it for:
- Send transactional emails (password resets, order confirmations) from your application.
- Manage Mailjet contacts, templates, and campaigns programmatically.
- Build and send complex multi-recipient emails with attachments and custom headers.
- Integrate email delivery into a web application using the Send API v3.1.
- Monitor email statistics and webhook events through the Email API ecosystem.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A Python wrapper for the Mailjet Email API that handles authentication, request building, and response parsing for sending emails and managing email-related resources through Mailjet's v3, v3.1, and v1 endpoints.
Yes. The package is actively maintained, has no known vulnerabilities, carries a permissive MIT license, and requires only two lightweight runtime dependencies. Install it if you need to send email through Mailjet from Python—it's the official client and handles authentication and request building for you. The main prerequisite is having valid Mailjet API credentials and Python 3.10 or later.
Install
mailjet-rest on PyPI
pip
pip install mailjet-restuv
uv add mailjet-restpoetry
poetry add mailjet-restInstalling mailjet-rest
Before you install
Low friction installation with only two runtime dependencies (requests and typing-extensions). The package is actively maintained with a recent release and no known vulnerabilities.
License in practice
MIT license permits commercial and private use with minimal restrictions—you may use, modify, and distribute the package freely as long as you include the license notice.
Quickstart
pip install mailjet-rest
import os
from mailjet_rest import Client
api_key = os.environ.get("MJ_APIKEY_PUBLIC")
api_secret = os.environ.get("MJ_APIKEY_PRIVATE")
with Client(auth=(api_key, api_secret), version="v3.1") as mailjet:
data = {
"Messages": [{
"From": {"Email": "sender@example.com"},
"To": [{"Email": "recipient@example.com"}],
"Subject": "Test",
"TextPart": "Hello"
}]
}
result = mailjet.send.create(data=data)
print(result.status_code)
Requires Mailjet API credentials (MJ_APIKEY_PUBLIC and MJ_APIKEY_PRIVATE environment variables) and Python >= 3.10.
Verify before relying
- Whether the package supports async/await patterns for non-blocking email sends.
- Rate-limiting behavior and retry logic for failed API requests.
- Whether webhook handling or parse API integration is built-in or requires additional setup.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — requests, typing-extensions |
| Maintenance | actively maintained — 63 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,227,363/month — #4,191 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: mailjet_rest-1.7.0-py3-none-any.whl
Keywords: Mailjet API v3 / v3.1 Python Wrapper, wrapper, email python-wrapper, transactional-emails, mailjet, mailjet-api
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
sailthru-clientA Python client library for the Sailthru REST…
permissive · top 15,000 on PyPI
mailchimp-transactionalA Python client library for the Mailchimp…
unclear · top 15,000 on PyPI
sib-api-v3-sdkPython SDK for the SendinBlue REST API,…
unclear · top 15,000 on PyPI
mailgunOfficial Python SDK for the Mailgun email…
permissive · top 15,000 on PyPI
django-anymailSends and receives email in Django through…
permissive · top 5,000 on PyPI
mailtrapOfficial Python client for Mailtrap's email…
permissive · top 15,000 on PyPI
notifications-python-clientA Python client library for sending emails,…
permissive · top 15,000 on PyPI
django-rest-passwordresetProvides REST API endpoints for Django…
permissive · top 15,000 on PyPI
mandrillMandrill is a deprecated Python API client and…
permissive · top 15,000 on PyPI
mjmlConverts MJML (a markup language for responsive…
permissive · top 15,000 on PyPI