skillfed

mailjet-rest

Mailjet V3 API wrapper

mailjet-rest v1.7.0 1.2M downloads/30d#4,191 on PyPI121
Permissive license MIT Active released

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-rest

uv

uv add mailjet-rest

poetry

poetry add mailjet-rest

Installing 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

Development Status :: 4 - BetaEnvironment :: ConsoleIntended Audience :: DevelopersNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonTopic :: Communications :: EmailTopic :: Utilities

Tags

mailjet email api pythonsend transactional emails pythonmailjet api wrapperemail delivery python sdkmailjet client library
email-deliverytransactional-emailmailjet

More Utilities packages