periplus-python-sdk 0.6.0__tar.gz → 0.6.1__tar.gz

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.
Files changed (24) hide show
  1. {periplus_python_sdk-0.6.0/src/periplus_python_sdk.egg-info → periplus_python_sdk-0.6.1}/PKG-INFO +10 -10
  2. {periplus_python_sdk-0.6.0 → periplus_python_sdk-0.6.1}/README.md +9 -9
  3. {periplus_python_sdk-0.6.0 → periplus_python_sdk-0.6.1}/pyproject.toml +1 -1
  4. {periplus_python_sdk-0.6.0 → periplus_python_sdk-0.6.1/src/periplus_python_sdk.egg-info}/PKG-INFO +10 -10
  5. {periplus_python_sdk-0.6.0 → periplus_python_sdk-0.6.1}/src/periplus_sdk/sql_api.py +2 -2
  6. {periplus_python_sdk-0.6.0 → periplus_python_sdk-0.6.1}/src/periplus_sdk/sqlalchemy.py +2 -2
  7. {periplus_python_sdk-0.6.0 → periplus_python_sdk-0.6.1}/tests/test_notebook.py +1 -0
  8. {periplus_python_sdk-0.6.0 → periplus_python_sdk-0.6.1}/tests/test_sql_api.py +1 -0
  9. {periplus_python_sdk-0.6.0 → periplus_python_sdk-0.6.1}/LICENSE +0 -0
  10. {periplus_python_sdk-0.6.0 → periplus_python_sdk-0.6.1}/NOTICE +0 -0
  11. {periplus_python_sdk-0.6.0 → periplus_python_sdk-0.6.1}/setup.cfg +0 -0
  12. {periplus_python_sdk-0.6.0 → periplus_python_sdk-0.6.1}/src/periplus_python_sdk.egg-info/SOURCES.txt +0 -0
  13. {periplus_python_sdk-0.6.0 → periplus_python_sdk-0.6.1}/src/periplus_python_sdk.egg-info/dependency_links.txt +0 -0
  14. {periplus_python_sdk-0.6.0 → periplus_python_sdk-0.6.1}/src/periplus_python_sdk.egg-info/entry_points.txt +0 -0
  15. {periplus_python_sdk-0.6.0 → periplus_python_sdk-0.6.1}/src/periplus_python_sdk.egg-info/requires.txt +0 -0
  16. {periplus_python_sdk-0.6.0 → periplus_python_sdk-0.6.1}/src/periplus_python_sdk.egg-info/top_level.txt +0 -0
  17. {periplus_python_sdk-0.6.0 → periplus_python_sdk-0.6.1}/src/periplus_sdk/__init__.py +0 -0
  18. {periplus_python_sdk-0.6.0 → periplus_python_sdk-0.6.1}/src/periplus_sdk/client.py +0 -0
  19. {periplus_python_sdk-0.6.0 → periplus_python_sdk-0.6.1}/src/periplus_sdk/dbapi.py +0 -0
  20. {periplus_python_sdk-0.6.0 → periplus_python_sdk-0.6.1}/src/periplus_sdk/errors.py +0 -0
  21. {periplus_python_sdk-0.6.0 → periplus_python_sdk-0.6.1}/src/periplus_sdk/py.typed +0 -0
  22. {periplus_python_sdk-0.6.0 → periplus_python_sdk-0.6.1}/src/periplus_sdk/types.py +0 -0
  23. {periplus_python_sdk-0.6.0 → periplus_python_sdk-0.6.1}/tests/test_client.py +0 -0
  24. {periplus_python_sdk-0.6.0 → periplus_python_sdk-0.6.1}/tests/test_dbapi.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: periplus-python-sdk
3
- Version: 0.6.0
3
+ Version: 0.6.1
4
4
  Summary: Read-only Python client for the public Periplus query API
5
5
  License-Expression: Apache-2.0
6
6
  Project-URL: Repository, https://github.com/elei-io/periplus
@@ -43,7 +43,7 @@ The client reuses HTTP connections; close it with a context manager or `close()`
43
43
  Install the notebook integration from PyPI:
44
44
 
45
45
  ```sh
46
- uv add "periplus-python-sdk[notebook]>=0.6.0"
46
+ uv add "periplus-python-sdk[notebook]>=0.6.1"
47
47
  ```
48
48
 
49
49
  In a Python setup cell, create a SQLAlchemy engine:
@@ -62,7 +62,7 @@ FROM public_v1.capture
62
62
  LIMIT 10
63
63
  ```
64
64
 
65
- Marimo displays the result as a table. Expand **pp → public_v1** in Data Sources
65
+ Marimo displays the result as a table. Expand **pp → periplus → public_v1** in Data Sources
66
66
  to discover views and expand a view to load its columns for SQL completion.
67
67
  Discovery uses bounded `SHOW TABLES` and `DESCRIBE` through the same public API;
68
68
  no internal catalogue or storage credentials are used. Truncated discovery fails
@@ -90,7 +90,7 @@ provide a shared snapshot or rollback. The adapter makes no transaction requests
90
90
 
91
91
  A complete notebook is in `examples/notebook.py`. The integration is tested with
92
92
  marimo 0.24.1 and SQLAlchemy 2.x. SQLAlchemy is included in the standard SDK install; the `notebook` extra adds
93
- marimo. Existing marimo environments only need `uv add "periplus-python-sdk>=0.6.0"`.
93
+ marimo. Existing marimo environments only need `uv add "periplus-python-sdk>=0.6.1"`.
94
94
  The returned object is a standard SQLAlchemy Engine, also usable with pandas and
95
95
  ordinary Python scripts. Engine creation is lazy; the first query opens a connection.
96
96
 
@@ -196,10 +196,10 @@ Use `aclose()` when managing an async client's lifetime explicitly.
196
196
  Install the public-v1 client from PyPI:
197
197
 
198
198
  ```sh
199
- python -m pip install "periplus-python-sdk>=0.6.0"
199
+ python -m pip install "periplus-python-sdk>=0.6.1"
200
200
  ```
201
201
 
202
- Version 0.6.0 supports the current public-v1 contract. For production, configure
202
+ Version 0.6.1 supports the current public-v1 contract. For production, configure
203
203
  `PERIPLUS_PUBLIC_URL=https://periplus.dev`; no API token is required.
204
204
  Run the installed package against an available public app:
205
205
 
@@ -211,11 +211,11 @@ PERIPLUS_PUBLIC_URL=http://localhost:8080 python packages/periplus-python-sdk/ex
211
211
 
212
212
  Repository CI publishes immutable releases from tags named
213
213
  `periplus-python-sdk-v<version>`. The tag must exactly match the static version
214
- in `pyproject.toml`; for example, version `0.6.0` is released with:
214
+ in `pyproject.toml`; for example, version `0.6.1` is released with:
215
215
 
216
216
  ```sh
217
- git tag periplus-python-sdk-v0.6.0
218
- git push origin periplus-python-sdk-v0.6.0
217
+ git tag periplus-python-sdk-v0.6.1
218
+ git push origin periplus-python-sdk-v0.6.1
219
219
  ```
220
220
 
221
221
  PyPI publishing uses Trusted Publishing rather than a stored API token. The
@@ -225,7 +225,7 @@ that GitHub environment with required reviewers before the first release.
225
225
 
226
226
  ## Public v1
227
227
 
228
- Install the updated SDK from PyPI with `python -m pip install "periplus-python-sdk>=0.6.0"`. The previously published 0.2.0 release predates this contract. `prepare` and `execute` accept keyword-only `schema_version="public_v1"` (the default); responses preserve `schema_version` separately from `source_snapshot`. Unavailable versions are rejected by the server.
228
+ Install the updated SDK from PyPI with `python -m pip install "periplus-python-sdk>=0.6.1"`. The previously published 0.2.0 release predates this contract. `prepare` and `execute` accept keyword-only `schema_version="public_v1"` (the default); responses preserve `schema_version` separately from `source_snapshot`. Unavailable versions are rejected by the server.
229
229
 
230
230
  ## License
231
231
 
@@ -25,7 +25,7 @@ The client reuses HTTP connections; close it with a context manager or `close()`
25
25
  Install the notebook integration from PyPI:
26
26
 
27
27
  ```sh
28
- uv add "periplus-python-sdk[notebook]>=0.6.0"
28
+ uv add "periplus-python-sdk[notebook]>=0.6.1"
29
29
  ```
30
30
 
31
31
  In a Python setup cell, create a SQLAlchemy engine:
@@ -44,7 +44,7 @@ FROM public_v1.capture
44
44
  LIMIT 10
45
45
  ```
46
46
 
47
- Marimo displays the result as a table. Expand **pp → public_v1** in Data Sources
47
+ Marimo displays the result as a table. Expand **pp → periplus → public_v1** in Data Sources
48
48
  to discover views and expand a view to load its columns for SQL completion.
49
49
  Discovery uses bounded `SHOW TABLES` and `DESCRIBE` through the same public API;
50
50
  no internal catalogue or storage credentials are used. Truncated discovery fails
@@ -72,7 +72,7 @@ provide a shared snapshot or rollback. The adapter makes no transaction requests
72
72
 
73
73
  A complete notebook is in `examples/notebook.py`. The integration is tested with
74
74
  marimo 0.24.1 and SQLAlchemy 2.x. SQLAlchemy is included in the standard SDK install; the `notebook` extra adds
75
- marimo. Existing marimo environments only need `uv add "periplus-python-sdk>=0.6.0"`.
75
+ marimo. Existing marimo environments only need `uv add "periplus-python-sdk>=0.6.1"`.
76
76
  The returned object is a standard SQLAlchemy Engine, also usable with pandas and
77
77
  ordinary Python scripts. Engine creation is lazy; the first query opens a connection.
78
78
 
@@ -178,10 +178,10 @@ Use `aclose()` when managing an async client's lifetime explicitly.
178
178
  Install the public-v1 client from PyPI:
179
179
 
180
180
  ```sh
181
- python -m pip install "periplus-python-sdk>=0.6.0"
181
+ python -m pip install "periplus-python-sdk>=0.6.1"
182
182
  ```
183
183
 
184
- Version 0.6.0 supports the current public-v1 contract. For production, configure
184
+ Version 0.6.1 supports the current public-v1 contract. For production, configure
185
185
  `PERIPLUS_PUBLIC_URL=https://periplus.dev`; no API token is required.
186
186
  Run the installed package against an available public app:
187
187
 
@@ -193,11 +193,11 @@ PERIPLUS_PUBLIC_URL=http://localhost:8080 python packages/periplus-python-sdk/ex
193
193
 
194
194
  Repository CI publishes immutable releases from tags named
195
195
  `periplus-python-sdk-v<version>`. The tag must exactly match the static version
196
- in `pyproject.toml`; for example, version `0.6.0` is released with:
196
+ in `pyproject.toml`; for example, version `0.6.1` is released with:
197
197
 
198
198
  ```sh
199
- git tag periplus-python-sdk-v0.6.0
200
- git push origin periplus-python-sdk-v0.6.0
199
+ git tag periplus-python-sdk-v0.6.1
200
+ git push origin periplus-python-sdk-v0.6.1
201
201
  ```
202
202
 
203
203
  PyPI publishing uses Trusted Publishing rather than a stored API token. The
@@ -207,7 +207,7 @@ that GitHub environment with required reviewers before the first release.
207
207
 
208
208
  ## Public v1
209
209
 
210
- Install the updated SDK from PyPI with `python -m pip install "periplus-python-sdk>=0.6.0"`. The previously published 0.2.0 release predates this contract. `prepare` and `execute` accept keyword-only `schema_version="public_v1"` (the default); responses preserve `schema_version` separately from `source_snapshot`. Unavailable versions are rejected by the server.
210
+ Install the updated SDK from PyPI with `python -m pip install "periplus-python-sdk>=0.6.1"`. The previously published 0.2.0 release predates this contract. `prepare` and `execute` accept keyword-only `schema_version="public_v1"` (the default); responses preserve `schema_version` separately from `source_snapshot`. Unavailable versions are rejected by the server.
211
211
 
212
212
  ## License
213
213
 
@@ -2,7 +2,7 @@
2
2
  license = "Apache-2.0"
3
3
  license-files = ["LICENSE", "NOTICE"]
4
4
  name = "periplus-python-sdk"
5
- version = "0.6.0"
5
+ version = "0.6.1"
6
6
  description = "Read-only Python client for the public Periplus query API"
7
7
  readme = "README.md"
8
8
  requires-python = ">=3.11"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: periplus-python-sdk
3
- Version: 0.6.0
3
+ Version: 0.6.1
4
4
  Summary: Read-only Python client for the public Periplus query API
5
5
  License-Expression: Apache-2.0
6
6
  Project-URL: Repository, https://github.com/elei-io/periplus
@@ -43,7 +43,7 @@ The client reuses HTTP connections; close it with a context manager or `close()`
43
43
  Install the notebook integration from PyPI:
44
44
 
45
45
  ```sh
46
- uv add "periplus-python-sdk[notebook]>=0.6.0"
46
+ uv add "periplus-python-sdk[notebook]>=0.6.1"
47
47
  ```
48
48
 
49
49
  In a Python setup cell, create a SQLAlchemy engine:
@@ -62,7 +62,7 @@ FROM public_v1.capture
62
62
  LIMIT 10
63
63
  ```
64
64
 
65
- Marimo displays the result as a table. Expand **pp → public_v1** in Data Sources
65
+ Marimo displays the result as a table. Expand **pp → periplus → public_v1** in Data Sources
66
66
  to discover views and expand a view to load its columns for SQL completion.
67
67
  Discovery uses bounded `SHOW TABLES` and `DESCRIBE` through the same public API;
68
68
  no internal catalogue or storage credentials are used. Truncated discovery fails
@@ -90,7 +90,7 @@ provide a shared snapshot or rollback. The adapter makes no transaction requests
90
90
 
91
91
  A complete notebook is in `examples/notebook.py`. The integration is tested with
92
92
  marimo 0.24.1 and SQLAlchemy 2.x. SQLAlchemy is included in the standard SDK install; the `notebook` extra adds
93
- marimo. Existing marimo environments only need `uv add "periplus-python-sdk>=0.6.0"`.
93
+ marimo. Existing marimo environments only need `uv add "periplus-python-sdk>=0.6.1"`.
94
94
  The returned object is a standard SQLAlchemy Engine, also usable with pandas and
95
95
  ordinary Python scripts. Engine creation is lazy; the first query opens a connection.
96
96
 
@@ -196,10 +196,10 @@ Use `aclose()` when managing an async client's lifetime explicitly.
196
196
  Install the public-v1 client from PyPI:
197
197
 
198
198
  ```sh
199
- python -m pip install "periplus-python-sdk>=0.6.0"
199
+ python -m pip install "periplus-python-sdk>=0.6.1"
200
200
  ```
201
201
 
202
- Version 0.6.0 supports the current public-v1 contract. For production, configure
202
+ Version 0.6.1 supports the current public-v1 contract. For production, configure
203
203
  `PERIPLUS_PUBLIC_URL=https://periplus.dev`; no API token is required.
204
204
  Run the installed package against an available public app:
205
205
 
@@ -211,11 +211,11 @@ PERIPLUS_PUBLIC_URL=http://localhost:8080 python packages/periplus-python-sdk/ex
211
211
 
212
212
  Repository CI publishes immutable releases from tags named
213
213
  `periplus-python-sdk-v<version>`. The tag must exactly match the static version
214
- in `pyproject.toml`; for example, version `0.6.0` is released with:
214
+ in `pyproject.toml`; for example, version `0.6.1` is released with:
215
215
 
216
216
  ```sh
217
- git tag periplus-python-sdk-v0.6.0
218
- git push origin periplus-python-sdk-v0.6.0
217
+ git tag periplus-python-sdk-v0.6.1
218
+ git push origin periplus-python-sdk-v0.6.1
219
219
  ```
220
220
 
221
221
  PyPI publishing uses Trusted Publishing rather than a stored API token. The
@@ -225,7 +225,7 @@ that GitHub environment with required reviewers before the first release.
225
225
 
226
226
  ## Public v1
227
227
 
228
- Install the updated SDK from PyPI with `python -m pip install "periplus-python-sdk>=0.6.0"`. The previously published 0.2.0 release predates this contract. `prepare` and `execute` accept keyword-only `schema_version="public_v1"` (the default); responses preserve `schema_version` separately from `source_snapshot`. Unavailable versions are rejected by the server.
228
+ Install the updated SDK from PyPI with `python -m pip install "periplus-python-sdk>=0.6.1"`. The previously published 0.2.0 release predates this contract. `prepare` and `execute` accept keyword-only `schema_version="public_v1"` (the default); responses preserve `schema_version` separately from `source_snapshot`. Unavailable versions are rejected by the server.
229
229
 
230
230
  ## License
231
231
 
@@ -20,6 +20,6 @@ def create_engine(
20
20
  dispose the engine when finished. Each query uses an independent server snapshot.
21
21
  """
22
22
  return _create_engine(
23
- URL.create("periplus", database=schema_version),
24
- connect_args={"base_url": base_url, "mode": mode, "timeout": timeout},
23
+ URL.create("periplus", database="periplus"),
24
+ connect_args={"base_url": base_url, "mode": mode, "timeout": timeout, "schema_version": schema_version},
25
25
  )
@@ -60,10 +60,10 @@ class PeriplusDialect(default.DefaultDialect):
60
60
 
61
61
  def create_connect_args(self, url):
62
62
  if url.username or url.password or url.host or url.port:
63
- raise exc.ArgumentError("Use periplus:///public_v1 with base_url and mode in connect_args.")
63
+ raise exc.ArgumentError("Use periplus:///periplus with base_url and mode in connect_args.")
64
64
  if url.query:
65
65
  raise exc.ArgumentError("Pass connection options in connect_args, not URL query parameters.")
66
- return [], {"schema_version": url.database or "public_v1"}
66
+ return [], {}
67
67
 
68
68
  def initialize(self, connection):
69
69
  self.default_schema_name = connection.connection.dbapi_connection.schema_version
@@ -56,6 +56,7 @@ class NotebookTests(unittest.TestCase):
56
56
  self.assertEqual(len(found),1)
57
57
  adapter=found[0][1]
58
58
  databases=adapter.get_databases(include_schemas=True,include_tables=True,include_table_details=True)
59
+ self.assertEqual(databases[0].name,'periplus')
59
60
  self.assertEqual(databases[0].schemas[0].name,'public_v1')
60
61
  table=databases[0].schemas[0].tables[0]
61
62
  self.assertEqual(table.name,'capture')
@@ -24,6 +24,7 @@ class SQLApiTests(unittest.TestCase):
24
24
  ):
25
25
  engine = sql_api.create_engine(mode=mode, timeout=37)
26
26
  self.assertIsInstance(engine, Engine)
27
+ self.assertEqual(engine.url.database, "periplus")
27
28
  self.assertEqual(requests, [])
28
29
  try:
29
30
  self.assertEqual(inspect(engine).default_schema_name, 'public_v1')