volcano-sdk-python 0.9.1__py3-none-any.whl → 0.9.2__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.
- volcano_sdk/realtime.py +5 -2
- {volcano_sdk_python-0.9.1.dist-info → volcano_sdk_python-0.9.2.dist-info}/METADATA +13 -7
- {volcano_sdk_python-0.9.1.dist-info → volcano_sdk_python-0.9.2.dist-info}/RECORD +5 -5
- {volcano_sdk_python-0.9.1.dist-info → volcano_sdk_python-0.9.2.dist-info}/WHEEL +0 -0
- {volcano_sdk_python-0.9.1.dist-info → volcano_sdk_python-0.9.2.dist-info}/licenses/LICENSE +0 -0
volcano_sdk/realtime.py
CHANGED
|
@@ -768,7 +768,6 @@ class Channel:
|
|
|
768
768
|
not self._fetch_config.enabled
|
|
769
769
|
or change.mode != "lightweight"
|
|
770
770
|
or change.type == "DELETE"
|
|
771
|
-
or change.schema != "public"
|
|
772
771
|
or change.id is None
|
|
773
772
|
or database_name is None
|
|
774
773
|
):
|
|
@@ -776,7 +775,11 @@ class Channel:
|
|
|
776
775
|
return _PostgresFetchRequest(
|
|
777
776
|
database_name=database_name,
|
|
778
777
|
access_token=self._realtime._connection_token(),
|
|
779
|
-
table=
|
|
778
|
+
table=(
|
|
779
|
+
change.table
|
|
780
|
+
if change.schema == "public"
|
|
781
|
+
else f"{change.schema}.{change.table}"
|
|
782
|
+
),
|
|
780
783
|
row_id=change.id,
|
|
781
784
|
)
|
|
782
785
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: volcano-sdk-python
|
|
3
|
-
Version: 0.9.
|
|
3
|
+
Version: 0.9.2
|
|
4
4
|
Summary: Official Python SDK for Volcano
|
|
5
5
|
Project-URL: Homepage, https://volcano.dev
|
|
6
6
|
Project-URL: Repository, https://github.com/Kong/volcano-sdk-python
|
|
@@ -79,14 +79,18 @@ function = client.functions.invoke(
|
|
|
79
79
|
)
|
|
80
80
|
print(function.status, function.version, function.data)
|
|
81
81
|
|
|
82
|
-
logs
|
|
82
|
+
# Project logs use a control-plane project token, not this end-user session.
|
|
83
|
+
logs_client = VolcanoClient(
|
|
84
|
+
anon_key="ak_your_anon_key", access_token="vpat_your_project_token"
|
|
85
|
+
)
|
|
86
|
+
logs = logs_client.logs.search(
|
|
83
87
|
"00000000-0000-4000-8000-000000000001",
|
|
84
88
|
{"resource": {"type": "function"}, "limit": 100},
|
|
85
89
|
)
|
|
86
90
|
for event in logs.data:
|
|
87
91
|
print(event["timestamp"], event["body"])
|
|
88
92
|
|
|
89
|
-
activity =
|
|
93
|
+
activity = logs_client.logs.activity(
|
|
90
94
|
"00000000-0000-4000-8000-000000000001",
|
|
91
95
|
{"resource": {"type": "function"}, "bucket_count": 24},
|
|
92
96
|
)
|
|
@@ -226,7 +230,9 @@ ran; platform failures raise typed SDK errors.
|
|
|
226
230
|
`logs.search()` returns an immutable page of retained runtime or deployment log
|
|
227
231
|
events. Pass `next_cursor` back as `cursor` to continue a search. `logs.activity()`
|
|
228
232
|
returns immutable time buckets using the same resource selector and query syntax.
|
|
229
|
-
Both methods require
|
|
233
|
+
Both methods require a platform user token or a project access token.
|
|
234
|
+
A `read_only` project token is sufficient; end-user sessions cannot read project logs.
|
|
235
|
+
See the [logs guide](https://github.com/Kong/volcano-sdk-python/blob/main/docs/logs.md).
|
|
230
236
|
|
|
231
237
|
Database selects, inserts, updates, deletes, log reads, and authenticated storage
|
|
232
238
|
requests (including upload sessions and parts) refresh the captured
|
|
@@ -784,12 +790,12 @@ stop_changes()
|
|
|
784
790
|
```
|
|
785
791
|
|
|
786
792
|
Binding a database automatically fetches the matching row for lightweight
|
|
787
|
-
`INSERT` and `UPDATE` notifications in
|
|
793
|
+
`INSERT` and `UPDATE` notifications in public or custom schemas. The fetch uses the
|
|
788
794
|
realtime connection's RLS-scoped access token. Compatible row lookups are
|
|
789
795
|
batched while callback delivery preserves publication order.
|
|
790
796
|
If the row is absent or the query fails, the callback receives the lightweight
|
|
791
|
-
notification with its `id` and `mode` intact.
|
|
792
|
-
|
|
797
|
+
notification with its `id` and `mode` intact. Custom-schema row lookups preserve
|
|
798
|
+
the schema from the notification. Lightweight deletes never query the database; they
|
|
793
799
|
preserve `old_record`, or provide `{"id": change.id}` when no old row was
|
|
794
800
|
included. Tune a channel's batching with `fetch_batch_window_ms` and
|
|
795
801
|
`fetch_max_batch_size`; the defaults are 20 milliseconds and 50 rows. Set
|
|
@@ -17,7 +17,7 @@ volcano_sdk/locks.py,sha256=eSkidfHQ_wml5-1LT2hBtHxeALP6E1cGYK0FzHjbrNk,9241
|
|
|
17
17
|
volcano_sdk/logs.py,sha256=lxORRQBvsnJ0BdMau19MXrIeig5_mEucQSyJ4F1CZxU,4666
|
|
18
18
|
volcano_sdk/models.py,sha256=n5EdzkWzmOstXsuFlvfGOILRemQAqG2P4VCLMelW8SA,8690
|
|
19
19
|
volcano_sdk/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
20
|
-
volcano_sdk/realtime.py,sha256=
|
|
20
|
+
volcano_sdk/realtime.py,sha256=KJbEMEpCYqlbE4YYtu6Wt5YM379LQmWtXU-wRhni1T0,59597
|
|
21
21
|
volcano_sdk/storage.py,sha256=p16OV5ADI6JjMAJ7gx2gcmwk9t8--YiIZcOSLQLVlDY,26238
|
|
22
22
|
volcano_sdk/_generated/__init__.py,sha256=ZlB8wMYdN6EjpUS5W_lX3jsxq9G1kOcmUr-j3Fccfn8,164
|
|
23
23
|
volcano_sdk/_generated/client.py,sha256=GDzw6T2uRmPlUb1DImpBGxwy0dNbhmBknfvvIQW0GuU,12387
|
|
@@ -775,7 +775,7 @@ volcano_sdk/_generated/models/usage_data_point.py,sha256=d4U08JbVTiIMM_l2BmRILL1
|
|
|
775
775
|
volcano_sdk/_generated/models/variable.py,sha256=tvGDOMv77gW6j5skufnfrlNAhzCzA1F7nuPCQWx79yY,5926
|
|
776
776
|
volcano_sdk/_generated/models/variable_deploy_source.py,sha256=G_aCiFHzQx8WhJFs0GvYZEFclfTrfkDvd3kT1e3vty8,463
|
|
777
777
|
volcano_sdk/_generated/models/variable_status.py,sha256=THSsKBSiAYG4kAtBzGA4TZqxjgx8hdL0Q4qCdZfOj00,391
|
|
778
|
-
volcano_sdk_python-0.9.
|
|
779
|
-
volcano_sdk_python-0.9.
|
|
780
|
-
volcano_sdk_python-0.9.
|
|
781
|
-
volcano_sdk_python-0.9.
|
|
778
|
+
volcano_sdk_python-0.9.2.dist-info/METADATA,sha256=rJFF7ZXI76Kjkc_CyNAl6Dg5ryRKy2VjiOV4HBtIGLQ,35536
|
|
779
|
+
volcano_sdk_python-0.9.2.dist-info/WHEEL,sha256=THafob7ofN-NsuMN7Mg4qZyHaQI7KkD-QlcQatYhXPo,87
|
|
780
|
+
volcano_sdk_python-0.9.2.dist-info/licenses/LICENSE,sha256=AIHJy-5MFqM8fHfuGFTTb9a8rvJGypcVgN4aZ-7XTWw,11387
|
|
781
|
+
volcano_sdk_python-0.9.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|