|
24 | 24 | - [conda & make](#conda--make) |
25 | 25 | - [For development](#for-development) |
26 | 26 | - [Using conda](#using-conda) |
| 27 | + - [Management script](#management-script) |
27 | 28 | - [Authentication](#authentication) |
28 | 29 | - [Quick Start](#quick-start) |
29 | 30 | - [Advanced Configuration](#advanced-configuration) |
|
34 | 35 | - [Logging & Debugging](#logging--debugging) |
35 | 36 | - [IDE Autocompletion & DX](#ide-autocompletion--dx) |
36 | 37 | - [URL path](#url-path) |
| 38 | +- [Performance & Architecture](#performance--architecture) |
| 39 | +- [Security Guardrails](#security-guardrails) |
37 | 40 | - [Request examples](#request-examples) |
38 | 41 | - [Full list of supported endpoints](#full-list-of-supported-endpoints) |
39 | 42 | - [Send API (v3.1)](#send-api-v31) |
@@ -127,6 +130,26 @@ make dev-full |
127 | 130 | conda activate mailjet-dev |
128 | 131 | ``` |
129 | 132 |
|
| 133 | +#### Management script |
| 134 | + |
| 135 | +We provide a universal management script (`manage.sh`) to simplify local development, testing, and linting. |
| 136 | + |
| 137 | +```bash |
| 138 | +# 1. Setup the conda environment and pre-commit hooks |
| 139 | +./manage.sh env_setup |
| 140 | +conda activate mailjet-dev |
| 141 | + |
| 142 | +# 2. Run the test suite (Unit + Integration) |
| 143 | +./manage.sh test_all |
| 144 | + |
| 145 | +# 3. Run the performance profilers |
| 146 | +./manage.sh perf_bench |
| 147 | + |
| 148 | +# 4. Format and lint the code |
| 149 | +./manage.sh format |
| 150 | +./manage.sh lint |
| 151 | +``` |
| 152 | + |
130 | 153 | ## Authentication |
131 | 154 |
|
132 | 155 | The Mailjet Email API uses your API and Secret keys for authentication. [Grab][api_credential] and save your Mailjet API credentials securely in your environment variables. |
@@ -289,6 +312,23 @@ mailjet = Client(auth=(api_key, api_secret), version="v1") |
289 | 312 | result = mailjet.data_images.get() |
290 | 313 | ``` |
291 | 314 |
|
| 315 | +## Performance & Architecture |
| 316 | + |
| 317 | +The Mailjet SDK `v1.6.0+` has been heavily optimized for high-concurrency and memory-constrained environments (like AWS Lambda). |
| 318 | +It utilizes `__slots__` for memory density, immutable `MappingProxyType` headers for zero-allocation merging, and O(1) dynamic endpoint caching. |
| 319 | + |
| 320 | +For a detailed breakdown of our nanosecond routing benchmarks and instructions on how to profile the SDK, please read our [Performance & Architecture Guide](PERFORMANCE.md). |
| 321 | + |
| 322 | +## Security Guardrails |
| 323 | + |
| 324 | +The SDK includes active protections against common API vulnerabilities: |
| 325 | + |
| 326 | +- **SSRF & Open Redirects:** Hard-disabled automatic redirects and enforced strict hostname validation. |
| 327 | +- **CRLF Injection:** Native string evaluation blocks header injection attempts via compromised Bearer tokens or custom headers. |
| 328 | +- **PEP 578 Audit Hooks:** The SDK emits native Python audit events (`sys.audit`) for all outbound network egress and explicitly warns if TLS verification is bypassed. |
| 329 | + |
| 330 | +See our [SECURITY.md](SECURITY.md) for our vulnerability disclosure policy and supported versions. |
| 331 | + |
292 | 332 | ## Request examples |
293 | 333 |
|
294 | 334 | ### Full list of supported endpoints |
|
0 commit comments