Skip to content

pingram-io/example-python-email

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

example-python-email

Tutorial project for sending transactional emails from Python with Pingram.

What this tutorial shows

  • 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

Prerequisites

  • Python 3.10+
  • A Pingram API key

Setup

  1. Create and activate a virtual environment:
    • macOS/Linux: python3 -m venv .venv && source .venv/bin/activate
  2. Upgrade pip:
    • python -m pip install --upgrade pip
  3. Install this project:
    • pip install -e .
  4. Install the Pingram SDK:
    • pip install pingram

Configure your API key

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.

Run the tutorial

example-python-email

If successful, the script prints the Pingram API response.

Project structure

  • src/example_python_email/main.py - tutorial entry point and email send example
  • pyproject.toml - package metadata and CLI script entrypoint

About

Tutorial project for sending transactional emails from Python with Pingram.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages