Skip to content

Commit 0cd4b64

Browse files
chore(datastore): delete and migrate invalid region tags in the whole folder - step 1 (#13198)
* chore(datastore): rename region tag 'ndb_flask' (as a test before migrating it) * chore(datastore): delete unused region tags and add new region tag for migration
1 parent 72a5e91 commit 0cd4b64

File tree

3 files changed

+3
-10
lines changed

3 files changed

+3
-10
lines changed

datastore/cloud-ndb/flask_app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
# [START datastore_ndb_flask]
1516
# [START ndb_flask]
1617
from flask import Flask
1718

@@ -41,6 +42,5 @@ class Book(ndb.Model):
4142
def list_books():
4243
books = Book.query()
4344
return str([book.to_dict() for book in books])
44-
45-
4645
# [END ndb_flask]
46+
# [END datastore_ndb_flask]

datastore/cloud-ndb/quickstart.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,28 +13,23 @@
1313
# limitations under the License.
1414

1515
# [START datastore_quickstart_python]
16-
# [START ndb_import]
1716
from google.cloud import ndb
1817

1918

20-
# [END ndb_import]
2119
class Book(ndb.Model):
2220
title = ndb.StringProperty()
2321

2422

25-
# [START ndb_client]
2623
client = ndb.Client()
2724

2825

29-
# [END ndb_client]
3026
def list_books():
3127
with client.context():
3228
books = Book.query()
3329
for book in books:
3430
print(book.to_dict())
35-
36-
3731
# [END datastore_quickstart_python]
3832

33+
3934
if __name__ == "__main__":
4035
list_books()
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# [START ndb_version]
21
google-cloud-ndb==2.3.2
3-
# [END ndb_version]
42
Flask==3.0.3
53
Werkzeug==3.0.6

0 commit comments

Comments
 (0)