snowflake-sql-api 0.1.2__py3-none-any.whl → 0.1.3__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.
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
18
18
  commit_id: str | None
19
19
  __commit_id__: str | None
20
20
 
21
- __version__ = version = '0.1.2'
22
- __version_tuple__ = version_tuple = (0, 1, 2)
21
+ __version__ = version = '0.1.3'
22
+ __version_tuple__ = version_tuple = (0, 1, 3)
23
23
 
24
24
  __commit_id__ = commit_id = None
@@ -12,7 +12,17 @@ import os
12
12
  import time
13
13
  import uuid
14
14
  from pathlib import Path
15
- from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple
15
+ from typing import (
16
+ Any,
17
+ AsyncGenerator,
18
+ Callable,
19
+ Dict,
20
+ List,
21
+ Optional,
22
+ Sequence,
23
+ TextIO,
24
+ Tuple,
25
+ )
16
26
 
17
27
  import httpx
18
28
 
@@ -26,7 +36,13 @@ from .exceptions import (
26
36
  SnowflakeRequestError,
27
37
  SnowflakeTimeoutError,
28
38
  )
29
- from .pagination import fetch_all_partitions_async
39
+ from .exports import (
40
+ CSVWriter,
41
+ validate_batch_size,
42
+ validate_export_columns,
43
+ write_jsonl,
44
+ )
45
+ from .pagination import fetch_all_partitions_async, iter_result_rows_async
30
46
  from .retry import DEFAULT_RETRY_POLICY, RetryPolicy
31
47
  from .transport import AsyncTransport, StatementResponse
32
48
  from .types import ColumnMeta, Row, coerce_rows
@@ -201,13 +217,13 @@ class AsyncSnowflakeClient:
201
217
  )
202
218
  await asyncio.sleep(self._poll_interval)
203
219
 
204
- async def _collect(
220
+ async def _prepare_result(
205
221
  self,
206
222
  response: StatementResponse,
207
223
  *,
208
224
  timeout: Optional[float],
209
225
  poll: bool = True,
210
- ) -> Tuple[List[ColumnMeta], List[List[Any]]]:
226
+ ) -> Tuple[List[ColumnMeta], str, Dict[str, Any]]:
211
227
  if response.is_running:
212
228
  if not poll:
213
229
  raise ResultNotReady(statement_handle=response.statement_handle)
@@ -220,8 +236,27 @@ class AsyncSnowflakeClient:
220
236
  handle = response.statement_handle
221
237
  if handle is None:
222
238
  raise SnowflakeRequestError("completed statement has no handle")
223
- raw_rows = await fetch_all_partitions_async(self._transport, handle, body)
224
- return columns, raw_rows
239
+ return columns, handle, body
240
+
241
+ async def _collect(
242
+ self,
243
+ response: StatementResponse,
244
+ *,
245
+ timeout: Optional[float],
246
+ poll: bool = True,
247
+ ) -> Tuple[List[ColumnMeta], List[List[Any]]]:
248
+ columns, handle, body = await self._prepare_result(
249
+ response, timeout=timeout, poll=poll
250
+ )
251
+ return columns, await fetch_all_partitions_async(self._transport, handle, body)
252
+
253
+ async def _stream_result(
254
+ self, sql: str, params: Params
255
+ ) -> Tuple[List[ColumnMeta], AsyncGenerator[Row, None]]:
256
+ columns, handle, body = await self._prepare_result(
257
+ await self._run(sql, params), timeout=self._statement_timeout
258
+ )
259
+ return columns, iter_result_rows_async(self._transport, handle, body, columns)
225
260
 
226
261
  # -- query surface ----------------------------------------------------
227
262
 
@@ -233,6 +268,73 @@ class AsyncSnowflakeClient:
233
268
  )
234
269
  return coerce_rows(raw_rows, columns)
235
270
 
271
+ async def query_stream(
272
+ self, sql: str, params: Params = None
273
+ ) -> AsyncGenerator[Row, None]:
274
+ """Yield converted rows on demand; call directly with async for.
275
+
276
+ Submission starts on first iteration. Keep the client open while
277
+ consuming; await aclose() on a retained stream when stopping early.
278
+ """
279
+ _, rows = await self._stream_result(sql, params)
280
+ try:
281
+ async for row in rows:
282
+ yield row
283
+ finally:
284
+ await rows.aclose()
285
+
286
+ async def query_batches(
287
+ self, sql: str, params: Params = None, *, batch_size: int = 1000
288
+ ) -> AsyncGenerator[List[Row], None]:
289
+ """Yield batches of at most batch_size rows across partition boundaries."""
290
+ validate_batch_size(batch_size)
291
+ rows = self.query_stream(sql, params)
292
+ try:
293
+ batch: List[Row] = []
294
+ async for row in rows:
295
+ batch.append(row)
296
+ if len(batch) == batch_size:
297
+ yield batch
298
+ batch = []
299
+ if batch:
300
+ yield batch
301
+ finally:
302
+ await rows.aclose()
303
+
304
+ async def export_csv(self, sql: str, output: TextIO, params: Params = None) -> int:
305
+ """Await query I/O and write CSV to a caller-owned synchronous text sink.
306
+
307
+ Return the data-row count. Failures may leave partial output.
308
+ """
309
+ columns, rows = await self._stream_result(sql, params)
310
+ try:
311
+ writer = CSVWriter(output, columns)
312
+ count = 0
313
+ async for row in rows:
314
+ writer.write(row)
315
+ count += 1
316
+ finally:
317
+ await rows.aclose()
318
+ return count
319
+
320
+ async def export_jsonl(
321
+ self, sql: str, output: TextIO, params: Params = None
322
+ ) -> int:
323
+ """Await query I/O and write JSONL to a caller-owned synchronous text sink.
324
+
325
+ Return the row count. Failures may leave partial output.
326
+ """
327
+ columns, rows = await self._stream_result(sql, params)
328
+ try:
329
+ validate_export_columns(columns)
330
+ count = 0
331
+ async for row in rows:
332
+ write_jsonl(output, row)
333
+ count += 1
334
+ finally:
335
+ await rows.aclose()
336
+ return count
337
+
236
338
  async def query_one(self, sql: str, params: Params = None) -> Optional[Row]:
237
339
  """Return the first row, or ``None`` if the result is empty."""
238
340
  rows = await self.query(sql, params)
@@ -11,8 +11,19 @@ from __future__ import annotations
11
11
  import os
12
12
  import time
13
13
  import uuid
14
+ from contextlib import closing
14
15
  from pathlib import Path
15
- from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple
16
+ from typing import (
17
+ Any,
18
+ Callable,
19
+ Dict,
20
+ Generator,
21
+ List,
22
+ Optional,
23
+ Sequence,
24
+ TextIO,
25
+ Tuple,
26
+ )
16
27
 
17
28
  import httpx
18
29
 
@@ -25,7 +36,13 @@ from .exceptions import (
25
36
  SnowflakeRequestError,
26
37
  SnowflakeTimeoutError,
27
38
  )
28
- from .pagination import fetch_all_partitions
39
+ from .exports import (
40
+ CSVWriter,
41
+ validate_batch_size,
42
+ validate_export_columns,
43
+ write_jsonl,
44
+ )
45
+ from .pagination import fetch_all_partitions, iter_result_rows
29
46
  from .retry import DEFAULT_RETRY_POLICY, RetryPolicy
30
47
  from .transport import StatementResponse, Transport
31
48
  from .types import ColumnMeta, Row, coerce_rows
@@ -246,13 +263,13 @@ class SnowflakeClient:
246
263
  )
247
264
  time.sleep(self._poll_interval)
248
265
 
249
- def _collect(
266
+ def _prepare_result(
250
267
  self,
251
268
  response: StatementResponse,
252
269
  *,
253
270
  timeout: Optional[float],
254
271
  poll: bool = True,
255
- ) -> Tuple[List[ColumnMeta], List[List[Any]]]:
272
+ ) -> Tuple[List[ColumnMeta], str, Dict[str, Any]]:
256
273
  if response.is_running:
257
274
  if not poll:
258
275
  raise ResultNotReady(statement_handle=response.statement_handle)
@@ -265,8 +282,27 @@ class SnowflakeClient:
265
282
  handle = response.statement_handle
266
283
  if handle is None:
267
284
  raise SnowflakeRequestError("completed statement has no handle")
268
- raw_rows = fetch_all_partitions(self._transport, handle, body)
269
- return columns, raw_rows
285
+ return columns, handle, body
286
+
287
+ def _collect(
288
+ self,
289
+ response: StatementResponse,
290
+ *,
291
+ timeout: Optional[float],
292
+ poll: bool = True,
293
+ ) -> Tuple[List[ColumnMeta], List[List[Any]]]:
294
+ columns, handle, body = self._prepare_result(
295
+ response, timeout=timeout, poll=poll
296
+ )
297
+ return columns, fetch_all_partitions(self._transport, handle, body)
298
+
299
+ def _stream_result(
300
+ self, sql: str, params: Params
301
+ ) -> Tuple[List[ColumnMeta], Generator[Row, None, None]]:
302
+ columns, handle, body = self._prepare_result(
303
+ self._run(sql, params), timeout=self._statement_timeout
304
+ )
305
+ return columns, iter_result_rows(self._transport, handle, body, columns)
270
306
 
271
307
  # -- query surface ----------------------------------------------------
272
308
 
@@ -276,6 +312,60 @@ class SnowflakeClient:
276
312
  columns, raw_rows = self._collect(response, timeout=self._statement_timeout)
277
313
  return coerce_rows(raw_rows, columns)
278
314
 
315
+ def query_stream(
316
+ self, sql: str, params: Params = None
317
+ ) -> Generator[Row, None, None]:
318
+ """Yield converted rows, submitting on first iteration without prefetch.
319
+
320
+ Memory scales with the largest decoded server partition. Keep the client
321
+ open while iterating; close a retained stream when stopping early.
322
+ """
323
+ _, rows = self._stream_result(sql, params)
324
+ yield from rows
325
+
326
+ def query_batches(
327
+ self, sql: str, params: Params = None, *, batch_size: int = 1000
328
+ ) -> Generator[List[Row], None, None]:
329
+ """Yield batches of at most batch_size rows across partition boundaries."""
330
+ validate_batch_size(batch_size)
331
+ with closing(self.query_stream(sql, params)) as rows:
332
+ batch: List[Row] = []
333
+ for row in rows:
334
+ batch.append(row)
335
+ if len(batch) == batch_size:
336
+ yield batch
337
+ batch = []
338
+ if batch:
339
+ yield batch
340
+
341
+ def export_csv(self, sql: str, output: TextIO, params: Params = None) -> int:
342
+ """Stream CSV with a header to an open text sink; return the data-row count.
343
+
344
+ The caller owns the sink. Failures propagate and may leave partial output.
345
+ """
346
+ columns, rows = self._stream_result(sql, params)
347
+ with closing(rows):
348
+ writer = CSVWriter(output, columns)
349
+ count = 0
350
+ for row in rows:
351
+ writer.write(row)
352
+ count += 1
353
+ return count
354
+
355
+ def export_jsonl(self, sql: str, output: TextIO, params: Params = None) -> int:
356
+ """Stream JSON objects to an open text sink; return the row count.
357
+
358
+ The caller owns the sink. Failures propagate and may leave partial output.
359
+ """
360
+ columns, rows = self._stream_result(sql, params)
361
+ with closing(rows):
362
+ validate_export_columns(columns)
363
+ count = 0
364
+ for row in rows:
365
+ write_jsonl(output, row)
366
+ count += 1
367
+ return count
368
+
279
369
  def query_one(self, sql: str, params: Params = None) -> Optional[Row]:
280
370
  """Return the first row, or ``None`` if the result is empty."""
281
371
  rows = self.query(sql, params)
@@ -0,0 +1,71 @@
1
+ """CSV and JSONL serialization for caller-owned text streams."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import csv
6
+ import json
7
+ from datetime import date, datetime, time
8
+ from decimal import Decimal
9
+ from typing import Any, List, TextIO
10
+
11
+ from .exceptions import SnowflakeConfigError
12
+ from .types import ColumnMeta, Row
13
+
14
+
15
+ def validate_batch_size(batch_size: int) -> None:
16
+ if (
17
+ isinstance(batch_size, bool)
18
+ or not isinstance(batch_size, int)
19
+ or batch_size <= 0
20
+ ):
21
+ raise SnowflakeConfigError("batch_size must be a positive integer")
22
+
23
+
24
+ def validate_export_columns(columns: List[ColumnMeta]) -> None:
25
+ names = [column.name for column in columns]
26
+ if len(names) != len(set(names)):
27
+ raise SnowflakeConfigError(
28
+ "exports require unique column names; use distinct SQL aliases"
29
+ )
30
+
31
+
32
+ def _json_default(value: Any) -> str:
33
+ if isinstance(value, Decimal):
34
+ return str(value)
35
+ if isinstance(value, (datetime, date, time)):
36
+ return value.isoformat()
37
+ if isinstance(value, (bytes, bytearray)):
38
+ return bytes(value).hex()
39
+ raise TypeError(f"cannot serialize {type(value).__name__}")
40
+
41
+
42
+ def _json(value: Any) -> str:
43
+ return json.dumps(value, default=_json_default, ensure_ascii=False, allow_nan=False)
44
+
45
+
46
+ def _csv_value(value: Any) -> Any:
47
+ if value is None:
48
+ return ""
49
+ if isinstance(value, (dict, list, tuple, bool)):
50
+ return _json(value)
51
+ if isinstance(value, (Decimal, datetime, date, time, bytes, bytearray)):
52
+ return _json_default(value)
53
+ return value
54
+
55
+
56
+ class CSVWriter:
57
+ """Write a metadata-derived header, then one converted row at a time."""
58
+
59
+ def __init__(self, output: TextIO, columns: List[ColumnMeta]) -> None:
60
+ validate_export_columns(columns)
61
+ self._names = [column.name for column in columns]
62
+ self._writer = csv.writer(output)
63
+ self._writer.writerow(self._names)
64
+
65
+ def write(self, row: Row) -> None:
66
+ self._writer.writerow([_csv_value(row[name]) for name in self._names])
67
+
68
+
69
+ def write_jsonl(output: TextIO, row: Row) -> None:
70
+ """Write exactly one JSON record, using the CLI's native-value encodings."""
71
+ output.write(_json(row) + "\n")
@@ -12,12 +12,21 @@ partition 0 silently truncates large results (regression bug #4).
12
12
 
13
13
  from __future__ import annotations
14
14
 
15
- from typing import TYPE_CHECKING, Any, Dict, List
15
+ from typing import TYPE_CHECKING, Any, AsyncGenerator, Dict, Generator, List
16
+
17
+ from .exceptions import SnowflakeRequestError
18
+ from .types import ColumnMeta, Row, coerce_row
16
19
 
17
20
  if TYPE_CHECKING:
18
21
  from .transport import AsyncTransport, Transport
19
22
 
20
- __all__ = ["partition_count", "fetch_all_partitions", "fetch_all_partitions_async"]
23
+ __all__ = [
24
+ "partition_count",
25
+ "fetch_all_partitions",
26
+ "fetch_all_partitions_async",
27
+ "iter_result_rows",
28
+ "iter_result_rows_async",
29
+ ]
21
30
 
22
31
 
23
32
  def partition_count(first_body: Dict[str, Any]) -> int:
@@ -51,3 +60,72 @@ async def fetch_all_partitions_async(
51
60
  response = await transport.get_statement(statement_handle, partition=index)
52
61
  rows.extend(_rows(response.body))
53
62
  return rows
63
+
64
+
65
+ def _stream_data(body: Dict[str, Any]) -> List[Any]:
66
+ data = body.get("data")
67
+ if not isinstance(data, list):
68
+ raise SnowflakeRequestError("result partition data must be an array of rows")
69
+ return data
70
+
71
+
72
+ def _stream_row(raw: Any, columns: List[ColumnMeta]) -> Row:
73
+ if not isinstance(raw, list) or len(raw) != len(columns):
74
+ raise SnowflakeRequestError(
75
+ f"result row must be an array with {len(columns)} values"
76
+ )
77
+ return coerce_row(raw, columns)
78
+
79
+
80
+ def iter_result_rows(
81
+ transport: Transport,
82
+ statement_handle: str,
83
+ first_body: Dict[str, Any],
84
+ columns: List[ColumnMeta],
85
+ ) -> Generator[Row, None, None]:
86
+ """Decode rows on demand, releasing each partition before fetching the next."""
87
+ count = max(1, partition_count(first_body))
88
+ data = _stream_data(first_body)
89
+ del first_body
90
+ try:
91
+ for index in range(count):
92
+ if index:
93
+ data = _stream_data(
94
+ transport.get_statement(statement_handle, partition=index).body
95
+ )
96
+ offset = 0
97
+ while offset < len(data):
98
+ yield _stream_row(data[offset], columns)
99
+ offset += 1
100
+ data = []
101
+ finally:
102
+ # A caller may retain a closed generator; release its buffered rows.
103
+ data = []
104
+
105
+
106
+ async def iter_result_rows_async(
107
+ transport: AsyncTransport,
108
+ statement_handle: str,
109
+ first_body: Dict[str, Any],
110
+ columns: List[ColumnMeta],
111
+ ) -> AsyncGenerator[Row, None]:
112
+ """Async variant of iter_result_rows, without partition prefetch."""
113
+ count = max(1, partition_count(first_body))
114
+ data = _stream_data(first_body)
115
+ del first_body
116
+ try:
117
+ for index in range(count):
118
+ if index:
119
+ data = _stream_data(
120
+ (
121
+ await transport.get_statement(statement_handle, partition=index)
122
+ ).body
123
+ )
124
+ offset = 0
125
+ while offset < len(data):
126
+ yield _stream_row(data[offset], columns)
127
+ offset += 1
128
+ data = []
129
+ finally:
130
+ # A caller may retain a closed generator; release its buffered rows.
131
+ data = []
@@ -24,7 +24,7 @@ from datetime import date, datetime, time, timedelta, timezone
24
24
  from decimal import Decimal
25
25
  from typing import Any, Dict, List, Optional, Tuple
26
26
 
27
- __all__ = ["Row", "ColumnMeta", "coerce_value", "coerce_rows"]
27
+ __all__ = ["Row", "ColumnMeta", "coerce_value", "coerce_row", "coerce_rows"]
28
28
 
29
29
  #: A result row keyed by column name (Snowflake returns names as declared).
30
30
  Row = Dict[str, Any]
@@ -174,10 +174,14 @@ def coerce_value(raw: Any, column: ColumnMeta) -> Any:
174
174
  return raw
175
175
 
176
176
 
177
+ def coerce_row(raw_row: List[Any], columns: List[ColumnMeta]) -> Row:
178
+ """Coerce a single row using the result's column metadata."""
179
+ return {
180
+ col.name: coerce_value(cell, col)
181
+ for col, cell in zip(columns, raw_row, strict=False)
182
+ }
183
+
184
+
177
185
  def coerce_rows(raw_rows: List[List[Any]], columns: List[ColumnMeta]) -> List[Row]:
178
186
  """Coerce a partition of raw rows into a list of name-keyed :data:`Row`."""
179
- names = [c.name for c in columns]
180
- return [
181
- {name: coerce_value(cell, col) for name, col, cell in zip(names, columns, row)}
182
- for row in raw_rows
183
- ]
187
+ return [coerce_row(row, columns) for row in raw_rows]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: snowflake-sql-api
3
- Version: 0.1.2
3
+ Version: 0.1.3
4
4
  Summary: Lightweight, pure-Python client for Snowflake's SQL API v2
5
5
  Project-URL: Homepage, https://github.com/hampsterx/snowflake-sql-api
6
6
  Project-URL: Repository, https://github.com/hampsterx/snowflake-sql-api
@@ -34,20 +34,20 @@ Classifier: Intended Audience :: Developers
34
34
  Classifier: License :: OSI Approved :: MIT License
35
35
  Classifier: Operating System :: OS Independent
36
36
  Classifier: Programming Language :: Python :: 3
37
- Classifier: Programming Language :: Python :: 3.9
38
- Classifier: Programming Language :: Python :: 3.10
39
37
  Classifier: Programming Language :: Python :: 3.11
40
38
  Classifier: Programming Language :: Python :: 3.12
41
39
  Classifier: Programming Language :: Python :: 3.13
40
+ Classifier: Programming Language :: Python :: 3.14
41
+ Classifier: Programming Language :: Python :: 3.15
42
42
  Classifier: Programming Language :: Python :: Implementation :: CPython
43
43
  Classifier: Topic :: Database
44
44
  Classifier: Typing :: Typed
45
- Requires-Python: >=3.9
45
+ Requires-Python: >=3.11
46
46
  Requires-Dist: cryptography>=3.4
47
47
  Requires-Dist: httpx>=0.24
48
48
  Requires-Dist: pyjwt>=2.4
49
49
  Provides-Extra: dev
50
- Requires-Dist: black<25.10,>=24.0; extra == 'dev'
50
+ Requires-Dist: black<26.6,>=26.5; extra == 'dev'
51
51
  Requires-Dist: build>=1.0; extra == 'dev'
52
52
  Requires-Dist: coverage[toml]>=7.0; extra == 'dev'
53
53
  Requires-Dist: mypy>=1.8; extra == 'dev'
@@ -64,10 +64,16 @@ Description-Content-Type: text/markdown
64
64
 
65
65
  # snowflake-sql-api
66
66
 
67
+ [![CI](https://github.com/hampsterx/snowflake-sql-api/actions/workflows/ci.yml/badge.svg)](https://github.com/hampsterx/snowflake-sql-api/actions/workflows/ci.yml)
68
+ [![PyPI](https://img.shields.io/pypi/v/snowflake-sql-api)](https://pypi.org/project/snowflake-sql-api/)
69
+ [![Python versions](https://img.shields.io/pypi/pyversions/snowflake-sql-api)](https://pypi.org/project/snowflake-sql-api/)
70
+ [![License: MIT](https://img.shields.io/pypi/l/snowflake-sql-api)](LICENSE)
71
+ [![Typed](https://img.shields.io/badge/typing-typed-blue)](https://peps.python.org/pep-0561/)
72
+
67
73
  A lightweight, pure-Python client for [Snowflake's SQL API v2](https://docs.snowflake.com/en/developer-guide/sql-api/index)
68
74
  (the `POST /api/v2/statements` REST endpoint).
69
75
 
70
- > **Status: in active development, not yet released.** The API may change before `v0.1.0`.
76
+ > **Status: pre-1.0.** The API may still change between minor versions.
71
77
 
72
78
  ## Why
73
79
 
@@ -87,6 +93,7 @@ stays small and cold-starts quickly. Core dependencies: `httpx`, `PyJWT`,
87
93
  - Keypair (JWT) authentication, including encrypted private keys
88
94
  - Result type coercion (NUMBER/Decimal, dates/timestamps, VARIANT, and more)
89
95
  - Multi-partition result handling for large result sets
96
+ - Lazy row streams and bounded row batches, with CSV and JSONL exports
90
97
  - Query helpers, DML, batch insert, async statement submission
91
98
  - A small CLI for ad-hoc queries
92
99
  - Optional pandas (`[pandas]`) and typed-row (`[pydantic]`) helpers, kept out of
@@ -132,6 +139,22 @@ CLI:
132
139
  snowflake-sql-api query "SELECT current_version()"
133
140
  ```
134
141
 
142
+ Stream large results or export them without collecting every row:
143
+
144
+ ```python
145
+ with SnowflakeClient.from_env() as client:
146
+ for batch in client.query_batches("SELECT id, amount FROM sales", batch_size=500):
147
+ process(batch)
148
+
149
+ with open("sales.csv", "w", encoding="utf-8", newline="") as output:
150
+ count = client.export_csv("SELECT id, amount FROM sales", output)
151
+ ```
152
+
153
+ Streaming fetches completed results one server partition at a time. Memory scales
154
+ with the largest decoded partition plus the application batch. See
155
+ [streaming results and exports](docs/streaming.md) for row streams, async usage,
156
+ serialization, and partial-output behavior.
157
+
135
158
  ## Prior art and alternatives
136
159
 
137
160
  `snowflake-sql-api` is not the first REST-based Snowflake client. If it does not
@@ -146,10 +169,10 @@ fit your needs, one of these might:
146
169
  | [`rb_snowflake_client`](https://github.com/rinsed-org/rb-snowflake-client) | Ruby | Mature pure-Ruby SQL API client (streaming, connection pooling). |
147
170
  | [`rsql`](https://github.com/theseus-rs/rsql) | Rust | Multi-database SQL CLI with a Snowflake SQL API driver. |
148
171
 
149
- **How `snowflake-sql-api` differs:** pure Python over `httpx` with no dependency on
150
- the official connector (small install, fast cold start), paired sync and async
151
- clients, and keypair auth, type coercion, partition handling, and a CLI as tested
152
- first-class behavior.
172
+ **How `snowflake-sql-api` differs:** pure Python over `httpx`, with no
173
+ dependency on the official connector (small install, fast cold start), paired
174
+ sync and async clients, keypair auth, type coercion, partition handling, and a
175
+ CLI as tested first-class behavior.
153
176
 
154
177
  Note: the similarly named `snowflake-sql-api-async` and `snowflake-sql-api-client`
155
178
  are separate, unaffiliated projects.
@@ -1,21 +1,22 @@
1
1
  snowflake_sql_api/__init__.py,sha256=MIhD7NbOxroK3XNtH2zuF72F8SUEas8Mej4cKrHP1gk,1848
2
- snowflake_sql_api/_version.py,sha256=Q6ScJXlkBsUI-cazSvpYPMyIVUB-Vd0R3pq3_rM1wmI,520
3
- snowflake_sql_api/aclient.py,sha256=nfxH9OkgIaWEppKiL86mziZaNU9GYL4y1vYCFxUReBc,12106
2
+ snowflake_sql_api/_version.py,sha256=viarq5ZcPE6m7M15YjEVsiRlL7HdWBz-44nt_tqueY8,520
3
+ snowflake_sql_api/aclient.py,sha256=o-MBI_B_sHBiGn-jUAQq8p3PuCyNBX3Y7nDy5gFKsbU,15319
4
4
  snowflake_sql_api/auth.py,sha256=kenkotGbzwZVF3MMZp5NRXXqmQSdd5HffEWbFv-X3vQ,6904
5
5
  snowflake_sql_api/bindings.py,sha256=affZsvBFYK1XRLAsNK5O4BFdjNaBp-jMi4oqV9Y7Kmg,4167
6
6
  snowflake_sql_api/cli.py,sha256=OlOHBKp71MnXmn7pLJiBKkH1prrwXZfXq1PwXgEc1o0,2363
7
- snowflake_sql_api/client.py,sha256=yif4E-pM19M4nCKu_atlOLqjOJjYtTbep3bKJtVbUuc,13653
7
+ snowflake_sql_api/client.py,sha256=DwDWWWMiMzDLUsd7oUE6G4vREnXMui_riatmE2hmo5g,16606
8
8
  snowflake_sql_api/escaping.py,sha256=B9-IcXCAQC3DlZvfXAYV6s07wDpxHvcj27XC9snwzZo,2122
9
9
  snowflake_sql_api/exceptions.py,sha256=zJiXJeVLNdy1jex4zchIIgMYNr643uaSLZEMMmngT3g,3374
10
- snowflake_sql_api/pagination.py,sha256=I_L7cPTamvyW06Za-MX06OXEMtLavH574mbGeJa_F0U,1985
10
+ snowflake_sql_api/exports.py,sha256=IYn1dEFDIR7EpAib5wJWxE51AEKAnoJeVKW74J4rURw,2220
11
+ snowflake_sql_api/pagination.py,sha256=8GDH6F2g_C1EHQ597aHUY2gehCAoT5hhBCj70BqV3yA,4414
11
12
  snowflake_sql_api/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
13
  snowflake_sql_api/retry.py,sha256=Td2xjOWbZeWyiuaXETEvIs8fx8RnQeBlBtkR5u36-Ys,2450
13
14
  snowflake_sql_api/row_mapping.py,sha256=Tbfcp7SMJNjIUVS_ppP2E2DZRsjy2BP0a2F0x4DaIEk,728
14
15
  snowflake_sql_api/testing.py,sha256=o01frcPjdLklqTVLD2ty2A3yu7BJ71ErWRZ23jaSssY,24004
15
16
  snowflake_sql_api/transport.py,sha256=kSwhuyMZw8AtxNkIoeP8Zj2azdbf6hoEB3tGSW3FHb8,10621
16
- snowflake_sql_api/types.py,sha256=rc2ykc0Gj3BrIFlCqxrxisaWvR00pVp9qASKPlt4qYw,6364
17
- snowflake_sql_api-0.1.2.dist-info/METADATA,sha256=co8hplULGL2uxfqwGkq3171H38uPI_ZDR0wf8s6GjoI,6987
18
- snowflake_sql_api-0.1.2.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
19
- snowflake_sql_api-0.1.2.dist-info/entry_points.txt,sha256=__k9ZNjqRWfFCiDslpV2LnTogH5I6pOWRqau-oaGPm8,123
20
- snowflake_sql_api-0.1.2.dist-info/licenses/LICENSE,sha256=0Gk5s9Wzw2HmN_HtpZrvQPR87lTF_KU2ZrV0lExA6J4,1066
21
- snowflake_sql_api-0.1.2.dist-info/RECORD,,
17
+ snowflake_sql_api/types.py,sha256=JhqdzC-d3pqAriz0X83pFaOkND6K-M6fSNDcm-BQCOI,6523
18
+ snowflake_sql_api-0.1.3.dist-info/METADATA,sha256=IsqIsUdO6v4tWI_r9vNxOjcCofLK8HKdUb93GcgTLNs,8258
19
+ snowflake_sql_api-0.1.3.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
20
+ snowflake_sql_api-0.1.3.dist-info/entry_points.txt,sha256=__k9ZNjqRWfFCiDslpV2LnTogH5I6pOWRqau-oaGPm8,123
21
+ snowflake_sql_api-0.1.3.dist-info/licenses/LICENSE,sha256=0Gk5s9Wzw2HmN_HtpZrvQPR87lTF_KU2ZrV0lExA6J4,1066
22
+ snowflake_sql_api-0.1.3.dist-info/RECORD,,