-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Create a unified README for ndb samples #16
Closed
Closed
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
8ce42e7
Initial commit from datastore-samples
elibixby 5d5a402
Updated cloning instruction
elibixby 7e0e6b4
Merge branch 'master' of https://github.com/GoogleCloudPlatform/pytho…
elibixby 36dee04
Merge branch 'master' of https://github.com/GoogleCloudPlatform/pytho…
elibixby 0ba7edf
Merge branch 'master' of https://github.com/GoogleCloudPlatform/pytho…
elibixby 346b54f
Use single README for datastore
elibixby a9f34ac
Merge branch 'master' of https://github.com/GoogleCloudPlatform/pytho…
elibixby 9db19b1
Removed merge artifacts
elibixby 9b9c203
Added file from remote
elibixby File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,58 @@ | ||
appengine-ndb-snippets | ||
====================== | ||
## NDB Overview Sample | ||
|
||
Sample code snippets for NDB. | ||
This is a sample app for Google App Engine that exercises the [NDB Python API](https://cloud.google.com/appengine/docs/python/ndb/). | ||
|
||
See our other [Google Cloud Platform github | ||
repos](https://github.com/GoogleCloudPlatform) for sample applications and | ||
scaffolding for other python frameworks and use cases. | ||
|
||
## Run Locally | ||
1. Install the [Google Cloud SDK](https://cloud.google.com/sdk/), including the [gcloud tool](https://cloud.google.com/sdk/gcloud/), and [gcloud app component](https://cloud.google.com/sdk/gcloud-app). | ||
2. Setup the gcloud tool. | ||
|
||
``` | ||
gcloud components update app | ||
gcloud auth login | ||
gcloud config set project <your-app-id> | ||
``` | ||
You don't need a valid app-id to run locally, but will need a valid id to deploy below. | ||
|
||
1. Clone this repo. | ||
|
||
``` | ||
git clone https://github.com/GoogleCloudPlatform/python-docs-samples.git | ||
cd python-docs-samples/datastore/ndb/<sub-directory> | ||
``` | ||
|
||
1. Run this project locally from the command line. | ||
|
||
``` | ||
gcloud preview app run ./ | ||
``` | ||
|
||
1. Visit the application at [http://localhost:8080](http://localhost:8080). | ||
|
||
## Deploying | ||
|
||
1. Use the [Cloud Developer Console](https://console.developer.google.com) to create a project/app id. (App id and project id are identical) | ||
2. Configure gcloud with your app id. | ||
|
||
``` | ||
gcloud config set project <your-app-id> | ||
``` | ||
1. Use the [Admin Console](https://appengine.google.com) to view data, queues, and other App Engine specific administration tasks. | ||
1. Use gcloud to deploy your app. | ||
|
||
``` | ||
gcloud preview app deploy ./ | ||
``` | ||
|
||
1. Congratulations! Your application is now live at your-app-id.appspot.com | ||
|
||
## Contributing changes | ||
|
||
* See [CONTRIBUTING.md](../../CONTRIBUTING.md) | ||
|
||
## Licensing | ||
|
||
* See [LICENSE](../../LICENSE) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually you can not run datastore/ndb/modeling. You can only run the tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we make it runnable, or update the README to make it clear that not all sub-directories can be run (leaning towards the former).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Making the modeling subdir runnable in a meaningful way is somewhat cumbersome. Personally I'm OK only with unittests.