|
25 | 25 |
|
26 | 26 | __version__: str = version.__version__ |
27 | 27 |
|
| 28 | +from google.cloud.ndb._datastore_api import EVENTUAL, EVENTUAL_CONSISTENCY, STRONG |
| 29 | +from google.cloud.ndb._datastore_query import Cursor, QueryIterator |
| 30 | +from google.cloud.ndb._transaction import ( |
| 31 | + in_transaction, |
| 32 | + non_transactional, |
| 33 | + transaction, |
| 34 | + transaction_async, |
| 35 | + transactional, |
| 36 | + transactional_async, |
| 37 | + transactional_tasklet, |
| 38 | +) |
28 | 39 | from google.cloud.ndb.client import Client |
29 | | -from google.cloud.ndb.context import AutoBatcher |
30 | | -from google.cloud.ndb.context import Context |
31 | | -from google.cloud.ndb.context import ContextOptions |
32 | | -from google.cloud.ndb.context import get_context |
33 | | -from google.cloud.ndb.context import get_toplevel_context |
34 | | -from google.cloud.ndb.context import TransactionOptions |
35 | | -from google.cloud.ndb._datastore_api import EVENTUAL |
36 | | -from google.cloud.ndb._datastore_api import EVENTUAL_CONSISTENCY |
37 | | -from google.cloud.ndb._datastore_api import STRONG |
38 | | -from google.cloud.ndb._datastore_query import Cursor |
39 | | -from google.cloud.ndb._datastore_query import QueryIterator |
40 | | -from google.cloud.ndb.global_cache import GlobalCache |
41 | | -from google.cloud.ndb.global_cache import MemcacheCache |
42 | | -from google.cloud.ndb.global_cache import RedisCache |
| 40 | +from google.cloud.ndb.context import ( |
| 41 | + AutoBatcher, |
| 42 | + Context, |
| 43 | + ContextOptions, |
| 44 | + TransactionOptions, |
| 45 | + get_context, |
| 46 | + get_toplevel_context, |
| 47 | +) |
| 48 | +from google.cloud.ndb.global_cache import GlobalCache, MemcacheCache, RedisCache |
43 | 49 | from google.cloud.ndb.key import Key |
44 | | -from google.cloud.ndb.model import BlobKey |
45 | | -from google.cloud.ndb.model import BlobKeyProperty |
46 | | -from google.cloud.ndb.model import BlobProperty |
47 | | -from google.cloud.ndb.model import BooleanProperty |
48 | | -from google.cloud.ndb.model import ComputedProperty |
49 | | -from google.cloud.ndb.model import ComputedPropertyError |
50 | | -from google.cloud.ndb.model import DateProperty |
51 | | -from google.cloud.ndb.model import DateTimeProperty |
52 | | -from google.cloud.ndb.model import delete_multi |
53 | | -from google.cloud.ndb.model import delete_multi_async |
54 | | -from google.cloud.ndb.model import Expando |
55 | | -from google.cloud.ndb.model import FloatProperty |
56 | | -from google.cloud.ndb.model import GenericProperty |
57 | | -from google.cloud.ndb.model import GeoPt |
58 | | -from google.cloud.ndb.model import GeoPtProperty |
59 | | -from google.cloud.ndb.model import get_indexes |
60 | | -from google.cloud.ndb.model import get_indexes_async |
61 | | -from google.cloud.ndb.model import get_multi |
62 | | -from google.cloud.ndb.model import get_multi_async |
63 | | -from google.cloud.ndb.model import Index |
64 | | -from google.cloud.ndb.model import IndexProperty |
65 | | -from google.cloud.ndb.model import IndexState |
66 | | -from google.cloud.ndb.model import IntegerProperty |
67 | | -from google.cloud.ndb.model import InvalidPropertyError |
68 | | -from google.cloud.ndb.model import BadProjectionError |
69 | | -from google.cloud.ndb.model import JsonProperty |
70 | | -from google.cloud.ndb.model import KeyProperty |
71 | | -from google.cloud.ndb.model import KindError |
72 | | -from google.cloud.ndb.model import LocalStructuredProperty |
73 | | -from google.cloud.ndb.model import make_connection |
74 | | -from google.cloud.ndb.model import MetaModel |
75 | | -from google.cloud.ndb.model import Model |
76 | | -from google.cloud.ndb.model import ModelAdapter |
77 | | -from google.cloud.ndb.model import ModelAttribute |
78 | | -from google.cloud.ndb.model import ModelKey |
79 | | -from google.cloud.ndb.model import PickleProperty |
80 | | -from google.cloud.ndb.model import Property |
81 | | -from google.cloud.ndb.model import put_multi |
82 | | -from google.cloud.ndb.model import put_multi_async |
83 | | -from google.cloud.ndb.model import ReadonlyPropertyError |
84 | | -from google.cloud.ndb.model import Rollback |
85 | | -from google.cloud.ndb.model import StringProperty |
86 | | -from google.cloud.ndb.model import StructuredProperty |
87 | | -from google.cloud.ndb.model import TextProperty |
88 | | -from google.cloud.ndb.model import TimeProperty |
89 | | -from google.cloud.ndb.model import UnprojectedPropertyError |
90 | | -from google.cloud.ndb.model import User |
91 | | -from google.cloud.ndb.model import UserNotFoundError |
92 | | -from google.cloud.ndb.model import UserProperty |
| 50 | +from google.cloud.ndb.model import ( |
| 51 | + BadProjectionError, |
| 52 | + BlobKey, |
| 53 | + BlobKeyProperty, |
| 54 | + BlobProperty, |
| 55 | + BooleanProperty, |
| 56 | + ComputedProperty, |
| 57 | + ComputedPropertyError, |
| 58 | + DateProperty, |
| 59 | + DateTimeProperty, |
| 60 | + Expando, |
| 61 | + FloatProperty, |
| 62 | + GenericProperty, |
| 63 | + GeoPt, |
| 64 | + GeoPtProperty, |
| 65 | + Index, |
| 66 | + IndexProperty, |
| 67 | + IndexState, |
| 68 | + IntegerProperty, |
| 69 | + InvalidPropertyError, |
| 70 | + JsonProperty, |
| 71 | + KeyProperty, |
| 72 | + KindError, |
| 73 | + LocalStructuredProperty, |
| 74 | + MetaModel, |
| 75 | + Model, |
| 76 | + ModelAdapter, |
| 77 | + ModelAttribute, |
| 78 | + ModelKey, |
| 79 | + PickleProperty, |
| 80 | + Property, |
| 81 | + ReadonlyPropertyError, |
| 82 | + Rollback, |
| 83 | + StringProperty, |
| 84 | + StructuredProperty, |
| 85 | + TextProperty, |
| 86 | + TimeProperty, |
| 87 | + UnprojectedPropertyError, |
| 88 | + User, |
| 89 | + UserNotFoundError, |
| 90 | + UserProperty, |
| 91 | + delete_multi, |
| 92 | + delete_multi_async, |
| 93 | + get_indexes, |
| 94 | + get_indexes_async, |
| 95 | + get_multi, |
| 96 | + get_multi_async, |
| 97 | + make_connection, |
| 98 | + put_multi, |
| 99 | + put_multi_async, |
| 100 | +) |
93 | 101 | from google.cloud.ndb.polymodel import PolyModel |
94 | | -from google.cloud.ndb.query import ConjunctionNode |
95 | | -from google.cloud.ndb.query import AND |
96 | | -from google.cloud.ndb.query import DisjunctionNode |
97 | | -from google.cloud.ndb.query import OR |
98 | | -from google.cloud.ndb.query import FalseNode |
99 | | -from google.cloud.ndb.query import FilterNode |
100 | | -from google.cloud.ndb.query import gql |
101 | | -from google.cloud.ndb.query import Node |
102 | | -from google.cloud.ndb.query import Parameter |
103 | | -from google.cloud.ndb.query import ParameterizedFunction |
104 | | -from google.cloud.ndb.query import ParameterizedThing |
105 | | -from google.cloud.ndb.query import ParameterNode |
106 | | -from google.cloud.ndb.query import PostFilterNode |
107 | | -from google.cloud.ndb.query import Query |
108 | | -from google.cloud.ndb.query import QueryOptions |
109 | | -from google.cloud.ndb.query import RepeatedStructuredPropertyPredicate |
110 | | -from google.cloud.ndb.tasklets import add_flow_exception |
111 | | -from google.cloud.ndb.tasklets import Future |
112 | | -from google.cloud.ndb.tasklets import make_context |
113 | | -from google.cloud.ndb.tasklets import make_default_context |
114 | | -from google.cloud.ndb.tasklets import QueueFuture |
115 | | -from google.cloud.ndb.tasklets import ReducingFuture |
116 | | -from google.cloud.ndb.tasklets import Return |
117 | | -from google.cloud.ndb.tasklets import SerialQueueFuture |
118 | | -from google.cloud.ndb.tasklets import set_context |
119 | | -from google.cloud.ndb.tasklets import sleep |
120 | | -from google.cloud.ndb.tasklets import synctasklet |
121 | | -from google.cloud.ndb.tasklets import tasklet |
122 | | -from google.cloud.ndb.tasklets import toplevel |
123 | | -from google.cloud.ndb.tasklets import wait_all |
124 | | -from google.cloud.ndb.tasklets import wait_any |
125 | | -from google.cloud.ndb._transaction import in_transaction |
126 | | -from google.cloud.ndb._transaction import transaction |
127 | | -from google.cloud.ndb._transaction import transaction_async |
128 | | -from google.cloud.ndb._transaction import transactional |
129 | | -from google.cloud.ndb._transaction import transactional_async |
130 | | -from google.cloud.ndb._transaction import transactional_tasklet |
131 | | -from google.cloud.ndb._transaction import non_transactional |
| 102 | +from google.cloud.ndb.query import ( |
| 103 | + AND, |
| 104 | + OR, |
| 105 | + ConjunctionNode, |
| 106 | + DisjunctionNode, |
| 107 | + FalseNode, |
| 108 | + FilterNode, |
| 109 | + Node, |
| 110 | + Parameter, |
| 111 | + ParameterizedFunction, |
| 112 | + ParameterizedThing, |
| 113 | + ParameterNode, |
| 114 | + PostFilterNode, |
| 115 | + Query, |
| 116 | + QueryOptions, |
| 117 | + RepeatedStructuredPropertyPredicate, |
| 118 | + gql, |
| 119 | +) |
| 120 | +from google.cloud.ndb.tasklets import ( |
| 121 | + Future, |
| 122 | + QueueFuture, |
| 123 | + ReducingFuture, |
| 124 | + Return, |
| 125 | + SerialQueueFuture, |
| 126 | + add_flow_exception, |
| 127 | + make_context, |
| 128 | + make_default_context, |
| 129 | + set_context, |
| 130 | + sleep, |
| 131 | + synctasklet, |
| 132 | + tasklet, |
| 133 | + toplevel, |
| 134 | + wait_all, |
| 135 | + wait_any, |
| 136 | +) |
132 | 137 |
|
133 | 138 | __all__ = [ |
134 | 139 | "__version__", |
|
0 commit comments