polyapi-python 0.2.3.dev7__tar.gz → 0.2.3.dev9__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 (36) hide show
  1. {polyapi-python-0.2.3.dev7/polyapi_python.egg-info → polyapi_python-0.2.3.dev9}/PKG-INFO +1 -1
  2. {polyapi-python-0.2.3.dev7 → polyapi_python-0.2.3.dev9}/polyapi/client.py +1 -1
  3. {polyapi-python-0.2.3.dev7 → polyapi_python-0.2.3.dev9}/polyapi/utils.py +17 -3
  4. {polyapi-python-0.2.3.dev7 → polyapi_python-0.2.3.dev9/polyapi_python.egg-info}/PKG-INFO +1 -1
  5. {polyapi-python-0.2.3.dev7 → polyapi_python-0.2.3.dev9}/pyproject.toml +1 -1
  6. {polyapi-python-0.2.3.dev7 → polyapi_python-0.2.3.dev9}/LICENSE +0 -0
  7. {polyapi-python-0.2.3.dev7 → polyapi_python-0.2.3.dev9}/README.md +0 -0
  8. {polyapi-python-0.2.3.dev7 → polyapi_python-0.2.3.dev9}/polyapi/__init__.py +0 -0
  9. {polyapi-python-0.2.3.dev7 → polyapi_python-0.2.3.dev9}/polyapi/__main__.py +0 -0
  10. {polyapi-python-0.2.3.dev7 → polyapi_python-0.2.3.dev9}/polyapi/api.py +0 -0
  11. {polyapi-python-0.2.3.dev7 → polyapi_python-0.2.3.dev9}/polyapi/auth.py +0 -0
  12. {polyapi-python-0.2.3.dev7 → polyapi_python-0.2.3.dev9}/polyapi/cli.py +0 -0
  13. {polyapi-python-0.2.3.dev7 → polyapi_python-0.2.3.dev9}/polyapi/config.py +0 -0
  14. {polyapi-python-0.2.3.dev7 → polyapi_python-0.2.3.dev9}/polyapi/constants.py +0 -0
  15. {polyapi-python-0.2.3.dev7 → polyapi_python-0.2.3.dev9}/polyapi/error_handler.py +0 -0
  16. {polyapi-python-0.2.3.dev7 → polyapi_python-0.2.3.dev9}/polyapi/exceptions.py +0 -0
  17. {polyapi-python-0.2.3.dev7 → polyapi_python-0.2.3.dev9}/polyapi/execute.py +0 -0
  18. {polyapi-python-0.2.3.dev7 → polyapi_python-0.2.3.dev9}/polyapi/function_cli.py +0 -0
  19. {polyapi-python-0.2.3.dev7 → polyapi_python-0.2.3.dev9}/polyapi/generate.py +0 -0
  20. {polyapi-python-0.2.3.dev7 → polyapi_python-0.2.3.dev9}/polyapi/py.typed +0 -0
  21. {polyapi-python-0.2.3.dev7 → polyapi_python-0.2.3.dev9}/polyapi/schema.py +0 -0
  22. {polyapi-python-0.2.3.dev7 → polyapi_python-0.2.3.dev9}/polyapi/server.py +0 -0
  23. {polyapi-python-0.2.3.dev7 → polyapi_python-0.2.3.dev9}/polyapi/typedefs.py +0 -0
  24. {polyapi-python-0.2.3.dev7 → polyapi_python-0.2.3.dev9}/polyapi/variables.py +0 -0
  25. {polyapi-python-0.2.3.dev7 → polyapi_python-0.2.3.dev9}/polyapi/webhook.py +0 -0
  26. {polyapi-python-0.2.3.dev7 → polyapi_python-0.2.3.dev9}/polyapi_python.egg-info/SOURCES.txt +0 -0
  27. {polyapi-python-0.2.3.dev7 → polyapi_python-0.2.3.dev9}/polyapi_python.egg-info/dependency_links.txt +0 -0
  28. {polyapi-python-0.2.3.dev7 → polyapi_python-0.2.3.dev9}/polyapi_python.egg-info/requires.txt +0 -0
  29. {polyapi-python-0.2.3.dev7 → polyapi_python-0.2.3.dev9}/polyapi_python.egg-info/top_level.txt +0 -0
  30. {polyapi-python-0.2.3.dev7 → polyapi_python-0.2.3.dev9}/setup.cfg +0 -0
  31. {polyapi-python-0.2.3.dev7 → polyapi_python-0.2.3.dev9}/tests/test_api.py +0 -0
  32. {polyapi-python-0.2.3.dev7 → polyapi_python-0.2.3.dev9}/tests/test_auth.py +0 -0
  33. {polyapi-python-0.2.3.dev7 → polyapi_python-0.2.3.dev9}/tests/test_function_cli.py +0 -0
  34. {polyapi-python-0.2.3.dev7 → polyapi_python-0.2.3.dev9}/tests/test_server.py +0 -0
  35. {polyapi-python-0.2.3.dev7 → polyapi_python-0.2.3.dev9}/tests/test_utils.py +0 -0
  36. {polyapi-python-0.2.3.dev7 → polyapi_python-0.2.3.dev9}/tests/test_variables.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: polyapi-python
3
- Version: 0.2.3.dev7
3
+ Version: 0.2.3.dev9
4
4
  Summary: The PolyAPI Python Client
5
5
  Author-email: Dan Fellin <dan@polyapi.io>
6
6
  License: MIT License
@@ -22,4 +22,4 @@ def render_client_function(
22
22
  args_def=args_def,
23
23
  return_type_def=return_type_def,
24
24
  )
25
- return code, func_type_defs
25
+ return code + "\n\n", func_type_defs
@@ -1,5 +1,6 @@
1
1
  import re
2
2
  import os
3
+ import logging
3
4
  from typing import Tuple, List
4
5
  from colorama import Fore, Style
5
6
  from polyapi.constants import BASIC_PYTHON_TYPES
@@ -91,7 +92,11 @@ def get_type_and_def(type_spec: PropertyType) -> Tuple[str, str]:
91
92
  if type_spec.get("items"):
92
93
  items = type_spec["items"]
93
94
  if items.get("$ref"):
94
- return "ResponseType", generate_schema_types(type_spec, root="ResponseType") # type: ignore
95
+ try:
96
+ return "ResponseType", generate_schema_types(type_spec, root="ResponseType") # type: ignore
97
+ except:
98
+ logging.exception(f"Error when generating schema type: {type_spec}")
99
+ return "Dict", ""
95
100
  else:
96
101
  item_type, _ = get_type_and_def(items)
97
102
  title = f"List[{item_type}]"
@@ -108,7 +113,12 @@ def get_type_and_def(type_spec: PropertyType) -> Tuple[str, str]:
108
113
  if title:
109
114
  assert isinstance(title, str)
110
115
  title = clean_title(title)
111
- return title, generate_schema_types(schema, root=title) # type: ignore
116
+ try:
117
+ return title, generate_schema_types(schema, root=title) # type: ignore
118
+ except:
119
+ logging.exception(f"Error when generating schema type: {schema}")
120
+ return "Dict", ""
121
+
112
122
  elif schema.get("items"):
113
123
  # fallback to schema $ref name if no explicit title
114
124
  items = schema.get("items") # type: ignore
@@ -123,7 +133,11 @@ def get_type_and_def(type_spec: PropertyType) -> Tuple[str, str]:
123
133
  return "List", ""
124
134
 
125
135
  title = f"List[{title}]"
126
- return title, generate_schema_types(schema, root=title)
136
+ try:
137
+ return title, generate_schema_types(schema, root=title)
138
+ except:
139
+ logging.exception(f"Error when generating schema type: {schema}")
140
+ return "List", ""
127
141
  else:
128
142
  return "Any", ""
129
143
  else:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: polyapi-python
3
- Version: 0.2.3.dev7
3
+ Version: 0.2.3.dev9
4
4
  Summary: The PolyAPI Python Client
5
5
  Author-email: Dan Fellin <dan@polyapi.io>
6
6
  License: MIT License
@@ -3,7 +3,7 @@ requires = ["setuptools>=61.2", "wheel"]
3
3
 
4
4
  [project]
5
5
  name = "polyapi-python"
6
- version = "0.2.3.dev7"
6
+ version = "0.2.3.dev9"
7
7
  description = "The PolyAPI Python Client"
8
8
  authors = [{ name = "Dan Fellin", email = "dan@polyapi.io" }]
9
9
  dependencies = [