pixeltable 0.4.0rc3__py3-none-any.whl → 0.4.20__py3-none-any.whl

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.

Potentially problematic release.


This version of pixeltable might be problematic. Click here for more details.

Files changed (202) hide show
  1. pixeltable/__init__.py +23 -5
  2. pixeltable/_version.py +1 -0
  3. pixeltable/catalog/__init__.py +5 -3
  4. pixeltable/catalog/catalog.py +1318 -404
  5. pixeltable/catalog/column.py +186 -115
  6. pixeltable/catalog/dir.py +1 -2
  7. pixeltable/catalog/globals.py +11 -43
  8. pixeltable/catalog/insertable_table.py +167 -79
  9. pixeltable/catalog/path.py +61 -23
  10. pixeltable/catalog/schema_object.py +9 -10
  11. pixeltable/catalog/table.py +626 -308
  12. pixeltable/catalog/table_metadata.py +101 -0
  13. pixeltable/catalog/table_version.py +713 -569
  14. pixeltable/catalog/table_version_handle.py +37 -6
  15. pixeltable/catalog/table_version_path.py +42 -29
  16. pixeltable/catalog/tbl_ops.py +50 -0
  17. pixeltable/catalog/update_status.py +191 -0
  18. pixeltable/catalog/view.py +108 -94
  19. pixeltable/config.py +128 -22
  20. pixeltable/dataframe.py +188 -100
  21. pixeltable/env.py +407 -136
  22. pixeltable/exceptions.py +6 -0
  23. pixeltable/exec/__init__.py +3 -0
  24. pixeltable/exec/aggregation_node.py +7 -8
  25. pixeltable/exec/cache_prefetch_node.py +83 -110
  26. pixeltable/exec/cell_materialization_node.py +231 -0
  27. pixeltable/exec/cell_reconstruction_node.py +135 -0
  28. pixeltable/exec/component_iteration_node.py +4 -3
  29. pixeltable/exec/data_row_batch.py +8 -65
  30. pixeltable/exec/exec_context.py +16 -4
  31. pixeltable/exec/exec_node.py +13 -36
  32. pixeltable/exec/expr_eval/evaluators.py +7 -6
  33. pixeltable/exec/expr_eval/expr_eval_node.py +27 -12
  34. pixeltable/exec/expr_eval/globals.py +8 -5
  35. pixeltable/exec/expr_eval/row_buffer.py +1 -2
  36. pixeltable/exec/expr_eval/schedulers.py +190 -30
  37. pixeltable/exec/globals.py +32 -0
  38. pixeltable/exec/in_memory_data_node.py +18 -18
  39. pixeltable/exec/object_store_save_node.py +293 -0
  40. pixeltable/exec/row_update_node.py +16 -9
  41. pixeltable/exec/sql_node.py +206 -101
  42. pixeltable/exprs/__init__.py +1 -1
  43. pixeltable/exprs/arithmetic_expr.py +27 -22
  44. pixeltable/exprs/array_slice.py +3 -3
  45. pixeltable/exprs/column_property_ref.py +34 -30
  46. pixeltable/exprs/column_ref.py +92 -96
  47. pixeltable/exprs/comparison.py +5 -5
  48. pixeltable/exprs/compound_predicate.py +5 -4
  49. pixeltable/exprs/data_row.py +152 -55
  50. pixeltable/exprs/expr.py +62 -43
  51. pixeltable/exprs/expr_dict.py +3 -3
  52. pixeltable/exprs/expr_set.py +17 -10
  53. pixeltable/exprs/function_call.py +75 -37
  54. pixeltable/exprs/globals.py +1 -2
  55. pixeltable/exprs/in_predicate.py +4 -4
  56. pixeltable/exprs/inline_expr.py +10 -27
  57. pixeltable/exprs/is_null.py +1 -3
  58. pixeltable/exprs/json_mapper.py +8 -8
  59. pixeltable/exprs/json_path.py +56 -22
  60. pixeltable/exprs/literal.py +5 -5
  61. pixeltable/exprs/method_ref.py +2 -2
  62. pixeltable/exprs/object_ref.py +2 -2
  63. pixeltable/exprs/row_builder.py +127 -53
  64. pixeltable/exprs/rowid_ref.py +8 -12
  65. pixeltable/exprs/similarity_expr.py +50 -25
  66. pixeltable/exprs/sql_element_cache.py +4 -4
  67. pixeltable/exprs/string_op.py +5 -5
  68. pixeltable/exprs/type_cast.py +3 -5
  69. pixeltable/func/__init__.py +1 -0
  70. pixeltable/func/aggregate_function.py +8 -8
  71. pixeltable/func/callable_function.py +9 -9
  72. pixeltable/func/expr_template_function.py +10 -10
  73. pixeltable/func/function.py +18 -20
  74. pixeltable/func/function_registry.py +6 -7
  75. pixeltable/func/globals.py +2 -3
  76. pixeltable/func/mcp.py +74 -0
  77. pixeltable/func/query_template_function.py +20 -18
  78. pixeltable/func/signature.py +43 -16
  79. pixeltable/func/tools.py +23 -13
  80. pixeltable/func/udf.py +18 -20
  81. pixeltable/functions/__init__.py +6 -0
  82. pixeltable/functions/anthropic.py +93 -33
  83. pixeltable/functions/audio.py +114 -10
  84. pixeltable/functions/bedrock.py +13 -6
  85. pixeltable/functions/date.py +1 -1
  86. pixeltable/functions/deepseek.py +20 -9
  87. pixeltable/functions/fireworks.py +2 -2
  88. pixeltable/functions/gemini.py +28 -11
  89. pixeltable/functions/globals.py +13 -13
  90. pixeltable/functions/groq.py +108 -0
  91. pixeltable/functions/huggingface.py +1046 -23
  92. pixeltable/functions/image.py +9 -18
  93. pixeltable/functions/llama_cpp.py +23 -8
  94. pixeltable/functions/math.py +3 -4
  95. pixeltable/functions/mistralai.py +4 -15
  96. pixeltable/functions/ollama.py +16 -9
  97. pixeltable/functions/openai.py +104 -82
  98. pixeltable/functions/openrouter.py +143 -0
  99. pixeltable/functions/replicate.py +2 -2
  100. pixeltable/functions/reve.py +250 -0
  101. pixeltable/functions/string.py +21 -28
  102. pixeltable/functions/timestamp.py +13 -14
  103. pixeltable/functions/together.py +4 -6
  104. pixeltable/functions/twelvelabs.py +92 -0
  105. pixeltable/functions/util.py +6 -1
  106. pixeltable/functions/video.py +1388 -106
  107. pixeltable/functions/vision.py +7 -7
  108. pixeltable/functions/whisper.py +15 -7
  109. pixeltable/functions/whisperx.py +179 -0
  110. pixeltable/{ext/functions → functions}/yolox.py +2 -4
  111. pixeltable/globals.py +332 -105
  112. pixeltable/index/base.py +13 -22
  113. pixeltable/index/btree.py +23 -22
  114. pixeltable/index/embedding_index.py +32 -44
  115. pixeltable/io/__init__.py +4 -2
  116. pixeltable/io/datarows.py +7 -6
  117. pixeltable/io/external_store.py +49 -77
  118. pixeltable/io/fiftyone.py +11 -11
  119. pixeltable/io/globals.py +29 -28
  120. pixeltable/io/hf_datasets.py +17 -9
  121. pixeltable/io/label_studio.py +70 -66
  122. pixeltable/io/lancedb.py +3 -0
  123. pixeltable/io/pandas.py +12 -11
  124. pixeltable/io/parquet.py +13 -93
  125. pixeltable/io/table_data_conduit.py +71 -47
  126. pixeltable/io/utils.py +3 -3
  127. pixeltable/iterators/__init__.py +2 -1
  128. pixeltable/iterators/audio.py +21 -11
  129. pixeltable/iterators/document.py +116 -55
  130. pixeltable/iterators/image.py +5 -2
  131. pixeltable/iterators/video.py +293 -13
  132. pixeltable/metadata/__init__.py +4 -2
  133. pixeltable/metadata/converters/convert_18.py +2 -2
  134. pixeltable/metadata/converters/convert_19.py +2 -2
  135. pixeltable/metadata/converters/convert_20.py +2 -2
  136. pixeltable/metadata/converters/convert_21.py +2 -2
  137. pixeltable/metadata/converters/convert_22.py +2 -2
  138. pixeltable/metadata/converters/convert_24.py +2 -2
  139. pixeltable/metadata/converters/convert_25.py +2 -2
  140. pixeltable/metadata/converters/convert_26.py +2 -2
  141. pixeltable/metadata/converters/convert_29.py +4 -4
  142. pixeltable/metadata/converters/convert_34.py +2 -2
  143. pixeltable/metadata/converters/convert_36.py +2 -2
  144. pixeltable/metadata/converters/convert_37.py +15 -0
  145. pixeltable/metadata/converters/convert_38.py +39 -0
  146. pixeltable/metadata/converters/convert_39.py +124 -0
  147. pixeltable/metadata/converters/convert_40.py +73 -0
  148. pixeltable/metadata/converters/util.py +13 -12
  149. pixeltable/metadata/notes.py +4 -0
  150. pixeltable/metadata/schema.py +79 -42
  151. pixeltable/metadata/utils.py +74 -0
  152. pixeltable/mypy/__init__.py +3 -0
  153. pixeltable/mypy/mypy_plugin.py +123 -0
  154. pixeltable/plan.py +274 -223
  155. pixeltable/share/__init__.py +1 -1
  156. pixeltable/share/packager.py +259 -129
  157. pixeltable/share/protocol/__init__.py +34 -0
  158. pixeltable/share/protocol/common.py +170 -0
  159. pixeltable/share/protocol/operation_types.py +33 -0
  160. pixeltable/share/protocol/replica.py +109 -0
  161. pixeltable/share/publish.py +213 -57
  162. pixeltable/store.py +238 -175
  163. pixeltable/type_system.py +104 -63
  164. pixeltable/utils/__init__.py +2 -3
  165. pixeltable/utils/arrow.py +108 -13
  166. pixeltable/utils/av.py +298 -0
  167. pixeltable/utils/azure_store.py +305 -0
  168. pixeltable/utils/code.py +3 -3
  169. pixeltable/utils/console_output.py +4 -1
  170. pixeltable/utils/coroutine.py +6 -23
  171. pixeltable/utils/dbms.py +31 -5
  172. pixeltable/utils/description_helper.py +4 -5
  173. pixeltable/utils/documents.py +5 -6
  174. pixeltable/utils/exception_handler.py +7 -30
  175. pixeltable/utils/filecache.py +6 -6
  176. pixeltable/utils/formatter.py +4 -6
  177. pixeltable/utils/gcs_store.py +283 -0
  178. pixeltable/utils/http_server.py +2 -3
  179. pixeltable/utils/iceberg.py +1 -2
  180. pixeltable/utils/image.py +17 -0
  181. pixeltable/utils/lancedb.py +88 -0
  182. pixeltable/utils/local_store.py +316 -0
  183. pixeltable/utils/misc.py +5 -0
  184. pixeltable/utils/object_stores.py +528 -0
  185. pixeltable/utils/pydantic.py +60 -0
  186. pixeltable/utils/pytorch.py +5 -6
  187. pixeltable/utils/s3_store.py +392 -0
  188. pixeltable-0.4.20.dist-info/METADATA +587 -0
  189. pixeltable-0.4.20.dist-info/RECORD +218 -0
  190. {pixeltable-0.4.0rc3.dist-info → pixeltable-0.4.20.dist-info}/WHEEL +1 -1
  191. pixeltable-0.4.20.dist-info/entry_points.txt +2 -0
  192. pixeltable/__version__.py +0 -3
  193. pixeltable/ext/__init__.py +0 -17
  194. pixeltable/ext/functions/__init__.py +0 -11
  195. pixeltable/ext/functions/whisperx.py +0 -77
  196. pixeltable/utils/media_store.py +0 -77
  197. pixeltable/utils/s3.py +0 -17
  198. pixeltable/utils/sample.py +0 -25
  199. pixeltable-0.4.0rc3.dist-info/METADATA +0 -435
  200. pixeltable-0.4.0rc3.dist-info/RECORD +0 -189
  201. pixeltable-0.4.0rc3.dist-info/entry_points.txt +0 -3
  202. {pixeltable-0.4.0rc3.dist-info → pixeltable-0.4.20.dist-info/licenses}/LICENSE +0 -0
@@ -0,0 +1,34 @@
1
+ """
2
+ Pixeltable Core Protocol
3
+
4
+ This module contains the core protocol structures for pixeltable table operations
5
+ that can be shared between pixeltable core and cloud implementations.
6
+ """
7
+
8
+ from .common import PxtUri, RequestBaseModel, StorageDestination
9
+ from .operation_types import ReplicaOperationType
10
+ from .replica import (
11
+ DeleteRequest,
12
+ DeleteResponse,
13
+ FinalizeRequest,
14
+ FinalizeResponse,
15
+ PublishRequest,
16
+ PublishResponse,
17
+ ReplicateRequest,
18
+ ReplicateResponse,
19
+ )
20
+
21
+ __all__ = [
22
+ 'DeleteRequest',
23
+ 'DeleteResponse',
24
+ 'FinalizeRequest',
25
+ 'FinalizeResponse',
26
+ 'PublishRequest',
27
+ 'PublishResponse',
28
+ 'PxtUri',
29
+ 'ReplicaOperationType',
30
+ 'ReplicateRequest',
31
+ 'ReplicateResponse',
32
+ 'RequestBaseModel',
33
+ 'StorageDestination',
34
+ ]
@@ -0,0 +1,170 @@
1
+ from __future__ import annotations
2
+
3
+ import uuid
4
+ from abc import ABC, abstractmethod
5
+ from enum import Enum
6
+ from typing import Any
7
+ from urllib.parse import urlparse
8
+ from uuid import UUID
9
+
10
+ from pydantic import BaseModel, model_validator
11
+
12
+
13
+ class StorageDestination(str, Enum):
14
+ """Storage destination types for table snapshots."""
15
+
16
+ S3 = 's3'
17
+ R2 = 'r2'
18
+ GCS = 'gcs'
19
+
20
+
21
+ def is_valid_uuid(uuid_string: str) -> bool:
22
+ """Check if a string is a valid UUID."""
23
+ try:
24
+ uuid.UUID(uuid_string)
25
+ return True
26
+ except (ValueError, TypeError):
27
+ return False
28
+
29
+
30
+ class PxtUri(BaseModel):
31
+ """Pixeltable URI model for pxt:// URIs with validation and parsing."""
32
+
33
+ uri: str # The full URI string
34
+
35
+ # Parsed components
36
+ org: str # Organization slug from the URI
37
+ db: str | None # Database slug from the URI (optional)
38
+ path: str | None = None # The table or directory path (None if using UUID)
39
+ id: UUID | None = None # The table UUID (None if using path)
40
+ version: int | None = None # Optional version number parsed from URI (format: identifier:<version>)
41
+
42
+ def __init__(self, uri: str | dict | None = None, **kwargs: Any) -> None:
43
+ # Handle dict input directly (from JSON deserialization or explicit dict)
44
+ if isinstance(uri, dict):
45
+ # Dict input goes directly to Pydantic, which will call parse_uri
46
+ kwargs.update(uri)
47
+ elif uri is not None:
48
+ # Validate that uri is a string when passed as positional argument
49
+ if not isinstance(uri, str):
50
+ raise ValueError(f'Invalid data type for PxtUri: expected str or dict, got {type(uri)}')
51
+ kwargs['uri'] = uri
52
+ super().__init__(**kwargs)
53
+
54
+ @model_validator(mode='before')
55
+ @classmethod
56
+ def parse_uri(cls, data: Any) -> dict:
57
+ # Handle case where data is already a string (from JSON deserialization)
58
+ if isinstance(data, str):
59
+ uri = data
60
+ elif isinstance(data, dict):
61
+ uri = data.get('uri')
62
+ if uri is None:
63
+ raise ValueError('URI must be provided in dict with "uri" key')
64
+ if not isinstance(uri, str):
65
+ raise ValueError(f'URI in dict must be a string, got {type(uri)}')
66
+ else:
67
+ raise ValueError(f'Invalid data type for PxtUri: expected str or dict, got {type(data)}')
68
+
69
+ return {'uri': uri, **cls._parse_and_validate_uri(uri)}
70
+
71
+ def __str__(self) -> str:
72
+ """Return the URI string."""
73
+ return self.uri
74
+
75
+ @classmethod
76
+ def _parse_and_validate_uri(cls, uri: str) -> dict:
77
+ """Parse and validate a URI string, return parsed components."""
78
+ if not uri.startswith('pxt://'):
79
+ raise ValueError('URI must start with pxt://')
80
+
81
+ parsed = urlparse(uri)
82
+ if parsed.scheme != 'pxt':
83
+ raise ValueError('URI must use pxt:// scheme')
84
+
85
+ if not parsed.netloc:
86
+ raise ValueError('URI must have an organization')
87
+
88
+ # Parse netloc for org and optional db
89
+ netloc_parts = parsed.netloc.split(':')
90
+ org = netloc_parts[0]
91
+ if not org:
92
+ raise ValueError('URI must have an organization')
93
+
94
+ db = netloc_parts[1] if len(netloc_parts) > 1 else None
95
+
96
+ # Allow root path (/) as valid, but reject missing path
97
+ if parsed.path is None:
98
+ raise ValueError('URI must have a path')
99
+
100
+ # Get path and remove leading slash (but keep empty string for root path)
101
+ # path will be '/' for root directory or '/path/to/table' for regular paths
102
+ path_part = parsed.path.lstrip('/') if parsed.path else ''
103
+
104
+ # Handle version parsing (format: identifier:version)
105
+ # For root path, path_part will be empty string after lstrip
106
+ if path_part and ':' in path_part:
107
+ parts = path_part.rsplit(':', 1) # Split from right, only once
108
+ if len(parts) == 2 and parts[1].isdigit():
109
+ identifier, version = parts[0], int(parts[1])
110
+ else:
111
+ identifier, version = path_part, None
112
+ else:
113
+ identifier, version = path_part, None
114
+
115
+ # Parse identifier into either a path string or UUID
116
+ path: str | None = None
117
+ id: UUID | None = None
118
+ if identifier:
119
+ if is_valid_uuid(identifier):
120
+ # It's a UUID
121
+ id = UUID(identifier)
122
+ else:
123
+ # It's a path - keep as string (URI format uses / as separator)
124
+ # Empty string means root path
125
+ path = identifier or ''
126
+ else:
127
+ # Empty identifier means root path
128
+ path = ''
129
+
130
+ return {'org': org, 'db': db, 'path': path, 'id': id, 'version': version}
131
+
132
+ @classmethod
133
+ def from_components(
134
+ cls,
135
+ org: str,
136
+ path: str | None = None,
137
+ id: UUID | None = None,
138
+ db: str | None = None,
139
+ version: int | None = None,
140
+ ) -> PxtUri:
141
+ """Construct a PxtUri from its components."""
142
+ if path is None and id is None:
143
+ raise ValueError('Either path or id must be provided')
144
+ if path is not None and id is not None:
145
+ raise ValueError('Cannot specify both path and id')
146
+
147
+ # Build the URI string from components
148
+ netloc = org if db is None else f'{org}:{db}'
149
+
150
+ # Use path or UUID as identifier
151
+ if id is not None:
152
+ identifier = str(id)
153
+ elif path is not None:
154
+ # Path is already in URI format (slash-separated)
155
+ identifier = path or ''
156
+ else:
157
+ identifier = ''
158
+
159
+ path_part = f'{identifier}:{version}' if version is not None else identifier
160
+ uri = f'pxt://{netloc}/{path_part}'
161
+ return cls(uri=uri)
162
+
163
+
164
+ class RequestBaseModel(BaseModel, ABC):
165
+ """Abstract base model for protocol requests that must have a PxtUri."""
166
+
167
+ @abstractmethod
168
+ def get_pxt_uri(self) -> PxtUri:
169
+ """Get the PxtUri from this request. Must be implemented by subclasses."""
170
+ pass
@@ -0,0 +1,33 @@
1
+ """
2
+ Replica operation types for pixeltable table replica operations.
3
+
4
+ This module defines the replica operation types that are shared between
5
+ pixeltable core and cloud implementations.
6
+ """
7
+
8
+ from __future__ import annotations
9
+
10
+ from enum import Enum
11
+
12
+
13
+ class ReplicaOperationType(str, Enum):
14
+ """Replica operation types for table replica operations."""
15
+
16
+ # Table replica operations
17
+ PUBLISH_REPLICA = 'publish_replica'
18
+ FINALIZE_REPLICA = 'finalize_replica'
19
+ CLONE_REPLICA = 'clone_replica'
20
+ DELETE_REPLICA = 'delete_replica'
21
+
22
+ def is_replica_operation(self) -> bool:
23
+ """Check if operation is a replica operation."""
24
+ return self in REPLICA_OPERATIONS
25
+
26
+
27
+ # Define the operation sets as module-level constants
28
+ REPLICA_OPERATIONS: set[ReplicaOperationType] = {
29
+ ReplicaOperationType.PUBLISH_REPLICA,
30
+ ReplicaOperationType.FINALIZE_REPLICA,
31
+ ReplicaOperationType.CLONE_REPLICA,
32
+ ReplicaOperationType.DELETE_REPLICA,
33
+ }
@@ -0,0 +1,109 @@
1
+ """
2
+ Core table protocol for pixeltable operations.
3
+
4
+ This module contains the core table protocol structures that can be shared
5
+ between pixeltable core and cloud implementations.
6
+ """
7
+
8
+ from __future__ import annotations
9
+
10
+ from typing import Any, Literal
11
+ from uuid import UUID
12
+
13
+ from pydantic import AnyUrl, BaseModel
14
+
15
+ from pixeltable.catalog.table_version import TableVersionCompleteMd
16
+
17
+ from .common import PxtUri, RequestBaseModel, StorageDestination
18
+ from .operation_types import ReplicaOperationType
19
+
20
+
21
+ class PublishRequest(RequestBaseModel):
22
+ """Request to publish or push table replica."""
23
+
24
+ operation_type: Literal[ReplicaOperationType.PUBLISH_REPLICA] = ReplicaOperationType.PUBLISH_REPLICA
25
+ table_uri: PxtUri # If PxtUri#id is not None then it's considered a push replica request
26
+ pxt_version: str
27
+ pxt_md_version: int
28
+ md: list[TableVersionCompleteMd]
29
+ is_public: bool = False
30
+ bucket_name: str | None = None # Optional bucket name, falls back to org's default bucket if not provided
31
+
32
+ def get_pxt_uri(self) -> PxtUri:
33
+ """Get the PxtUri from this request."""
34
+ return self.table_uri
35
+
36
+
37
+ class PublishResponse(BaseModel):
38
+ """Response from publishing a table replica."""
39
+
40
+ upload_id: UUID
41
+ destination: StorageDestination
42
+ destination_uri: AnyUrl
43
+ max_size: int | None = None # Maximum size that can be used by this replica, used for R2 home buckets
44
+
45
+
46
+ class FinalizeRequest(RequestBaseModel):
47
+ """Request to finalize a table replica."""
48
+
49
+ operation_type: Literal[ReplicaOperationType.FINALIZE_REPLICA] = ReplicaOperationType.FINALIZE_REPLICA
50
+ table_uri: PxtUri # Use same table_uri that was given during publish replica request
51
+ upload_id: UUID
52
+ size: int
53
+ sha256: str
54
+ datafile: str
55
+ row_count: int
56
+ preview_header: dict[str, str]
57
+ preview_data: list[list[Any]]
58
+
59
+ def get_pxt_uri(self) -> PxtUri:
60
+ """Get the PxtUri from this request."""
61
+ return self.table_uri
62
+
63
+
64
+ class FinalizeResponse(BaseModel):
65
+ """Response from finalizing a table replica."""
66
+
67
+ confirmed_table_uri: PxtUri
68
+ version: int | None = None # Version that was pushed to replica
69
+
70
+
71
+ class DeleteRequest(RequestBaseModel):
72
+ """Request to delete a table replica."""
73
+
74
+ operation_type: Literal[ReplicaOperationType.DELETE_REPLICA] = ReplicaOperationType.DELETE_REPLICA
75
+ table_uri: PxtUri
76
+ version: int | None = None # Delete a version in replica
77
+
78
+ def get_pxt_uri(self) -> PxtUri:
79
+ """Get the PxtUri from this request."""
80
+ return self.table_uri
81
+
82
+
83
+ class DeleteResponse(BaseModel):
84
+ """Response from deleting a table replica."""
85
+
86
+ table_uri: PxtUri
87
+ version: int | None = None
88
+
89
+
90
+ class ReplicateRequest(RequestBaseModel):
91
+ """Request to clone a table replica."""
92
+
93
+ operation_type: Literal[ReplicaOperationType.CLONE_REPLICA] = ReplicaOperationType.CLONE_REPLICA
94
+ table_uri: PxtUri
95
+
96
+ def get_pxt_uri(self) -> PxtUri:
97
+ """Get the PxtUri from this request."""
98
+ return self.table_uri
99
+
100
+
101
+ class ReplicateResponse(BaseModel):
102
+ """Response from cloning a table replica."""
103
+
104
+ table_uri: PxtUri
105
+ pxt_md_version: int
106
+ destination: StorageDestination
107
+ destination_uri: AnyUrl
108
+ md: list[TableVersionCompleteMd]
109
+ version: int | None = None