google-cloud-ndb 2.3.1__tar.gz → 2.3.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {google-cloud-ndb-2.3.1/google_cloud_ndb.egg-info → google_cloud_ndb-2.3.2}/PKG-INFO +7 -2
- {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.2}/README.md +5 -0
- {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.2}/google/cloud/ndb/_datastore_types.py +2 -2
- {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.2}/google/cloud/ndb/context.py +2 -2
- {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.2}/google/cloud/ndb/key.py +2 -2
- {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.2}/google/cloud/ndb/model.py +38 -38
- {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.2}/google/cloud/ndb/query.py +2 -2
- {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.2}/google/cloud/ndb/version.py +1 -1
- {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.2/google_cloud_ndb.egg-info}/PKG-INFO +7 -2
- {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.2}/google_cloud_ndb.egg-info/requires.txt +1 -1
- {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.2}/setup.py +1 -1
- {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.2}/AUTHORS +0 -0
- {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.2}/LICENSE +0 -0
- {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.2}/google/cloud/ndb/__init__.py +0 -0
- {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.2}/google/cloud/ndb/_batch.py +0 -0
- {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.2}/google/cloud/ndb/_cache.py +0 -0
- {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.2}/google/cloud/ndb/_datastore_api.py +0 -0
- {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.2}/google/cloud/ndb/_datastore_query.py +0 -0
- {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.2}/google/cloud/ndb/_eventloop.py +0 -0
- {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.2}/google/cloud/ndb/_gql.py +0 -0
- {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.2}/google/cloud/ndb/_legacy_entity_pb.py +0 -0
- {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.2}/google/cloud/ndb/_legacy_protocol_buffer.py +0 -0
- {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.2}/google/cloud/ndb/_options.py +0 -0
- {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.2}/google/cloud/ndb/_remote.py +0 -0
- {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.2}/google/cloud/ndb/_retry.py +0 -0
- {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.2}/google/cloud/ndb/_transaction.py +0 -0
- {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.2}/google/cloud/ndb/blobstore.py +0 -0
- {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.2}/google/cloud/ndb/client.py +0 -0
- {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.2}/google/cloud/ndb/django_middleware.py +0 -0
- {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.2}/google/cloud/ndb/exceptions.py +0 -0
- {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.2}/google/cloud/ndb/global_cache.py +0 -0
- {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.2}/google/cloud/ndb/metadata.py +0 -0
- {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.2}/google/cloud/ndb/msgprop.py +0 -0
- {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.2}/google/cloud/ndb/polymodel.py +0 -0
- {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.2}/google/cloud/ndb/stats.py +0 -0
- {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.2}/google/cloud/ndb/tasklets.py +0 -0
- {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.2}/google/cloud/ndb/utils.py +0 -0
- {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.2}/google_cloud_ndb.egg-info/SOURCES.txt +0 -0
- {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.2}/google_cloud_ndb.egg-info/dependency_links.txt +0 -0
- {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.2}/google_cloud_ndb.egg-info/not-zip-safe +0 -0
- {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.2}/google_cloud_ndb.egg-info/top_level.txt +0 -0
- {google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.2}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: google-cloud-ndb
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.2
|
|
4
4
|
Summary: NDB library for Google Cloud Datastore
|
|
5
5
|
Home-page: https://github.com/googleapis/python-ndb
|
|
6
6
|
Author: Google LLC
|
|
@@ -28,19 +28,24 @@ License-File: LICENSE
|
|
|
28
28
|
License-File: AUTHORS
|
|
29
29
|
Requires-Dist: google-api-core[grpc]!=2.0.*,!=2.1.*,!=2.10.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*,!=2.8.*,!=2.9.*,<3.0.0dev,>=1.34.0
|
|
30
30
|
Requires-Dist: google-cloud-datastore<3.0.0dev,>=2.16.0
|
|
31
|
-
Requires-Dist: protobuf!=
|
|
31
|
+
Requires-Dist: protobuf!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<6.0.0dev,>=3.20.2
|
|
32
32
|
Requires-Dist: pymemcache<5.0.0dev,>=2.1.0
|
|
33
33
|
Requires-Dist: pytz>=2018.3
|
|
34
34
|
Requires-Dist: redis<6.0.0dev,>=3.0.0
|
|
35
35
|
|
|
36
36
|
# Google Cloud Datastore `ndb` Client Library
|
|
37
37
|
|
|
38
|
+
[](https://github.com/googleapis/google-cloud-python/blob/main/README.rst#stability-levels)
|
|
39
|
+
[](https://pypi.org/project/google-cloud-ndb/)
|
|
40
|
+
[](https://pypi.org/project/google-cloud-ndb/)
|
|
41
|
+
|
|
38
42
|
## Introduction
|
|
39
43
|
|
|
40
44
|
This is an updated version of the `ndb` client library for use with
|
|
41
45
|
[Google Cloud Datastore][0].
|
|
42
46
|
|
|
43
47
|
* [Client Library Documentation](https://googleapis.dev/python/python-ndb/latest)
|
|
48
|
+
* [Product Documentation](https://cloud.google.com/datastore/docs)
|
|
44
49
|
|
|
45
50
|
The original Python 2 version of `ndb` was designed specifically for the
|
|
46
51
|
[Google App Engine][1] `python27` runtime and can be found at
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
# Google Cloud Datastore `ndb` Client Library
|
|
2
2
|
|
|
3
|
+
[](https://github.com/googleapis/google-cloud-python/blob/main/README.rst#stability-levels)
|
|
4
|
+
[](https://pypi.org/project/google-cloud-ndb/)
|
|
5
|
+
[](https://pypi.org/project/google-cloud-ndb/)
|
|
6
|
+
|
|
3
7
|
## Introduction
|
|
4
8
|
|
|
5
9
|
This is an updated version of the `ndb` client library for use with
|
|
6
10
|
[Google Cloud Datastore][0].
|
|
7
11
|
|
|
8
12
|
* [Client Library Documentation](https://googleapis.dev/python/python-ndb/latest)
|
|
13
|
+
* [Product Documentation](https://cloud.google.com/datastore/docs)
|
|
9
14
|
|
|
10
15
|
The original Python 2 version of `ndb` was designed specifically for the
|
|
11
16
|
[Google App Engine][1] `python27` runtime and can be found at
|
|
@@ -46,8 +46,8 @@ class BlobKey(object):
|
|
|
46
46
|
blob_key (Optional[bytes]): The key used for the blobstore.
|
|
47
47
|
|
|
48
48
|
Raises:
|
|
49
|
-
.BadValueError: If the ``blob_key`` exceeds 1500 bytes.
|
|
50
|
-
.BadValueError: If the ``blob_key`` is not :data:`None` or a
|
|
49
|
+
exceptions.BadValueError: If the ``blob_key`` exceeds 1500 bytes.
|
|
50
|
+
exceptions.BadValueError: If the ``blob_key`` is not :data:`None` or a
|
|
51
51
|
:class:`bytes` instance.
|
|
52
52
|
"""
|
|
53
53
|
|
|
@@ -105,7 +105,7 @@ def get_context(raise_context_error=True):
|
|
|
105
105
|
Context: The current context.
|
|
106
106
|
|
|
107
107
|
Raises:
|
|
108
|
-
.ContextError: If called outside of a context
|
|
108
|
+
exceptions.ContextError: If called outside of a context
|
|
109
109
|
established by :meth:`google.cloud.ndb.client.Client.context` and
|
|
110
110
|
``raise_context_error`` is :data:`True`.
|
|
111
111
|
"""
|
|
@@ -139,7 +139,7 @@ def get_toplevel_context(raise_context_error=True):
|
|
|
139
139
|
Context: The current context.
|
|
140
140
|
|
|
141
141
|
Raises:
|
|
142
|
-
.ContextError: If called outside of a context
|
|
142
|
+
exceptions.ContextError: If called outside of a context
|
|
143
143
|
established by :meth:`google.cloud.ndb.client.Client.context` and
|
|
144
144
|
``raise_context_error`` is :data:`True`.
|
|
145
145
|
"""
|
|
@@ -1408,7 +1408,7 @@ def _parse_from_args(
|
|
|
1408
1408
|
~.datastore.Key: The constructed key.
|
|
1409
1409
|
|
|
1410
1410
|
Raises:
|
|
1411
|
-
.BadValueError: If ``parent`` is passed but is not a ``Key``.
|
|
1411
|
+
exceptions.BadValueError: If ``parent`` is passed but is not a ``Key``.
|
|
1412
1412
|
"""
|
|
1413
1413
|
# Avoid circular import in Python 2.7
|
|
1414
1414
|
from google.cloud.ndb import context as context_module
|
|
@@ -1514,7 +1514,7 @@ def _clean_flat_path(flat):
|
|
|
1514
1514
|
|
|
1515
1515
|
Raises:
|
|
1516
1516
|
TypeError: If the kind in a pair is an invalid type.
|
|
1517
|
-
.BadArgumentError: If a key ID is :data:`None` (indicating a partial
|
|
1517
|
+
exceptions.BadArgumentError: If a key ID is :data:`None` (indicating a partial
|
|
1518
1518
|
key), but in a pair other than the last one.
|
|
1519
1519
|
TypeError: If a key ID is not a string or integer.
|
|
1520
1520
|
"""
|
|
@@ -1487,7 +1487,7 @@ class Property(ModelAttribute):
|
|
|
1487
1487
|
Raises:
|
|
1488
1488
|
ReadonlyPropertyError: If the ``entity`` is the result of a
|
|
1489
1489
|
projection query.
|
|
1490
|
-
.BadValueError: If the current property is repeated but the
|
|
1490
|
+
exceptions.BadValueError: If the current property is repeated but the
|
|
1491
1491
|
``value`` is not a basic container (:class:`list`,
|
|
1492
1492
|
:class:`tuple`, :class:`set` or :class:`frozenset`).
|
|
1493
1493
|
"""
|
|
@@ -2258,15 +2258,15 @@ def _validate_key(value, entity=None):
|
|
|
2258
2258
|
"""Validate a key.
|
|
2259
2259
|
|
|
2260
2260
|
Args:
|
|
2261
|
-
value (.Key): The key to be validated.
|
|
2261
|
+
value (~google.cloud.ndb.key.Key): The key to be validated.
|
|
2262
2262
|
entity (Optional[Model]): The entity that the key is being validated
|
|
2263
2263
|
for.
|
|
2264
2264
|
|
|
2265
2265
|
Returns:
|
|
2266
|
-
.Key: The passed in ``value``.
|
|
2266
|
+
~google.cloud.ndb.key.Key: The passed in ``value``.
|
|
2267
2267
|
|
|
2268
2268
|
Raises:
|
|
2269
|
-
.BadValueError: If ``value`` is not a :class
|
|
2269
|
+
exceptions.BadValueError: If ``value`` is not a :class:`~google.cloud.ndb.key.Key`.
|
|
2270
2270
|
KindError: If ``entity`` is specified, but the kind of the entity
|
|
2271
2271
|
doesn't match the kind of ``value``.
|
|
2272
2272
|
"""
|
|
@@ -2315,7 +2315,7 @@ class ModelKey(Property):
|
|
|
2315
2315
|
comparison.
|
|
2316
2316
|
|
|
2317
2317
|
Raises:
|
|
2318
|
-
.BadValueError: If ``value`` is :data:`None`.
|
|
2318
|
+
exceptions.BadValueError: If ``value`` is :data:`None`.
|
|
2319
2319
|
"""
|
|
2320
2320
|
if value is not None:
|
|
2321
2321
|
return super(ModelKey, self)._comparison(op, value)
|
|
@@ -2326,10 +2326,10 @@ class ModelKey(Property):
|
|
|
2326
2326
|
"""Validate a ``value`` before setting it.
|
|
2327
2327
|
|
|
2328
2328
|
Args:
|
|
2329
|
-
value (.Key): The value to check.
|
|
2329
|
+
value (~google.cloud.ndb.key.Key): The value to check.
|
|
2330
2330
|
|
|
2331
2331
|
Returns:
|
|
2332
|
-
.Key: The passed-in ``value``.
|
|
2332
|
+
~google.cloud.ndb.key.Key: The passed-in ``value``.
|
|
2333
2333
|
"""
|
|
2334
2334
|
return _validate_key(value)
|
|
2335
2335
|
|
|
@@ -2339,7 +2339,7 @@ class ModelKey(Property):
|
|
|
2339
2339
|
|
|
2340
2340
|
Args:
|
|
2341
2341
|
entity (Model): An entity to set the entity key on.
|
|
2342
|
-
value (.Key): The key to be set on the entity.
|
|
2342
|
+
value (~google.cloud.ndb.key.Key): The key to be set on the entity.
|
|
2343
2343
|
"""
|
|
2344
2344
|
if value is not None:
|
|
2345
2345
|
value = _validate_key(value, entity=entity)
|
|
@@ -2355,7 +2355,7 @@ class ModelKey(Property):
|
|
|
2355
2355
|
entity (Model): An entity to get the entity key from.
|
|
2356
2356
|
|
|
2357
2357
|
Returns:
|
|
2358
|
-
.Key: The entity key stored on ``entity``.
|
|
2358
|
+
~google.cloud.ndb.key.Key: The entity key stored on ``entity``.
|
|
2359
2359
|
"""
|
|
2360
2360
|
return entity._entity_key
|
|
2361
2361
|
|
|
@@ -2385,7 +2385,7 @@ class BooleanProperty(Property):
|
|
|
2385
2385
|
bool: The passed-in ``value``.
|
|
2386
2386
|
|
|
2387
2387
|
Raises:
|
|
2388
|
-
.BadValueError: If ``value`` is not a :class:`bool`.
|
|
2388
|
+
exceptions.BadValueError: If ``value`` is not a :class:`bool`.
|
|
2389
2389
|
"""
|
|
2390
2390
|
if not isinstance(value, bool):
|
|
2391
2391
|
raise exceptions.BadValueError(
|
|
@@ -2431,7 +2431,7 @@ class IntegerProperty(Property):
|
|
|
2431
2431
|
int: The passed-in ``value``.
|
|
2432
2432
|
|
|
2433
2433
|
Raises:
|
|
2434
|
-
.BadValueError: If ``value`` is not an :class:`int` or convertible
|
|
2434
|
+
exceptions.BadValueError: If ``value`` is not an :class:`int` or convertible
|
|
2435
2435
|
to one.
|
|
2436
2436
|
"""
|
|
2437
2437
|
if not isinstance(value, int):
|
|
@@ -2463,7 +2463,7 @@ class FloatProperty(Property):
|
|
|
2463
2463
|
:class:`float`.
|
|
2464
2464
|
|
|
2465
2465
|
Raises:
|
|
2466
|
-
.BadValueError: If ``value`` is not a :class:`float` or convertible
|
|
2466
|
+
exceptions.BadValueError: If ``value`` is not a :class:`float` or convertible
|
|
2467
2467
|
to one.
|
|
2468
2468
|
"""
|
|
2469
2469
|
if not isinstance(value, (float, int)):
|
|
@@ -2595,8 +2595,8 @@ class BlobProperty(Property):
|
|
|
2595
2595
|
value (bytes): The value to check.
|
|
2596
2596
|
|
|
2597
2597
|
Raises:
|
|
2598
|
-
.BadValueError: If ``value`` is not a :class:`bytes`.
|
|
2599
|
-
.BadValueError: If the current property is indexed but the value
|
|
2598
|
+
exceptions.BadValueError: If ``value`` is not a :class:`bytes`.
|
|
2599
|
+
exceptions.BadValueError: If the current property is indexed but the value
|
|
2600
2600
|
exceeds the maximum length (1500 bytes).
|
|
2601
2601
|
"""
|
|
2602
2602
|
if not isinstance(value, bytes):
|
|
@@ -2776,11 +2776,11 @@ class CompressedTextProperty(BlobProperty):
|
|
|
2776
2776
|
value (Union[bytes, str]): The value to check.
|
|
2777
2777
|
|
|
2778
2778
|
Raises:
|
|
2779
|
-
.BadValueError: If ``value`` is :class:`bytes`, but is not a valid
|
|
2779
|
+
exceptions.BadValueError: If ``value`` is :class:`bytes`, but is not a valid
|
|
2780
2780
|
UTF-8 encoded string.
|
|
2781
|
-
.BadValueError: If ``value`` is neither :class:`bytes` nor
|
|
2781
|
+
exceptions.BadValueError: If ``value`` is neither :class:`bytes` nor
|
|
2782
2782
|
:class:`str`.
|
|
2783
|
-
.BadValueError: If the current property is indexed but the UTF-8
|
|
2783
|
+
exceptions.BadValueError: If the current property is indexed but the UTF-8
|
|
2784
2784
|
encoded value exceeds the maximum length (1500 bytes).
|
|
2785
2785
|
"""
|
|
2786
2786
|
if not isinstance(value, str):
|
|
@@ -2938,11 +2938,11 @@ class TextProperty(Property):
|
|
|
2938
2938
|
value (Union[bytes, str]): The value to check.
|
|
2939
2939
|
|
|
2940
2940
|
Raises:
|
|
2941
|
-
.BadValueError: If ``value`` is :class:`bytes`, but is not a valid
|
|
2941
|
+
exceptions.BadValueError: If ``value`` is :class:`bytes`, but is not a valid
|
|
2942
2942
|
UTF-8 encoded string.
|
|
2943
|
-
.BadValueError: If ``value`` is neither :class:`bytes` nor
|
|
2943
|
+
exceptions.BadValueError: If ``value`` is neither :class:`bytes` nor
|
|
2944
2944
|
:class:`str`.
|
|
2945
|
-
.BadValueError: If the current property is indexed but the UTF-8
|
|
2945
|
+
exceptions.BadValueError: If the current property is indexed but the UTF-8
|
|
2946
2946
|
encoded value exceeds the maximum length (1500 bytes).
|
|
2947
2947
|
"""
|
|
2948
2948
|
if isinstance(value, bytes):
|
|
@@ -3056,7 +3056,7 @@ class GeoPtProperty(Property):
|
|
|
3056
3056
|
check.
|
|
3057
3057
|
|
|
3058
3058
|
Raises:
|
|
3059
|
-
.BadValueError: If ``value`` is not a :attr:`.GeoPt`.
|
|
3059
|
+
exceptions.BadValueError: If ``value`` is not a :attr:`.GeoPt`.
|
|
3060
3060
|
"""
|
|
3061
3061
|
if not isinstance(value, GeoPt):
|
|
3062
3062
|
raise exceptions.BadValueError(
|
|
@@ -3478,7 +3478,7 @@ class UserProperty(Property):
|
|
|
3478
3478
|
value (User): The value to check.
|
|
3479
3479
|
|
|
3480
3480
|
Raises:
|
|
3481
|
-
.BadValueError: If ``value`` is not a :class:`User`.
|
|
3481
|
+
exceptions.BadValueError: If ``value`` is not a :class:`User`.
|
|
3482
3482
|
"""
|
|
3483
3483
|
# Might be GAE User or our own version
|
|
3484
3484
|
if type(value).__name__ != "User":
|
|
@@ -3552,7 +3552,7 @@ class UserProperty(Property):
|
|
|
3552
3552
|
|
|
3553
3553
|
|
|
3554
3554
|
class KeyProperty(Property):
|
|
3555
|
-
"""A property that contains :class
|
|
3555
|
+
"""A property that contains :class:`~google.cloud.ndb.key.Key` values.
|
|
3556
3556
|
|
|
3557
3557
|
The constructor for :class:`KeyProperty` allows at most two positional
|
|
3558
3558
|
arguments. Any usage of :data:`None` as a positional argument will
|
|
@@ -3595,10 +3595,10 @@ class KeyProperty(Property):
|
|
|
3595
3595
|
multiple values.
|
|
3596
3596
|
required (bool): Indicates if this property is required on the given
|
|
3597
3597
|
model type.
|
|
3598
|
-
default (.Key): The default value for this property.
|
|
3599
|
-
choices (Iterable[.Key]): A container of allowed values for this
|
|
3598
|
+
default (~google.cloud.ndb.key.Key): The default value for this property.
|
|
3599
|
+
choices (Iterable[~google.cloud.ndb.key.Key]): A container of allowed values for this
|
|
3600
3600
|
property.
|
|
3601
|
-
validator (Callable[[~google.cloud.ndb.model.Property, .Key], bool]): A
|
|
3601
|
+
validator (Callable[[~google.cloud.ndb.model.Property, ~google.cloud.ndb.key.Key], bool]): A
|
|
3602
3602
|
validator to be used to check values.
|
|
3603
3603
|
verbose_name (str): A longer, user-friendly name for this property.
|
|
3604
3604
|
write_empty_list (bool): Indicates if an empty list should be written
|
|
@@ -3686,13 +3686,13 @@ class KeyProperty(Property):
|
|
|
3686
3686
|
"""Validate a ``value`` before setting it.
|
|
3687
3687
|
|
|
3688
3688
|
Args:
|
|
3689
|
-
value (.Key): The value to check.
|
|
3689
|
+
value (~google.cloud.ndb.key.Key): The value to check.
|
|
3690
3690
|
|
|
3691
3691
|
Raises:
|
|
3692
|
-
.BadValueError: If ``value`` is not a :class:`.Key`.
|
|
3693
|
-
.BadValueError: If ``value`` is a partial :class:`.Key` (i.e. it
|
|
3692
|
+
exceptions.BadValueError: If ``value`` is not a :class:`.Key`.
|
|
3693
|
+
exceptions.BadValueError: If ``value`` is a partial :class:`.Key` (i.e. it
|
|
3694
3694
|
has no name or ID set).
|
|
3695
|
-
.BadValueError: If the current property has an associated ``kind``
|
|
3695
|
+
exceptions.BadValueError: If the current property has an associated ``kind``
|
|
3696
3696
|
and ``value`` does not match that kind.
|
|
3697
3697
|
"""
|
|
3698
3698
|
if not isinstance(value, Key):
|
|
@@ -3758,7 +3758,7 @@ class BlobKeyProperty(Property):
|
|
|
3758
3758
|
value (~google.cloud.ndb.model.BlobKey): The value to check.
|
|
3759
3759
|
|
|
3760
3760
|
Raises:
|
|
3761
|
-
.BadValueError: If ``value`` is not a
|
|
3761
|
+
exceptions.BadValueError: If ``value`` is not a
|
|
3762
3762
|
:class:`~google.cloud.ndb.model.BlobKey`.
|
|
3763
3763
|
"""
|
|
3764
3764
|
if not isinstance(value, BlobKey):
|
|
@@ -3877,7 +3877,7 @@ class DateTimeProperty(Property):
|
|
|
3877
3877
|
value (~datetime.datetime): The value to check.
|
|
3878
3878
|
|
|
3879
3879
|
Raises:
|
|
3880
|
-
.BadValueError: If ``value`` is not a :class:`~datetime.datetime`.
|
|
3880
|
+
exceptions.BadValueError: If ``value`` is not a :class:`~datetime.datetime`.
|
|
3881
3881
|
"""
|
|
3882
3882
|
if not isinstance(value, datetime.datetime):
|
|
3883
3883
|
raise exceptions.BadValueError(
|
|
@@ -3976,7 +3976,7 @@ class DateProperty(DateTimeProperty):
|
|
|
3976
3976
|
value (~datetime.date): The value to check.
|
|
3977
3977
|
|
|
3978
3978
|
Raises:
|
|
3979
|
-
.BadValueError: If ``value`` is not a :class:`~datetime.date`.
|
|
3979
|
+
exceptions.BadValueError: If ``value`` is not a :class:`~datetime.date`.
|
|
3980
3980
|
"""
|
|
3981
3981
|
if not isinstance(value, datetime.date):
|
|
3982
3982
|
raise exceptions.BadValueError(
|
|
@@ -4036,7 +4036,7 @@ class TimeProperty(DateTimeProperty):
|
|
|
4036
4036
|
value (~datetime.time): The value to check.
|
|
4037
4037
|
|
|
4038
4038
|
Raises:
|
|
4039
|
-
.BadValueError: If ``value`` is not a :class:`~datetime.time`.
|
|
4039
|
+
exceptions.BadValueError: If ``value`` is not a :class:`~datetime.time`.
|
|
4040
4040
|
"""
|
|
4041
4041
|
if not isinstance(value, datetime.time):
|
|
4042
4042
|
raise exceptions.BadValueError(
|
|
@@ -4440,7 +4440,7 @@ class LocalStructuredProperty(BlobProperty):
|
|
|
4440
4440
|
Args:
|
|
4441
4441
|
value: The value to check.
|
|
4442
4442
|
Raises:
|
|
4443
|
-
.BadValueError: If ``value`` is not a given class.
|
|
4443
|
+
exceptions.BadValueError: If ``value`` is not a given class.
|
|
4444
4444
|
"""
|
|
4445
4445
|
if isinstance(value, dict):
|
|
4446
4446
|
# A dict is assumed to be the result of a _to_dict() call.
|
|
@@ -4869,7 +4869,7 @@ class Model(_NotEqualMixin, metaclass=MetaModel):
|
|
|
4869
4869
|
to properties of this model.
|
|
4870
4870
|
|
|
4871
4871
|
Raises:
|
|
4872
|
-
.BadArgumentError: If the constructor is called with ``key`` and one
|
|
4872
|
+
exceptions.BadArgumentError: If the constructor is called with ``key`` and one
|
|
4873
4873
|
of ``id``, ``app``, ``namespace``, ``database``, or ``parent`` specified.
|
|
4874
4874
|
"""
|
|
4875
4875
|
|
|
@@ -5371,10 +5371,10 @@ class Model(_NotEqualMixin, metaclass=MetaModel):
|
|
|
5371
5371
|
"""Validation for ``_key`` attribute (designed to be overridden).
|
|
5372
5372
|
|
|
5373
5373
|
Args:
|
|
5374
|
-
key (.Key): Proposed key to use for this entity.
|
|
5374
|
+
key (~google.cloud.ndb.key.Key): Proposed key to use for this entity.
|
|
5375
5375
|
|
|
5376
5376
|
Returns:
|
|
5377
|
-
.Key: The validated ``key``.
|
|
5377
|
+
~google.cloud.ndb.key.Key: The validated ``key``.
|
|
5378
5378
|
"""
|
|
5379
5379
|
return key
|
|
5380
5380
|
|
|
@@ -338,7 +338,7 @@ class Parameter(ParameterizedThing):
|
|
|
338
338
|
Any: The bound value for the current parameter.
|
|
339
339
|
|
|
340
340
|
Raises:
|
|
341
|
-
.BadArgumentError: If the current parameter is not in ``bindings``.
|
|
341
|
+
exceptions.BadArgumentError: If the current parameter is not in ``bindings``.
|
|
342
342
|
"""
|
|
343
343
|
key = self._key
|
|
344
344
|
if key not in bindings:
|
|
@@ -565,7 +565,7 @@ class ParameterNode(Node):
|
|
|
565
565
|
post (bool): Indicates if this is a post-filter node.
|
|
566
566
|
|
|
567
567
|
Raises:
|
|
568
|
-
.BadArgumentError: Always. This is because this node represents
|
|
568
|
+
exceptions.BadArgumentError: Always. This is because this node represents
|
|
569
569
|
a parameter, i.e. no value exists to be filtered on.
|
|
570
570
|
"""
|
|
571
571
|
raise exceptions.BadArgumentError(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: google-cloud-ndb
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.2
|
|
4
4
|
Summary: NDB library for Google Cloud Datastore
|
|
5
5
|
Home-page: https://github.com/googleapis/python-ndb
|
|
6
6
|
Author: Google LLC
|
|
@@ -28,19 +28,24 @@ License-File: LICENSE
|
|
|
28
28
|
License-File: AUTHORS
|
|
29
29
|
Requires-Dist: google-api-core[grpc]!=2.0.*,!=2.1.*,!=2.10.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*,!=2.8.*,!=2.9.*,<3.0.0dev,>=1.34.0
|
|
30
30
|
Requires-Dist: google-cloud-datastore<3.0.0dev,>=2.16.0
|
|
31
|
-
Requires-Dist: protobuf!=
|
|
31
|
+
Requires-Dist: protobuf!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<6.0.0dev,>=3.20.2
|
|
32
32
|
Requires-Dist: pymemcache<5.0.0dev,>=2.1.0
|
|
33
33
|
Requires-Dist: pytz>=2018.3
|
|
34
34
|
Requires-Dist: redis<6.0.0dev,>=3.0.0
|
|
35
35
|
|
|
36
36
|
# Google Cloud Datastore `ndb` Client Library
|
|
37
37
|
|
|
38
|
+
[](https://github.com/googleapis/google-cloud-python/blob/main/README.rst#stability-levels)
|
|
39
|
+
[](https://pypi.org/project/google-cloud-ndb/)
|
|
40
|
+
[](https://pypi.org/project/google-cloud-ndb/)
|
|
41
|
+
|
|
38
42
|
## Introduction
|
|
39
43
|
|
|
40
44
|
This is an updated version of the `ndb` client library for use with
|
|
41
45
|
[Google Cloud Datastore][0].
|
|
42
46
|
|
|
43
47
|
* [Client Library Documentation](https://googleapis.dev/python/python-ndb/latest)
|
|
48
|
+
* [Product Documentation](https://cloud.google.com/datastore/docs)
|
|
44
49
|
|
|
45
50
|
The original Python 2 version of `ndb` was designed specifically for the
|
|
46
51
|
[Google App Engine][1] `python27` runtime and can be found at
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
google-api-core[grpc]!=2.0.*,!=2.1.*,!=2.10.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*,!=2.8.*,!=2.9.*,<3.0.0dev,>=1.34.0
|
|
2
2
|
google-cloud-datastore<3.0.0dev,>=2.16.0
|
|
3
|
-
protobuf!=
|
|
3
|
+
protobuf!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<6.0.0dev,>=3.20.2
|
|
4
4
|
pymemcache<5.0.0dev,>=2.1.0
|
|
5
5
|
pytz>=2018.3
|
|
6
6
|
redis<6.0.0dev,>=3.0.0
|
|
@@ -42,7 +42,7 @@ def main():
|
|
|
42
42
|
dependencies = [
|
|
43
43
|
"google-api-core[grpc] >= 1.34.0, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*,!=2.8.*,!=2.9.*,!=2.10.*",
|
|
44
44
|
"google-cloud-datastore >= 2.16.0, < 3.0.0dev",
|
|
45
|
-
"protobuf >= 3.
|
|
45
|
+
"protobuf >= 3.20.2, <6.0.0dev,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5",
|
|
46
46
|
"pymemcache >= 2.1.0, < 5.0.0dev",
|
|
47
47
|
"pytz >= 2018.3",
|
|
48
48
|
"redis >= 3.0.0, < 6.0.0dev",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.2}/google/cloud/ndb/_legacy_protocol_buffer.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{google-cloud-ndb-2.3.1 → google_cloud_ndb-2.3.2}/google_cloud_ndb.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|