Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/google/cloud/firestore_v1/__init__.py: 96%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

27 statements  

1# -*- coding: utf-8 -*- 

2 

3# Copyright 2019 Google LLC 

4# 

5# Licensed under the Apache License, Version 2.0 (the "License"); 

6# you may not use this file except in compliance with the License. 

7# You may obtain a copy of the License at 

8# 

9# http://www.apache.org/licenses/LICENSE-2.0 

10# 

11# Unless required by applicable law or agreed to in writing, software 

12# distributed under the License is distributed on an "AS IS" BASIS, 

13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 

14# See the License for the specific language governing permissions and 

15# limitations under the License. 

16# 

17 

18 

19"""Python idiomatic client for Google Cloud Firestore.""" 

20 

21 

22from google.cloud.firestore_v1 import gapic_version as package_version 

23 

24__version__: str = package_version.__version__ 

25 

26from typing import List 

27 

28from google.cloud.firestore_v1 import types 

29from google.cloud.firestore_v1._helpers import ( 

30 ExistsOption, 

31 GeoPoint, 

32 LastUpdateOption, 

33 ReadAfterWriteError, 

34 WriteOption, 

35) 

36from google.cloud.firestore_v1.async_batch import AsyncWriteBatch 

37from google.cloud.firestore_v1.async_client import AsyncClient 

38from google.cloud.firestore_v1.async_collection import AsyncCollectionReference 

39from google.cloud.firestore_v1.async_document import AsyncDocumentReference 

40from google.cloud.firestore_v1.async_query import AsyncQuery 

41from google.cloud.firestore_v1.async_transaction import ( 

42 AsyncTransaction, 

43 async_transactional, 

44) 

45from google.cloud.firestore_v1.base_aggregation import CountAggregation 

46from google.cloud.firestore_v1.base_document import DocumentSnapshot 

47from google.cloud.firestore_v1.base_query import And, FieldFilter, Or 

48from google.cloud.firestore_v1.batch import WriteBatch 

49from google.cloud.firestore_v1.client import Client 

50from google.cloud.firestore_v1.collection import CollectionReference 

51from google.cloud.firestore_v1.document import DocumentReference 

52from google.cloud.firestore_v1.query import CollectionGroup, Query 

53from google.cloud.firestore_v1.query_profile import ExplainOptions 

54from google.cloud.firestore_v1.transaction import Transaction, transactional 

55from google.cloud.firestore_v1.transforms import ( 

56 DELETE_FIELD, 

57 SERVER_TIMESTAMP, 

58 ArrayRemove, 

59 ArrayUnion, 

60 Increment, 

61 Maximum, 

62 Minimum, 

63) 

64from google.cloud.firestore_v1.watch import Watch 

65 

66# TODO(https://github.com/googleapis/python-firestore/issues/93): this is all on the generated surface. We require this to match 

67# firestore.py. So comment out until needed on customer level for certain. 

68# from .services.firestore import FirestoreClient 

69# from .types.common import DocumentMask 

70# from .types.common import Precondition 

71# from .types.common import TransactionOptions 

72# from .types.document import ArrayValue 

73# from .types.document import Document 

74# from .types.document import MapValue 

75# from .types.document import Value 

76# from .types.firestore import BatchGetDocumentsRequest 

77# from .types.firestore import BatchGetDocumentsResponse 

78# from .types.firestore import BatchWriteRequest 

79# from .types.firestore import BatchWriteResponse 

80# from .types.firestore import BeginTransactionRequest 

81# from .types.firestore import BeginTransactionResponse 

82# from .types.firestore import CommitRequest 

83# from .types.firestore import CommitResponse 

84# from .types.firestore import CreateDocumentRequest 

85# from .types.firestore import DeleteDocumentRequest 

86# from .types.firestore import GetDocumentRequest 

87# from .types.firestore import ListCollectionIdsRequest 

88# from .types.firestore import ListCollectionIdsResponse 

89# from .types.firestore import ListDocumentsRequest 

90# from .types.firestore import ListDocumentsResponse 

91# from .types.firestore import ListenRequest 

92# from .types.firestore import ListenResponse 

93# from .types.firestore import PartitionQueryRequest 

94# from .types.firestore import PartitionQueryResponse 

95# from .types.firestore import RollbackRequest 

96# from .types.firestore import RunQueryRequest 

97# from .types.firestore import RunQueryResponse 

98# from .types.firestore import Target 

99# from .types.firestore import TargetChange 

100# from .types.firestore import UpdateDocumentRequest 

101# from .types.firestore import WriteRequest 

102# from .types.firestore import WriteResponse 

103# from .types.query import Cursor 

104# from .types.query import StructuredQuery 

105# from .types.write import DocumentChange 

106# from .types.write import DocumentDelete 

107# from .types.write import DocumentRemove 

108from .types.write import DocumentTransform 

109 

110# from .types.write import ExistenceFilter 

111# from .types.write import Write 

112# from .types.write import WriteResult 

113 

114__all__: List[str] = [ 

115 "__version__", 

116 "And", 

117 "ArrayRemove", 

118 "ArrayUnion", 

119 "AsyncClient", 

120 "AsyncCollectionReference", 

121 "AsyncDocumentReference", 

122 "AsyncQuery", 

123 "async_transactional", 

124 "AsyncTransaction", 

125 "AsyncWriteBatch", 

126 "Client", 

127 "CountAggregation", 

128 "CollectionGroup", 

129 "CollectionReference", 

130 "DELETE_FIELD", 

131 "DocumentReference", 

132 "DocumentSnapshot", 

133 "DocumentTransform", 

134 "ExistsOption", 

135 "ExplainOptions", 

136 "FieldFilter", 

137 "GeoPoint", 

138 "Increment", 

139 "LastUpdateOption", 

140 "Maximum", 

141 "Minimum", 

142 "Or", 

143 "Query", 

144 "ReadAfterWriteError", 

145 "SERVER_TIMESTAMP", 

146 "Transaction", 

147 "transactional", 

148 "types", 

149 "Watch", 

150 "WriteBatch", 

151 "WriteOption", 

152]