diff --git a/environments/python3/README.md b/environments/python3/README.md index 7b6c318a..cd9de2f0 100644 --- a/environments/python3/README.md +++ b/environments/python3/README.md @@ -8,11 +8,12 @@ requirements.txt file. ## Customizing this image -Most commonly you might want to add package dependencies. Edit -requirements.txt to add what you need, and rebuild this image. +To add package dependencies, edit requirements.txt to add what you +need, and rebuild this image (instructions below). You also may want to customize what's available to the function in its -context. You can do this by editing server.py. +request context. You can do this by editing server.py (see the +comment in that file about customizing request context). ## Rebuilding and pushing the image diff --git a/environments/python3/server.py b/environments/python3/server.py index 5c64a79a..91366509 100644 --- a/environments/python3/server.py +++ b/environments/python3/server.py @@ -24,6 +24,8 @@ def f(): print("Generic container: no requests supported") abort(500) # + # Customizing the request context + # # If you want to pass something to the function, you can add it to 'g': # g.myKey = myValue # And the user func can then access that (after doing a "from flask import g").