Skip to content

Migrate to Cloud NDB to prepare for Python3 upgrade - #140

Merged
aktech merged 1 commit into
masterfrom
cloud-ndb
Apr 21, 2020
Merged

Migrate to Cloud NDB to prepare for Python3 upgrade#140
aktech merged 1 commit into
masterfrom
cloud-ndb

Conversation

@aktech

@aktech aktech commented Apr 17, 2020

Copy link
Copy Markdown
Member

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 April 17, 2020 17:14
@aktech aktech added the GAE-Python3 Everything related to upgrading to Google App engine's Python3 runtime label Apr 17, 2020
@aktech

aktech commented Apr 17, 2020

Copy link
Copy Markdown
Member Author

@aktech

aktech commented Apr 19, 2020

Copy link
Copy Markdown
Member Author

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 April 23, 2020 14:18
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

None yet

Development

Successfully merging this pull request may close these issues.

Migrate to Cloud NDB

1 participant