Skip to content

Commit 3346722

Browse files
committed
documented setting the api host
1 parent 21b2404 commit 3346722

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

README.rst

Lines changed: 10 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

3232
Installation
@@ -60,6 +60,13 @@ Alternatively, you can pass the API key to the SparkPost class:
6060
from sparkpost import SparkPost
6161
sp = SparkPost('YOUR API KEY')
6262
63+
For SparkPost EU and Enterprise customers, you can pass in a second parameter to set the API host.
64+
65+
.. code-block:: python
66+
67+
from sparkpost import SparkPost
68+
sp = SparkPost('YOUR API KEY', 'https://api.eu.sparkpost.com/api')
69+
6370
.. _API & SMTP: https://app.sparkpost.com/#/configuration/credentials
6471

6572

@@ -115,11 +122,12 @@ Then create or update your ``appengine_config.py`` file to include the following
115122
116123
import requests
117124
import requests_toolbelt.adapters.appengine
118-
125+
119126
requests_toolbelt.adapters.appengine.monkeypatch()
120127
121128
Then deploy your app and you should be able to send using python-sparkpost on Google Cloud.
122129

130+
123131
Documentation
124132
-------------
125133

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 customers, you can 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)