SparkPost Python API client¶
The super-mega-official Python package for using the SparkPost API.
Authorization¶
Go to API & SMTP in the SparkPost app and create an API key. We recommend using the SPARKPOST_API_KEY
environment variable:
from sparkpost import SparkPost
sp = SparkPost() # uses environment variable
Alternatively, you can pass the API key to the SparkPost class:
from sparkpost import SparkPost
sp = SparkPost('YOUR API KEY')
Resources¶
The following resources are available in python-sparkpost:
API reference¶
Auto-generated API reference for python-sparkpost:
Using in Django¶
Configure Django to use SparkPost email backend
Additional documentation¶
The underlying SparkPost API is documented at the official SparkPost API Reference.
Contribute¶
- Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug.
- Fork the repository on GitHub and make your changes in a branch on your fork
- Write a test which shows that the bug was fixed or that the feature works as expected.
- Send a pull request. Make sure to add yourself to AUTHORS.