Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to Cloud NDB to prepare for Python3 upgrade #140

Merged
merged 1 commit into from Apr 21, 2020
Merged

Conversation

aktech
Copy link
Member

@aktech aktech commented Apr 17, 2020

Fixes #139

This implementation is based on:
https://cloud.google.com/appengine/docs/standard/python3/migrating-to-cloud-ndb

  • Replaced Python 2 only NDB library with Cloud NDB from google.cloud import ndb
  • Introduces appengine_config.py to include third party libraries, which are not supported by GAE natively.
  • Includes client_secret.json in the App deployment to allow access to Datastore from app engine
  • Got rid of travis.py and added instructions to run tests via simple commands
  • Configured requests to use URLFetch See this
  • Added basic logging for debugging

We have two requirements file at the moment:

  • local_requirements.txt: This is required for local development only, See this
  • requirements.txt: This is installed in the lib folder for local as well as deployed environment.

Changes from Google App engine console:

  • Added the role Cloud Datastore Owner to the service account to be able to access Datastore from app engine App.

cc @asmeurer @certik

This implementation is based on:
https://cloud.google.com/appengine/docs/standard/python3/migrating-to-cloud-ndb

- [x] Replaced Python 2 only NDB library with Cloud NDB `from google.cloud import ndb`
- [x] Introduces `appengine_config.py` to include third party libraries, which are not supported by GAE natively.
- [x] Includes `client_secret.json` in the App deployment to allow access to Datastore from app engine
- [x] Got rid of `travis.py` and added instructions to run tests via simple commands
- [x] Configured requests to use URLFetch See [this](https://cloud.google.com/appengine/docs/standard/python/issue-requests#requests)
- [x] Added basic logging for debugging

We have two requirements file at the moment:
- `local_requirements.txt`: This is required for local development only, See [this](https://cloud.google.com/appengine/docs/standard/python/tools/using-libraries-python-27#local_development)
- `requirements.txt`: This is installed in the `lib` folder for local as well as deployed environment.

Changes from Google App engine console:
- [x] Added the role `Cloud Datastore Owner` to the service account to be able to access Datastore from app engine App.
@aktech aktech requested a review from asmeurer Apr 17, 2020
@aktech aktech added the GAE-Python3 Everything related to upgrading to Google App engine's Python3 runtime label Apr 17, 2020
@aktech
Copy link
Member Author

aktech commented Apr 17, 2020

@aktech
Copy link
Member Author

aktech commented Apr 19, 2020

Will merge in 48 hours if no objection.

@aktech aktech merged commit 64bf6ab into master Apr 21, 2020
@aktech aktech deleted the cloud-ndb branch Apr 23, 2020
@aktech aktech added this to Done in GAE Python 3 Jun 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GAE-Python3 Everything related to upgrading to Google App engine's Python3 runtime
Projects
No open projects
GAE Python 3
  
Done
Development

Successfully merging this pull request may close these issues.

Migrate to Cloud NDB
1 participant