Skip to content

Commit

Permalink
documented setting the api host
Browse files Browse the repository at this point in the history
  • Loading branch information
avigoldman committed May 2, 2018
1 parent 21b2404 commit 3346722
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
12 changes: 10 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ SparkPost Python API client
:target: http://slack.sparkpost.com
:alt: Slack Community

The super-mega-official Python package for using the SparkPost API.
The official Python package for using the SparkPost API.


Installation
Expand Down Expand Up @@ -60,6 +60,13 @@ Alternatively, you can pass the API key to the SparkPost class:
from sparkpost import SparkPost
sp = SparkPost('YOUR API KEY')
For SparkPost EU and Enterprise customers, you can pass in a second parameter to set the API host.

.. code-block:: python
from sparkpost import SparkPost
sp = SparkPost('YOUR API KEY', 'https://api.eu.sparkpost.com/api')
.. _API & SMTP: https://app.sparkpost.com/#/configuration/credentials


Expand Down Expand Up @@ -115,11 +122,12 @@ Then create or update your ``appengine_config.py`` file to include the following
import requests
import requests_toolbelt.adapters.appengine
requests_toolbelt.adapters.appengine.monkeypatch()
Then deploy your app and you should be able to send using python-sparkpost on Google Cloud.


Documentation
-------------

Expand Down
7 changes: 7 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ Alternatively, you can pass the API key to the SparkPost class:
from sparkpost import SparkPost
sp = SparkPost('YOUR API KEY')
For SparkPost EU and Enterprise customers, you can pass in a second parameter to set the API host.

.. code-block:: python
from sparkpost import SparkPost
sp = SparkPost('YOUR API KEY', 'https://api.eu.sparkpost.com/api')
.. _API & SMTP: https://app.sparkpost.com/configuration/credentials


Expand Down

0 comments on commit 3346722

Please sign in to comment.