Skip to content

Commit 343afc5

Browse files
authored
Merge pull request #168 from SparkPost/issue-162
documented setting the API host
2 parents 1aaf586 + 6b3edb6 commit 343afc5

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

README.rst

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ SparkPost Python API client
2626
:target: http://slack.sparkpost.com
2727
:alt: Slack Community
2828

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

3131
Documentation
3232
-------------
@@ -68,6 +68,13 @@ Alternatively, you can pass the API key to the SparkPost class:
6868
from sparkpost import SparkPost
6969
sp = SparkPost('YOUR API KEY')
7070
71+
For SparkPost EU and Enterprise accounts, pass in a second parameter to set the API host.
72+
73+
.. code-block:: python
74+
75+
from sparkpost import SparkPost
76+
sp = SparkPost('YOUR API KEY', 'https://api.eu.sparkpost.com/api')
77+
7178
.. _API & SMTP: https://app.sparkpost.com/#/configuration/credentials
7279

7380

@@ -123,7 +130,7 @@ Then create or update your ``appengine_config.py`` file to include the following
123130
124131
import requests
125132
import requests_toolbelt.adapters.appengine
126-
133+
127134
requests_toolbelt.adapters.appengine.monkeypatch()
128135
129136
Then deploy your app and you should be able to send using python-sparkpost on Google Cloud.

docs/index.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ Alternatively, you can pass the API key to the SparkPost class:
3333
from sparkpost import SparkPost
3434
sp = SparkPost('YOUR API KEY')
3535
36+
For SparkPost EU and Enterprise accounts, pass in a second parameter to set the API host.
37+
38+
.. code-block:: python
39+
40+
from sparkpost import SparkPost
41+
sp = SparkPost('YOUR API KEY', 'https://api.eu.sparkpost.com/api')
42+
3643
.. _API & SMTP: https://app.sparkpost.com/configuration/credentials
3744

3845

0 commit comments

Comments
 (0)