Tutorial project for sending transactional emails from Python with Pingram.
- Installing and running a small Python CLI app
- Sending an email using the Pingram Python client
- Structuring a simple async request with recipient and email payload data
- Python 3.10+
- A Pingram API key
- Create and activate a virtual environment:
- macOS/Linux:
python3 -m venv .venv && source .venv/bin/activate
- macOS/Linux:
- Upgrade pip:
python -m pip install --upgrade pip
- Install this project:
pip install -e .
- Install the Pingram SDK:
pip install pingram
Update src/example_python_email/main.py and replace YOUR_API_KEY with your actual Pingram API key.
For production code, prefer loading secrets from environment variables instead of hardcoding values.
example-python-emailIf successful, the script prints the Pingram API response.
src/example_python_email/main.py- tutorial entry point and email send examplepyproject.toml- package metadata and CLI script entrypoint