I deploy my project to GAE over Github. There is some foreign API-key which I don't want to save in repository and make them public. Is it possible to set an environment variable for a project in GAE control panel so I can catch it in my application?
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Evil ctypes hack in python
- Correctly parse PDF paragraphs with Python
You can store your keys in datastore. Later when you need them in the code, you can fetch them from datastore and cache them by memcache.
You can define environment variables in configuration file for App Engine application. In case of Python, it is
app.yaml
You can find more details here.
There is no such a thing like project parameters that can be defined in Developers Console at the moment.
I prefer using the Datastore for keys like this. See the code in my answer at Securely storing environment variables in GAE with app.yaml
That code auto-generates placeholder values that you can then update from the developer console. Also, it uses the ndb library, so reading the keys is fast.