polyapi-python 0.3.14.dev1__tar.gz → 0.3.14.dev2__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.
- {polyapi_python-0.3.14.dev1/polyapi_python.egg-info → polyapi_python-0.3.14.dev2}/PKG-INFO +4 -4
- {polyapi_python-0.3.14.dev1 → polyapi_python-0.3.14.dev2}/polyapi/constants.py +7 -4
- {polyapi_python-0.3.14.dev1 → polyapi_python-0.3.14.dev2/polyapi_python.egg-info}/PKG-INFO +4 -4
- {polyapi_python-0.3.14.dev1 → polyapi_python-0.3.14.dev2}/polyapi_python.egg-info/requires.txt +3 -3
- {polyapi_python-0.3.14.dev1 → polyapi_python-0.3.14.dev2}/pyproject.toml +4 -4
- {polyapi_python-0.3.14.dev1 → polyapi_python-0.3.14.dev2}/tests/test_tabi.py +17 -3
- {polyapi_python-0.3.14.dev1 → polyapi_python-0.3.14.dev2}/LICENSE +0 -0
- {polyapi_python-0.3.14.dev1 → polyapi_python-0.3.14.dev2}/README.md +0 -0
- {polyapi_python-0.3.14.dev1 → polyapi_python-0.3.14.dev2}/polyapi/__init__.py +0 -0
- {polyapi_python-0.3.14.dev1 → polyapi_python-0.3.14.dev2}/polyapi/__main__.py +0 -0
- {polyapi_python-0.3.14.dev1 → polyapi_python-0.3.14.dev2}/polyapi/api.py +0 -0
- {polyapi_python-0.3.14.dev1 → polyapi_python-0.3.14.dev2}/polyapi/auth.py +0 -0
- {polyapi_python-0.3.14.dev1 → polyapi_python-0.3.14.dev2}/polyapi/cli.py +0 -0
- {polyapi_python-0.3.14.dev1 → polyapi_python-0.3.14.dev2}/polyapi/client.py +0 -0
- {polyapi_python-0.3.14.dev1 → polyapi_python-0.3.14.dev2}/polyapi/config.py +0 -0
- {polyapi_python-0.3.14.dev1 → polyapi_python-0.3.14.dev2}/polyapi/deployables.py +0 -0
- {polyapi_python-0.3.14.dev1 → polyapi_python-0.3.14.dev2}/polyapi/error_handler.py +0 -0
- {polyapi_python-0.3.14.dev1 → polyapi_python-0.3.14.dev2}/polyapi/exceptions.py +0 -0
- {polyapi_python-0.3.14.dev1 → polyapi_python-0.3.14.dev2}/polyapi/execute.py +0 -0
- {polyapi_python-0.3.14.dev1 → polyapi_python-0.3.14.dev2}/polyapi/function_cli.py +0 -0
- {polyapi_python-0.3.14.dev1 → polyapi_python-0.3.14.dev2}/polyapi/generate.py +0 -0
- {polyapi_python-0.3.14.dev1 → polyapi_python-0.3.14.dev2}/polyapi/http_client.py +0 -0
- {polyapi_python-0.3.14.dev1 → polyapi_python-0.3.14.dev2}/polyapi/parser.py +0 -0
- {polyapi_python-0.3.14.dev1 → polyapi_python-0.3.14.dev2}/polyapi/poly_schemas.py +0 -0
- {polyapi_python-0.3.14.dev1 → polyapi_python-0.3.14.dev2}/polyapi/poly_tables.py +0 -0
- {polyapi_python-0.3.14.dev1 → polyapi_python-0.3.14.dev2}/polyapi/prepare.py +0 -0
- {polyapi_python-0.3.14.dev1 → polyapi_python-0.3.14.dev2}/polyapi/py.typed +0 -0
- {polyapi_python-0.3.14.dev1 → polyapi_python-0.3.14.dev2}/polyapi/rendered_spec.py +0 -0
- {polyapi_python-0.3.14.dev1 → polyapi_python-0.3.14.dev2}/polyapi/schema.py +0 -0
- {polyapi_python-0.3.14.dev1 → polyapi_python-0.3.14.dev2}/polyapi/server.py +0 -0
- {polyapi_python-0.3.14.dev1 → polyapi_python-0.3.14.dev2}/polyapi/sync.py +0 -0
- {polyapi_python-0.3.14.dev1 → polyapi_python-0.3.14.dev2}/polyapi/typedefs.py +0 -0
- {polyapi_python-0.3.14.dev1 → polyapi_python-0.3.14.dev2}/polyapi/utils.py +0 -0
- {polyapi_python-0.3.14.dev1 → polyapi_python-0.3.14.dev2}/polyapi/variables.py +0 -0
- {polyapi_python-0.3.14.dev1 → polyapi_python-0.3.14.dev2}/polyapi/webhook.py +0 -0
- {polyapi_python-0.3.14.dev1 → polyapi_python-0.3.14.dev2}/polyapi_python.egg-info/SOURCES.txt +0 -0
- {polyapi_python-0.3.14.dev1 → polyapi_python-0.3.14.dev2}/polyapi_python.egg-info/dependency_links.txt +0 -0
- {polyapi_python-0.3.14.dev1 → polyapi_python-0.3.14.dev2}/polyapi_python.egg-info/top_level.txt +0 -0
- {polyapi_python-0.3.14.dev1 → polyapi_python-0.3.14.dev2}/setup.cfg +0 -0
- {polyapi_python-0.3.14.dev1 → polyapi_python-0.3.14.dev2}/tests/test_api.py +0 -0
- {polyapi_python-0.3.14.dev1 → polyapi_python-0.3.14.dev2}/tests/test_async_proof.py +0 -0
- {polyapi_python-0.3.14.dev1 → polyapi_python-0.3.14.dev2}/tests/test_auth.py +0 -0
- {polyapi_python-0.3.14.dev1 → polyapi_python-0.3.14.dev2}/tests/test_deployables.py +0 -0
- {polyapi_python-0.3.14.dev1 → polyapi_python-0.3.14.dev2}/tests/test_generate.py +0 -0
- {polyapi_python-0.3.14.dev1 → polyapi_python-0.3.14.dev2}/tests/test_parser.py +0 -0
- {polyapi_python-0.3.14.dev1 → polyapi_python-0.3.14.dev2}/tests/test_rendered_spec.py +0 -0
- {polyapi_python-0.3.14.dev1 → polyapi_python-0.3.14.dev2}/tests/test_schema.py +0 -0
- {polyapi_python-0.3.14.dev1 → polyapi_python-0.3.14.dev2}/tests/test_server.py +0 -0
- {polyapi_python-0.3.14.dev1 → polyapi_python-0.3.14.dev2}/tests/test_utils.py +0 -0
- {polyapi_python-0.3.14.dev1 → polyapi_python-0.3.14.dev2}/tests/test_variables.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: polyapi-python
|
|
3
|
-
Version: 0.3.14.
|
|
3
|
+
Version: 0.3.14.dev2
|
|
4
4
|
Summary: The Python Client for PolyAPI, the IPaaS by Developers for Developers
|
|
5
5
|
Author-email: Dan Fellin <dan@polyapi.io>
|
|
6
6
|
License: MIT License
|
|
@@ -30,9 +30,9 @@ Description-Content-Type: text/markdown
|
|
|
30
30
|
License-File: LICENSE
|
|
31
31
|
Requires-Dist: requests>=2.32.3
|
|
32
32
|
Requires-Dist: typing_extensions>=4.12.2
|
|
33
|
-
Requires-Dist: jsonschema-gentypes==2.
|
|
34
|
-
Requires-Dist: pydantic
|
|
35
|
-
Requires-Dist: stdlib_list
|
|
33
|
+
Requires-Dist: jsonschema-gentypes==2.10.0
|
|
34
|
+
Requires-Dist: pydantic<3.0.0,>=2.8.0
|
|
35
|
+
Requires-Dist: stdlib_list<1.0.0,>=0.10.0
|
|
36
36
|
Requires-Dist: colorama==0.4.4
|
|
37
37
|
Requires-Dist: python-socketio[asyncio_client]==5.11.1
|
|
38
38
|
Requires-Dist: truststore>=0.8.0
|
|
@@ -3,8 +3,8 @@ JSONSCHEMA_TO_PYTHON_TYPE_MAP = {
|
|
|
3
3
|
"number": "float",
|
|
4
4
|
"string": "str",
|
|
5
5
|
"boolean": "bool",
|
|
6
|
-
"array": "
|
|
7
|
-
"object": "
|
|
6
|
+
"array": "list",
|
|
7
|
+
"object": "dict",
|
|
8
8
|
"function": "Callable",
|
|
9
9
|
"void": "None",
|
|
10
10
|
}
|
|
@@ -15,10 +15,13 @@ PYTHON_TO_JSONSCHEMA_TYPE_MAP = {
|
|
|
15
15
|
"float": "number",
|
|
16
16
|
"str": "string",
|
|
17
17
|
"bool": "boolean",
|
|
18
|
-
"
|
|
19
|
-
"
|
|
18
|
+
"list": "array",
|
|
19
|
+
"dict": "object",
|
|
20
20
|
"Callable": "function",
|
|
21
21
|
"None": "void",
|
|
22
|
+
# Keep uppercase aliases for backwards compatibility
|
|
23
|
+
"List": "array",
|
|
24
|
+
"Dict": "object",
|
|
22
25
|
}
|
|
23
26
|
|
|
24
27
|
BASIC_PYTHON_TYPES = set(PYTHON_TO_JSONSCHEMA_TYPE_MAP.keys())
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: polyapi-python
|
|
3
|
-
Version: 0.3.14.
|
|
3
|
+
Version: 0.3.14.dev2
|
|
4
4
|
Summary: The Python Client for PolyAPI, the IPaaS by Developers for Developers
|
|
5
5
|
Author-email: Dan Fellin <dan@polyapi.io>
|
|
6
6
|
License: MIT License
|
|
@@ -30,9 +30,9 @@ Description-Content-Type: text/markdown
|
|
|
30
30
|
License-File: LICENSE
|
|
31
31
|
Requires-Dist: requests>=2.32.3
|
|
32
32
|
Requires-Dist: typing_extensions>=4.12.2
|
|
33
|
-
Requires-Dist: jsonschema-gentypes==2.
|
|
34
|
-
Requires-Dist: pydantic
|
|
35
|
-
Requires-Dist: stdlib_list
|
|
33
|
+
Requires-Dist: jsonschema-gentypes==2.10.0
|
|
34
|
+
Requires-Dist: pydantic<3.0.0,>=2.8.0
|
|
35
|
+
Requires-Dist: stdlib_list<1.0.0,>=0.10.0
|
|
36
36
|
Requires-Dist: colorama==0.4.4
|
|
37
37
|
Requires-Dist: python-socketio[asyncio_client]==5.11.1
|
|
38
38
|
Requires-Dist: truststore>=0.8.0
|
{polyapi_python-0.3.14.dev1 → polyapi_python-0.3.14.dev2}/polyapi_python.egg-info/requires.txt
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
requests>=2.32.3
|
|
2
2
|
typing_extensions>=4.12.2
|
|
3
|
-
jsonschema-gentypes==2.
|
|
4
|
-
pydantic
|
|
5
|
-
stdlib_list
|
|
3
|
+
jsonschema-gentypes==2.10.0
|
|
4
|
+
pydantic<3.0.0,>=2.8.0
|
|
5
|
+
stdlib_list<1.0.0,>=0.10.0
|
|
6
6
|
colorama==0.4.4
|
|
7
7
|
python-socketio[asyncio_client]==5.11.1
|
|
8
8
|
truststore>=0.8.0
|
|
@@ -4,15 +4,15 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "polyapi-python"
|
|
7
|
-
version = "0.3.14.
|
|
7
|
+
version = "0.3.14.dev2"
|
|
8
8
|
description = "The Python Client for PolyAPI, the IPaaS by Developers for Developers"
|
|
9
9
|
authors = [{ name = "Dan Fellin", email = "dan@polyapi.io" }]
|
|
10
10
|
dependencies = [
|
|
11
11
|
"requests>=2.32.3",
|
|
12
12
|
"typing_extensions>=4.12.2",
|
|
13
|
-
"jsonschema-gentypes==2.
|
|
14
|
-
"pydantic>=2.8.0",
|
|
15
|
-
"stdlib_list>=0.10.0",
|
|
13
|
+
"jsonschema-gentypes==2.10.0",
|
|
14
|
+
"pydantic>=2.8.0,<3.0.0",
|
|
15
|
+
"stdlib_list>=0.10.0,<1.0.0",
|
|
16
16
|
"colorama==0.4.4",
|
|
17
17
|
"python-socketio[asyncio_client]==5.11.1",
|
|
18
18
|
"truststore>=0.8.0",
|
|
@@ -2,12 +2,26 @@ import unittest
|
|
|
2
2
|
from unittest.mock import Mock, patch
|
|
3
3
|
from polyapi.poly_tables import _render_table, TABI_MODULE_IMPORTS, execute_query
|
|
4
4
|
from polyapi.typedefs import TableSpecDto
|
|
5
|
+
import re
|
|
5
6
|
|
|
6
7
|
|
|
7
8
|
def _normalize_type_notation(value: str) -> str:
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
|
|
9
|
+
# Normalize type annotations to handle differences between Python versions
|
|
10
|
+
# and jsonschema-gentypes versions. This allows tests to pass regardless of
|
|
11
|
+
# whether the generator outputs:
|
|
12
|
+
# - dict[str, Any] vs Dict[str, Any]
|
|
13
|
+
# - list[...] vs List[...]
|
|
14
|
+
# - str | int vs Union[str, int]
|
|
15
|
+
|
|
16
|
+
# Normalize built-in generic style to typing style for comparison
|
|
17
|
+
result = value
|
|
18
|
+
# Handle dict/Dict
|
|
19
|
+
result = re.sub(r'\bdict\[', 'Dict[', result)
|
|
20
|
+
# Handle list/List
|
|
21
|
+
result = re.sub(r'\blist\[', 'List[', result)
|
|
22
|
+
# Normalize union syntax: "A | B | C" -> "Union[A, B, C]" (simplified, handles common cases)
|
|
23
|
+
# This is a basic normalization - complex nested unions may need manual attention
|
|
24
|
+
return result
|
|
11
25
|
|
|
12
26
|
|
|
13
27
|
TABLE_SPEC_SIMPLE: TableSpecDto = {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{polyapi_python-0.3.14.dev1 → polyapi_python-0.3.14.dev2}/polyapi_python.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{polyapi_python-0.3.14.dev1 → polyapi_python-0.3.14.dev2}/polyapi_python.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|