Sign up for a SparkPost account and visit our Developer Hub for even more content.
This sample app demonstrates how to send email with Python and python-sparkpost on the Google App Engine standard environment.
- a Google Cloud Platform account
- the Google Cloud SDK installed and configured
-
Sign up for a SparkPost account here.
-
Create an API key with Transmissions: read/write privilege here.
-
Add your API key to
app.yaml
. -
Install the app's dependencies:
mkdir lib pip install -r requirements -t lib
-
Run the app using the Google Cloud SDK dev app server:
$GCLOUD_SDK/bin/dev_appserver.py app.yaml
-
Visit the app in your browser: http://localhost:8080/
-
Deploy the app and dependencies to your Google Cloud project:
gcloud app deploy
-
Visit the app in your browser:
gcloud app browse
pip install pytest responses flaky
pytest main_test.py