polyapi-python 0.0.33__tar.gz → 0.0.35__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 (28) hide show
  1. {polyapi-python-0.0.33 → polyapi-python-0.0.35}/PKG-INFO +10 -1
  2. {polyapi-python-0.0.33 → polyapi-python-0.0.35}/README.md +10 -1
  3. {polyapi-python-0.0.33 → polyapi-python-0.0.35}/polyapi_python.egg-info/PKG-INFO +10 -1
  4. {polyapi-python-0.0.33 → polyapi-python-0.0.35}/pyproject.toml +1 -1
  5. {polyapi-python-0.0.33 → polyapi-python-0.0.35}/tests/test_generate.py +15 -11
  6. {polyapi-python-0.0.33 → polyapi-python-0.0.35}/LICENSE +0 -0
  7. {polyapi-python-0.0.33 → polyapi-python-0.0.35}/polyapi/__init__.py +0 -0
  8. {polyapi-python-0.0.33 → polyapi-python-0.0.35}/polyapi/__main__.py +0 -0
  9. {polyapi-python-0.0.33 → polyapi-python-0.0.35}/polyapi/api.py +0 -0
  10. {polyapi-python-0.0.33 → polyapi-python-0.0.35}/polyapi/cli.py +0 -0
  11. {polyapi-python-0.0.33 → polyapi-python-0.0.35}/polyapi/config.py +0 -0
  12. {polyapi-python-0.0.33 → polyapi-python-0.0.35}/polyapi/constants.py +0 -0
  13. {polyapi-python-0.0.33 → polyapi-python-0.0.35}/polyapi/exceptions.py +0 -0
  14. {polyapi-python-0.0.33 → polyapi-python-0.0.35}/polyapi/execute.py +0 -0
  15. {polyapi-python-0.0.33 → polyapi-python-0.0.35}/polyapi/function_cli.py +0 -0
  16. {polyapi-python-0.0.33 → polyapi-python-0.0.35}/polyapi/generate.py +0 -0
  17. {polyapi-python-0.0.33 → polyapi-python-0.0.35}/polyapi/py.typed +0 -0
  18. {polyapi-python-0.0.33 → polyapi-python-0.0.35}/polyapi/schema.py +0 -0
  19. {polyapi-python-0.0.33 → polyapi-python-0.0.35}/polyapi/typedefs.py +0 -0
  20. {polyapi-python-0.0.33 → polyapi-python-0.0.35}/polyapi/utils.py +0 -0
  21. {polyapi-python-0.0.33 → polyapi-python-0.0.35}/polyapi/variables.py +0 -0
  22. {polyapi-python-0.0.33 → polyapi-python-0.0.35}/polyapi_python.egg-info/SOURCES.txt +0 -0
  23. {polyapi-python-0.0.33 → polyapi-python-0.0.35}/polyapi_python.egg-info/dependency_links.txt +0 -0
  24. {polyapi-python-0.0.33 → polyapi-python-0.0.35}/polyapi_python.egg-info/requires.txt +0 -0
  25. {polyapi-python-0.0.33 → polyapi-python-0.0.35}/polyapi_python.egg-info/top_level.txt +0 -0
  26. {polyapi-python-0.0.33 → polyapi-python-0.0.35}/setup.cfg +0 -0
  27. {polyapi-python-0.0.33 → polyapi-python-0.0.35}/tests/test_function_cli.py +0 -0
  28. {polyapi-python-0.0.33 → polyapi-python-0.0.35}/tests/test_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: polyapi-python
3
- Version: 0.0.33
3
+ Version: 0.0.35
4
4
  Summary: The PolyAPI Python Client
5
5
  Author-email: Dan Fellin <dan@polyapi.io>
6
6
  License: MIT License
@@ -124,6 +124,11 @@ def bar(n: int) -> Foobar:
124
124
  return Foobar(count=n)
125
125
  ```
126
126
 
127
+ ## Pypi
128
+
129
+ This library is hosted on Pypi. You can find the latest version on the [pypi polyapi-python](https://pypi.org/project/polyapi-python/) project.
130
+
131
+
127
132
  ## Upgrade
128
133
 
129
134
  To upgrade your library to the latest version, pass the upgrade flag.
@@ -147,3 +152,7 @@ To run this library's unit tests, please clone the repo then run:
147
152
  ```bash
148
153
  python -m unittest discover
149
154
  ```
155
+
156
+ ## Support
157
+
158
+ If you run into any issues or want help getting started with this project, please contact support@polyapi.io
@@ -88,6 +88,11 @@ def bar(n: int) -> Foobar:
88
88
  return Foobar(count=n)
89
89
  ```
90
90
 
91
+ ## Pypi
92
+
93
+ This library is hosted on Pypi. You can find the latest version on the [pypi polyapi-python](https://pypi.org/project/polyapi-python/) project.
94
+
95
+
91
96
  ## Upgrade
92
97
 
93
98
  To upgrade your library to the latest version, pass the upgrade flag.
@@ -110,4 +115,8 @@ To run this library's unit tests, please clone the repo then run:
110
115
 
111
116
  ```bash
112
117
  python -m unittest discover
113
- ```
118
+ ```
119
+
120
+ ## Support
121
+
122
+ If you run into any issues or want help getting started with this project, please contact support@polyapi.io
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: polyapi-python
3
- Version: 0.0.33
3
+ Version: 0.0.35
4
4
  Summary: The PolyAPI Python Client
5
5
  Author-email: Dan Fellin <dan@polyapi.io>
6
6
  License: MIT License
@@ -124,6 +124,11 @@ def bar(n: int) -> Foobar:
124
124
  return Foobar(count=n)
125
125
  ```
126
126
 
127
+ ## Pypi
128
+
129
+ This library is hosted on Pypi. You can find the latest version on the [pypi polyapi-python](https://pypi.org/project/polyapi-python/) project.
130
+
131
+
127
132
  ## Upgrade
128
133
 
129
134
  To upgrade your library to the latest version, pass the upgrade flag.
@@ -147,3 +152,7 @@ To run this library's unit tests, please clone the repo then run:
147
152
  ```bash
148
153
  python -m unittest discover
149
154
  ```
155
+
156
+ ## Support
157
+
158
+ If you run into any issues or want help getting started with this project, please contact support@polyapi.io
@@ -3,7 +3,7 @@ requires = ["setuptools>=61.2", "wheel"]
3
3
 
4
4
  [project]
5
5
  name = "polyapi-python"
6
- version = "0.0.33"
6
+ version = "0.0.35"
7
7
  description = "The PolyAPI Python Client"
8
8
  authors = [{ name = "Dan Fellin", email = "dan@polyapi.io" }]
9
9
  dependencies = ["requests", "typing_extensions", "jsonschema-gentypes", "pydantic>=2.5.3", "stdlib_list"]
@@ -155,9 +155,10 @@ GET_PRODUCTS_COUNT = {
155
155
 
156
156
  class T(unittest.TestCase):
157
157
  def test_render_function_accuweather(self):
158
- func_str = render_function(
158
+ name = ACCUWEATHER["name"]
159
+ func_str, _ = render_function(
159
160
  ACCUWEATHER["type"],
160
- ACCUWEATHER["name"],
161
+ name,
161
162
  ACCUWEATHER["id"],
162
163
  ACCUWEATHER["description"],
163
164
  ACCUWEATHER["function"]["arguments"],
@@ -165,12 +166,13 @@ class T(unittest.TestCase):
165
166
  )
166
167
  self.assertIn(ACCUWEATHER["id"], func_str)
167
168
  self.assertIn("locationId: int,", func_str)
168
- self.assertIn("-> ApiFunctionResponse", func_str)
169
+ self.assertIn(f"-> _{name}.{name}Response", func_str)
169
170
 
170
171
  def test_render_function_zillow(self):
171
- func_str = render_function(
172
+ name = ZILLOW['name']
173
+ func_str, _ = render_function(
172
174
  ZILLOW["type"],
173
- ZILLOW["name"],
175
+ name,
174
176
  ZILLOW["id"],
175
177
  ZILLOW["description"],
176
178
  ZILLOW["function"]["arguments"],
@@ -178,10 +180,11 @@ class T(unittest.TestCase):
178
180
  )
179
181
  self.assertIn(ZILLOW["id"], func_str)
180
182
  self.assertIn("locationId: int,", func_str)
181
- self.assertIn("-> ApiFunctionResponse", func_str)
183
+ self.assertIn(f"-> _{name}.{name}Response", func_str)
182
184
 
183
185
  def test_render_function_twilio_api(self):
184
- func_str = render_function(
186
+ name = TWILIO['name']
187
+ func_str, _ = render_function(
185
188
  TWILIO["type"],
186
189
  TWILIO["name"],
187
190
  TWILIO["id"],
@@ -192,11 +195,12 @@ class T(unittest.TestCase):
192
195
  self.assertIn(TWILIO["id"], func_str)
193
196
  self.assertIn("conversationSID: str", func_str)
194
197
  self.assertIn("authToken: str", func_str)
195
- self.assertIn("-> ApiFunctionResponse", func_str)
198
+ self.assertIn(f"-> _{name}.{name}Response", func_str)
196
199
 
197
200
  def test_render_function_twilio_server(self):
198
201
  # same test but try it as a serverFunction rather than an apiFunction
199
- func_str = render_function(
202
+ name = TWILIO['name']
203
+ func_str, _ = render_function(
200
204
  "serverFunction",
201
205
  TWILIO["name"],
202
206
  TWILIO["id"],
@@ -207,11 +211,11 @@ class T(unittest.TestCase):
207
211
  self.assertIn(TWILIO["id"], func_str)
208
212
  self.assertIn("conversationSID: str", func_str)
209
213
  self.assertIn("authToken: str", func_str)
210
- self.assertIn("-> ResponseType", func_str)
214
+ self.assertIn(f"-> _{name}.ResponseType", func_str)
211
215
 
212
216
  def test_render_function_get_products_count(self):
213
217
  return_type = GET_PRODUCTS_COUNT["function"]["returnType"]
214
- func_str = render_function(
218
+ func_str, _ = render_function(
215
219
  GET_PRODUCTS_COUNT["type"],
216
220
  GET_PRODUCTS_COUNT["name"],
217
221
  GET_PRODUCTS_COUNT["id"],
File without changes