polyapi-python 0.0.16__tar.gz → 0.0.18__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 (26) hide show
  1. {polyapi-python-0.0.16/polyapi_python.egg-info → polyapi-python-0.0.18}/PKG-INFO +1 -1
  2. {polyapi-python-0.0.16 → polyapi-python-0.0.18}/polyapi/api.py +6 -1
  3. {polyapi-python-0.0.16 → polyapi-python-0.0.18}/polyapi/generate.py +0 -1
  4. {polyapi-python-0.0.16 → polyapi-python-0.0.18/polyapi_python.egg-info}/PKG-INFO +1 -1
  5. {polyapi-python-0.0.16 → polyapi-python-0.0.18}/pyproject.toml +1 -1
  6. {polyapi-python-0.0.16 → polyapi-python-0.0.18}/LICENSE +0 -0
  7. {polyapi-python-0.0.16 → polyapi-python-0.0.18}/README.md +0 -0
  8. {polyapi-python-0.0.16 → polyapi-python-0.0.18}/polyapi/__init__.py +0 -0
  9. {polyapi-python-0.0.16 → polyapi-python-0.0.18}/polyapi/__main__.py +0 -0
  10. {polyapi-python-0.0.16 → polyapi-python-0.0.18}/polyapi/cli.py +0 -0
  11. {polyapi-python-0.0.16 → polyapi-python-0.0.18}/polyapi/config.py +0 -0
  12. {polyapi-python-0.0.16 → polyapi-python-0.0.18}/polyapi/constants.py +0 -0
  13. {polyapi-python-0.0.16 → polyapi-python-0.0.18}/polyapi/exceptions.py +0 -0
  14. {polyapi-python-0.0.16 → polyapi-python-0.0.18}/polyapi/function_cli.py +0 -0
  15. {polyapi-python-0.0.16 → polyapi-python-0.0.18}/polyapi/py.typed +0 -0
  16. {polyapi-python-0.0.16 → polyapi-python-0.0.18}/polyapi/schema.py +0 -0
  17. {polyapi-python-0.0.16 → polyapi-python-0.0.18}/polyapi/typedefs.py +0 -0
  18. {polyapi-python-0.0.16 → polyapi-python-0.0.18}/polyapi/utils.py +0 -0
  19. {polyapi-python-0.0.16 → polyapi-python-0.0.18}/polyapi/variables.py +0 -0
  20. {polyapi-python-0.0.16 → polyapi-python-0.0.18}/polyapi_python.egg-info/SOURCES.txt +0 -0
  21. {polyapi-python-0.0.16 → polyapi-python-0.0.18}/polyapi_python.egg-info/dependency_links.txt +0 -0
  22. {polyapi-python-0.0.16 → polyapi-python-0.0.18}/polyapi_python.egg-info/requires.txt +0 -0
  23. {polyapi-python-0.0.16 → polyapi-python-0.0.18}/polyapi_python.egg-info/top_level.txt +0 -0
  24. {polyapi-python-0.0.16 → polyapi-python-0.0.18}/setup.cfg +0 -0
  25. {polyapi-python-0.0.16 → polyapi-python-0.0.18}/tests/test_function_cli.py +0 -0
  26. {polyapi-python-0.0.16 → polyapi-python-0.0.18}/tests/test_generate.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: polyapi-python
3
- Version: 0.0.16
3
+ Version: 0.0.18
4
4
  Summary: The PolyAPI Python Client
5
5
  Author-email: Dan Fellin <dan@polyapi.io>
6
6
  License: MIT License
@@ -96,7 +96,10 @@ def _get_type(type_spec: PropertyType) -> Tuple[str, str]:
96
96
  # figure out what it is and fix!
97
97
  return "Any", ""
98
98
 
99
- title = items.get("$ref", "")
99
+ title = items.get("title")
100
+ if not title:
101
+ # title is actually a reference to another schema
102
+ title = items.get("$ref", "")
100
103
  if title:
101
104
  title = title.rsplit("/", 1)[-1].title()
102
105
  title = f'List[{title}]'
@@ -150,6 +153,8 @@ def render_function(
150
153
  else:
151
154
  if return_type_name == "str":
152
155
  return_action = "resp.text"
156
+ elif return_type_name == "Any":
157
+ return_action = "resp.text"
153
158
  elif return_type_name == "int":
154
159
  return_action = "int(resp.text.replace('(int) ', ''))"
155
160
  elif return_type_name == "float":
@@ -89,7 +89,6 @@ def generate() -> None:
89
89
  if functions:
90
90
  generate_api(functions)
91
91
  else:
92
-
93
92
  full_path = os.path.dirname(os.path.abspath(__file__))
94
93
  full_path = os.path.join(full_path, "poly")
95
94
  if not os.path.exists(full_path):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: polyapi-python
3
- Version: 0.0.16
3
+ Version: 0.0.18
4
4
  Summary: The PolyAPI Python Client
5
5
  Author-email: Dan Fellin <dan@polyapi.io>
6
6
  License: MIT License
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "polyapi-python"
3
- version = "0.0.16"
3
+ version = "0.0.18"
4
4
  description = "The PolyAPI Python Client"
5
5
  authors = [{ name = "Dan Fellin", email = "dan@polyapi.io" }]
6
6
  dependencies = ["requests", "typing_extensions", "jsonschema-gentypes", "pydantic>=2.5.3"]
File without changes