Skip to content

Commit b78b2df

Browse files
authored
Add instructions for Google Cloud
1 parent d349540 commit b78b2df

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,26 @@ Replace *API_KEY* with an actual API key that you've generated in `Get a Key`_ s
9999

100100
.. _full documentation: https://python-sparkpost.readthedocs.io/en/latest/django/backend.html
101101

102+
Using with Google Cloud
103+
-----------------------
104+
There are a few simple modifications necessary to enable the use of the underlying ``requests`` library that python-sparkpost uses. First, add the ``requests`` and ``requests-toolbelt`` to your project's ``requirements.txt``:
105+
106+
.. code-block::
107+
108+
requests
109+
requests-toolbelt
110+
111+
Then create or update your ``appengine_config.py`` file to include the following:
112+
113+
.. code-block:: python
114+
115+
import requests
116+
import requests_toolbelt.adapters.appengine
117+
118+
requests_toolbelt.adapters.appengine.monkeypatch()
119+
120+
Then deploy your app and you should be able to send using python-sparkpost on Google Cloud.
121+
102122
Documentation
103123
-------------
104124

0 commit comments

Comments
 (0)