pyspiral 0.7.3__cp312-abi3-manylinux_2_28_x86_64.whl → 0.7.5__cp312-abi3-manylinux_2_28_x86_64.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 pyspiral might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyspiral
3
- Version: 0.7.3
3
+ Version: 0.7.5
4
4
  Classifier: Intended Audience :: Science/Research
5
5
  Classifier: Operating System :: OS Independent
6
6
  Classifier: Programming Language :: Python
@@ -1,8 +1,8 @@
1
- pyspiral-0.7.3.dist-info/METADATA,sha256=TtJj86_kdBud0rrEdvDL0Q2Xbx8pSOCXn-YyGfsNMuY,1874
2
- pyspiral-0.7.3.dist-info/WHEEL,sha256=ydlpo1_yEJ2g1Axq3LoOd_OfioJa2swc2j5IDCa4uho,107
3
- pyspiral-0.7.3.dist-info/entry_points.txt,sha256=R96Y3FpYX6XbQu9qMPfUTgiCcf4qM9OBQQZTDdBkZwA,74
1
+ pyspiral-0.7.5.dist-info/METADATA,sha256=ZZogea6_l7fIAEwj7iTpS9DEPJbjqHJnIK2QK3eOKBU,1874
2
+ pyspiral-0.7.5.dist-info/WHEEL,sha256=ydlpo1_yEJ2g1Axq3LoOd_OfioJa2swc2j5IDCa4uho,107
3
+ pyspiral-0.7.5.dist-info/entry_points.txt,sha256=R96Y3FpYX6XbQu9qMPfUTgiCcf4qM9OBQQZTDdBkZwA,74
4
4
  spiral/__init__.py,sha256=PwaYBWFBtB7cYi7peMmhk_Lm5XzjRoLwOtLbUhc1ZDo,1449
5
- spiral/_lib.abi3.so,sha256=DX0PITLKz2NUkFdkPxLSiA87Tex3vDNFPBF0PMh8egk,67499048
5
+ spiral/_lib.abi3.so,sha256=5a35sIpO3QEMLk71sc0wziRxtU8A7A80FNLCVNAP5iM,67680936
6
6
  spiral/adbc.py,sha256=7IxfWIeQN-fh0W5OdN_PP2x3pzQYg6ZUOLsHg3jktqw,14842
7
7
  spiral/api/__init__.py,sha256=ULBlVq3PnfNOO6T5naE_ULmmii-83--qTuN2PpAUQN0,2241
8
8
  spiral/api/admin.py,sha256=A1iVR1XYJSObZivPAD5UzmPuMgupXc9kaHNYYa_kwfs,585
@@ -13,7 +13,7 @@ spiral/api/organizations.py,sha256=B-8zZ7lFJANGK7dUNbo_aU-cgI959JBP9VcWb6wdgi0,1
13
13
  spiral/api/projects.py,sha256=1JC7VjqZJfwR6zfhBZr3OCwaf6zb-MXMOBTE_NztmcE,6356
14
14
  spiral/api/telemetry.py,sha256=tfdA3E_EWJwFVxkQfkm8tiYGRubnx2LuE5nbfsk1oG4,474
15
15
  spiral/api/text_indexes.py,sha256=_zVlGBytl-9-Unbu2POfZgLh40H1YRcagFtplgIG428,1828
16
- spiral/api/types.py,sha256=lGdiKViRgIEJXD2ubwnyEIEwHkfRumlZjVEaHMV3Tm8,682
16
+ spiral/api/types.py,sha256=HpHsoBuf7IdlXb7Dw-BkBkEvxBVIhkI8JviqhuoP9pY,696
17
17
  spiral/api/workers.py,sha256=0wZNUHMioDT53P1OBJfpjyDfIodHwwT6858z2IlRIM4,636
18
18
  spiral/api/workloads.py,sha256=XAyXV7vgZcoyyoPoGvOT4jTpyFKFMvrrAfhL6d1h1kE,1748
19
19
  spiral/arrow_.py,sha256=fdSIfIs7UjDxXZlppvOW0zz86W_70Pa5pagJilH2kOE,7583
@@ -39,7 +39,7 @@ spiral/client.py,sha256=53dVv8wxYMmozUfR8MVcUufKGqdVIdb0yZ0gchczBoQ,6426
39
39
  spiral/core/__init__.pyi,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
40
40
  spiral/core/_tools/__init__.pyi,sha256=b2KLfTOQ67pjfbYt07o0IGiTu5o2bZw69lllV8v0Dps,143
41
41
  spiral/core/authn/__init__.pyi,sha256=z_GWyIS62fuiYQrYO8hzw4W8oGaiciqS1u5qtAt54VY,769
42
- spiral/core/client/__init__.pyi,sha256=ajF8XaxThnTdsPpw1k3pPLEurIaDg9yeXqwIRJNlJTY,6665
42
+ spiral/core/client/__init__.pyi,sha256=ZoeCQnEauDbaR0X7aMfHBJtLnoc7ib4JXvsmst6cAUM,6993
43
43
  spiral/core/expr/__init__.pyi,sha256=3HSKjkotiEkxBvGBALXEBIie0JiyI9bCpehwA3nMQkU,571
44
44
  spiral/core/expr/images/__init__.pyi,sha256=wnE_wZXq7a4iqTg3SVm-ssxGw1WQZyk5dGOPaP4Btko,73
45
45
  spiral/core/expr/list_/__init__.pyi,sha256=Q_9c87eIQfZbqlaw_rq3fvs93YEsW7K5VYk6VZ4g6mU,126
@@ -61,7 +61,7 @@ spiral/debug/manifests.py,sha256=7f1O3ba9mrA5nXpOF9cEIQuUAteP5wiBkFy_diQJ7No,321
61
61
  spiral/debug/metrics.py,sha256=XdRDcjggtsLNGCAjam6IxG9072pz_d2C8iLApNRFUtk,2044
62
62
  spiral/debug/scan.py,sha256=UEm_aRnql5pwDPTpZgakMLNjlzkKL4RurBFFqH_BLAQ,9526
63
63
  spiral/enrichment.py,sha256=iKZn4tLsRQZPtaY-WdJSqPZ3H5UMfVyavcwTKO_3aCw,6980
64
- spiral/expressions/__init__.py,sha256=vMNFeeozkWph3dBpEkHPThUhZdT9ZZzxHe71HnkWlDU,8020
64
+ spiral/expressions/__init__.py,sha256=ZsD8g7vB0G7xy19GUiH4m79kw7KEkTQRwJl5Gn1cgtw,8049
65
65
  spiral/expressions/base.py,sha256=PvhJkcUSsPSIaxirHVzM9zlqyBXiaiia1HXohXdOmL4,5377
66
66
  spiral/expressions/file.py,sha256=7D9jIENJcoT0KFharBLkzK9dZgO4DYn5K_KCt0twefg,518
67
67
  spiral/expressions/http.py,sha256=OOHh0WBxg3vwza_m74-rkoQWSclRMI60aPAbQ6yKZi0,486
@@ -76,7 +76,7 @@ spiral/grpc_.py,sha256=f3czdP1Mxme42Y5--a5ogYq1TTiWn-J_MlGjwJ2mWwM,1015
76
76
  spiral/iceberg.py,sha256=JGq62Qnf296r9_hRAoH85GQq45-uSBjwXWw_CvPi6G4,930
77
77
  spiral/iterable_dataset.py,sha256=Eekg9ad8tcwXcloHWReBbvCSr5ZappRHn2ldKTvwqS0,4622
78
78
  spiral/key_space_index.py,sha256=NAB_nONEjpMYbse8suz42w7Qb5OPHuKN9h9CT2NJe08,1460
79
- spiral/project.py,sha256=VsokZgS0TqIel7UAXMyoBToxn-l_D3ivGwc41x7HLF0,7277
79
+ spiral/project.py,sha256=dkYc5iWZzz_HMKcu1EXUNNsI7hnEyGy8VrnKdVmKjjE,8199
80
80
  spiral/protogen/_/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
81
81
  spiral/protogen/_/arrow/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
82
82
  spiral/protogen/_/arrow/flight/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -106,4 +106,4 @@ spiral/table.py,sha256=ep8ZYtl6POebkPViR2FrekhFazNmAbOAESoLUODlup8,12242
106
106
  spiral/text_index.py,sha256=FQ9rgIEGLSJryS9lFdMhKtPFey18BXoWbPXyvZPJJ04,442
107
107
  spiral/transaction.py,sha256=KQhx3DvQyxG2C8md-YGsF_PgBRfayI0r_7ebMItDHdI,3938
108
108
  spiral/types_.py,sha256=W_jyO7F6rpPiH69jhgSgV7OxQZbOlb1Ho3InpKUP6Eo,155
109
- pyspiral-0.7.3.dist-info/RECORD,,
109
+ pyspiral-0.7.5.dist-info/RECORD,,
spiral/_lib.abi3.so CHANGED
Binary file
spiral/api/types.py CHANGED
@@ -12,6 +12,7 @@ def _validate_root_uri(uri: str) -> str:
12
12
  UserId = str
13
13
  OrgId = str
14
14
  ProjectId = str
15
+ TableId = str
15
16
  RoleId = str
16
17
  IndexId = str
17
18
  WorkerId = str
@@ -1,7 +1,7 @@
1
1
  from typing import Any, Literal
2
2
 
3
3
  import pyarrow as pa
4
- from spiral.api.types import DatasetName, IndexName, ProjectId, RootUri, TableName
4
+ from spiral.api.types import DatasetName, IndexName, ProjectId, RootUri, TableId, TableName
5
5
  from spiral.core.authn import Authn
6
6
  from spiral.core.table import ColumnGroupState, KeyRange, KeySpaceState, Scan, ScanState, Snapshot, Table, Transaction
7
7
  from spiral.core.table.spec import ColumnGroup, Schema
@@ -69,6 +69,22 @@ class Spiral:
69
69
  """Create a new table in the specified project."""
70
70
  ...
71
71
 
72
+ def move_table(
73
+ self,
74
+ table_id: TableId,
75
+ new_dataset: DatasetName,
76
+ ):
77
+ """Move a table to a dataset in the same project."""
78
+ ...
79
+
80
+ def rename_table(
81
+ self,
82
+ table_id: TableId,
83
+ new_table: TableName,
84
+ ):
85
+ """Rename a table."""
86
+ ...
87
+
72
88
  def text_index(self, index_id: str) -> TextIndex:
73
89
  """Get a text index."""
74
90
  ...
@@ -131,10 +131,10 @@ def evaluate(expr: ExprLike) -> pa.RecordBatchReader:
131
131
  if isinstance(expr, pa.Array):
132
132
  raise ValueError("Arrow array must be a struct array.")
133
133
 
134
- if isinstance(expr, Expr):
135
- raise NotImplementedError("cannot evaluate an Expr")
136
- if isinstance(expr, NativeExpr):
137
- raise NotImplementedError("cannot evaluate a NativeExpr")
134
+ if isinstance(expr, Expr) or isinstance(expr, NativeExpr):
135
+ raise NotImplementedError(
136
+ "Expr evaluation not supported yet. Use Arrow to write instead. Reach out if you require this feature."
137
+ )
138
138
 
139
139
  if isinstance(expr, dict):
140
140
  # NOTE: we assume this is a struct expression. We could be smarter and be context aware to determine if
spiral/project.py CHANGED
@@ -89,6 +89,34 @@ class Project:
89
89
 
90
90
  return Table(self._spiral, core_table, identifier=f"{self._id}.{dataset}.{table}")
91
91
 
92
+ def move_table(self, identifier: str, new_dataset: str):
93
+ """Move a table to a new dataset in the project.
94
+
95
+ Args:
96
+ identifier: The table identifier, in the form `dataset.table` or `table`.
97
+ new_dataset: The dataset into which to move this table.
98
+ """
99
+ table = self.table(identifier)
100
+
101
+ self._spiral.core.move_table(
102
+ table_id=table.table_id,
103
+ new_dataset=new_dataset,
104
+ )
105
+
106
+ def rename_table(self, identifier: str, new_table: str):
107
+ """Move a table to a new dataset in the project.
108
+
109
+ Args:
110
+ identifier: The table identifier, in the form `dataset.table` or `table`.
111
+ new_dataset: The dataset into which to move this table.
112
+ """
113
+ table = self.table(identifier)
114
+
115
+ self._spiral.core.rename_table(
116
+ table_id=table.table_id,
117
+ new_table=new_table,
118
+ )
119
+
92
120
  def _parse_table_identifier(self, identifier: str) -> tuple[str, str]:
93
121
  parts = identifier.split(".")
94
122
  if len(parts) == 1: