FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: add missing datastore admin client files by crwilcox · Pull Request #43 · googleapis/python-datastore · GitHub

This repository was archived by the owner on May 7, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .metadata  (1) .py  (5) All 2 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
45 changes: 45 additions & 0 deletions google/cloud/datastore_admin_v1/__init__.py
This file contains hidden or 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
@@ -0,0 +1,45 @@
# -*- coding: utf-8 -*-
#
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


from __future__ import absolute_import
import sys
import warnings

from google.cloud.datastore_admin_v1 import types
from google.cloud.datastore_admin_v1.gapic import datastore_admin_client
from google.cloud.datastore_admin_v1.gapic import enums


if sys.version_info[:2] == (2, 7):
message = (
"A future version of this library will drop support for Python 2.7. "
"More details about Python 2 support for Google Cloud Client Libraries "
"can be found at https://cloud.google.com/python/docs/python2-sunset/"
)
warnings.warn(message, DeprecationWarning)


class DatastoreAdminClient(datastore_admin_client.DatastoreAdminClient):
__doc__ = datastore_admin_client.DatastoreAdminClient.__doc__
enums = enums


__all__ = (
"enums",
"types",
"DatastoreAdminClient",
)

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

56 changes: 56 additions & 0 deletions google/cloud/datastore_admin_v1/types.py
This file contains hidden or 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
@@ -0,0 +1,56 @@
# -*- coding: utf-8 -*-
#
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


from __future__ import absolute_import
import sys

from google.api_core.protobuf_helpers import get_messages

from google.cloud.datastore_admin_v1.proto import datastore_admin_pb2
from google.cloud.datastore_admin_v1.proto import index_pb2
from google.longrunning import operations_pb2
from google.protobuf import any_pb2
from google.protobuf import timestamp_pb2
from google.rpc import status_pb2


_shared_modules = [
operations_pb2,
any_pb2,
timestamp_pb2,
status_pb2,
]

_local_modules = [
datastore_admin_pb2,
index_pb2,
]

names = []

for module in _shared_modules: # pragma: NO COVER
for name, message in get_messages(module).items():
setattr(sys.modules[__name__], name, message)
names.append(name)
for module in _local_modules:
for name, message in get_messages(module).items():
message.__module__ = "google.cloud.datastore_admin_v1.types"
setattr(sys.modules[__name__], name, message)
names.append(name)


__all__ = tuple(sorted(names))
9 changes: 4 additions & 5 deletions synth.metadata
This file contains hidden or 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
Expand Up @@ -3,23 +3,22 @@
{
"git": {
"name": ".",
"remote": "git@github.com:googleapis/python-datastore",
"sha": "f822b98873c829d4ae01d3de1b0d58e0076948fd"
"sha": "0a5e07c0394709a4a4e79d937a281bec824415c3"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "5202cfe3e5c2907a1a21a4c6d4bd0812029b6aa3",
"internalRef": "319247865"
"sha": "59f97e6044a1275f83427ab7962a154c00d915b5",
"internalRef": "321058159"
}
},
{
"git": {
"name": "synthtool",
"remote": "https://github.com/googleapis/synthtool.git",
"sha": "303271797a360f8a439203413f13a160f2f5b3b4"
"sha": "d82deccf657a66e31bd5da9efdb96c6fa322fc7e"
}
}
],
Expand Down
6 changes: 5 additions & 1 deletion synth.py
This file contains hidden or 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
Expand Up @@ -42,8 +42,12 @@
include_protos=True,
)

s.move(
library / "datastore-admin-v1-py/google/cloud/datastore_admin_v1",
"google/cloud/datastore_admin_v1"
)

s.move(library / "google/cloud/datastore_admin_v1/proto")
s.move(library / "google/cloud/datastore_admin_v1/gapic")

# TODO(busunkim): Remove during the microgenerator transition.
# This re-orders the parameters to avoid breaking existing code.
Expand Down

Back | FazBrowse Home | New Git URL