Reputation: 625
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?
Upvotes: 2
Views: 3100
Reputation: 3604
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.
Upvotes: 2
Reputation: 648
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.
Upvotes: 4
Reputation: 8200
You can define environment variables in configuration file for App Engine application. In case of Python, it is app.yaml
env_variables:
MY_ENV_VAR: 'some_value'
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.
Upvotes: 1