-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #49 from jgeewax/transaction-docs-fix
Updated docstrings for consistency in gcloud.datastore.
- Loading branch information
Showing
5 changed files
with
61 additions
and
70 deletions.
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
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 |
---|---|---|
|
@@ -2,10 +2,10 @@ | |
You'll typically use these to get started with the API: | ||
>>> import gcloud.datastore | ||
>>> dataset = gcloud.datastore.get_dataset('dataset-id-here', | ||
'[email protected]', | ||
'/path/to/private.key') | ||
>>> from gcloud import datastore | ||
>>> dataset = datastore.get_dataset('dataset-id-here', | ||
... '[email protected]', | ||
... '/path/to/private.key') | ||
>>> # Then do other things... | ||
>>> query = dataset.query().kind('EntityKind') | ||
>>> entity = dataset.entity('EntityKind') | ||
|
@@ -46,8 +46,8 @@ def get_connection(client_email, private_key_path): | |
Use this if you are going to access several datasets | ||
with the same set of credentials (unlikely): | ||
>>> import gcloud.datastore | ||
>>> connection = gcloud.datastore.get_connection(email, key_path) | ||
>>> from gcloud import datastore | ||
>>> connection = datastore.get_connection(email, key_path) | ||
>>> dataset1 = connection.dataset('dataset1') | ||
>>> dataset2 = connection.dataset('dataset2') | ||
|
@@ -74,8 +74,8 @@ def get_dataset(dataset_id, client_email, private_key_path): | |
You'll generally use this as the first call to working with the API: | ||
>>> import gcloud.datastore | ||
>>> dataset = gcloud.datastore.get_dataset('dataset-id', email, key_path) | ||
>>> from gcloud import datastore | ||
>>> dataset = datastore.get_dataset('dataset-id', email, key_path) | ||
>>> # Now you can do things with the dataset. | ||
>>> dataset.query().kind('TestKind').fetch() | ||
[...] | ||
|
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
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
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