polyapi-python 0.3.9.dev4__tar.gz → 0.3.9.dev6__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 (46) hide show
  1. {polyapi_python-0.3.9.dev4 → polyapi_python-0.3.9.dev6}/PKG-INFO +2 -2
  2. {polyapi_python-0.3.9.dev4 → polyapi_python-0.3.9.dev6}/polyapi/execute.py +5 -2
  3. {polyapi_python-0.3.9.dev4 → polyapi_python-0.3.9.dev6}/polyapi_python.egg-info/PKG-INFO +2 -2
  4. {polyapi_python-0.3.9.dev4 → polyapi_python-0.3.9.dev6}/polyapi_python.egg-info/requires.txt +1 -1
  5. {polyapi_python-0.3.9.dev4 → polyapi_python-0.3.9.dev6}/pyproject.toml +2 -2
  6. {polyapi_python-0.3.9.dev4 → polyapi_python-0.3.9.dev6}/LICENSE +0 -0
  7. {polyapi_python-0.3.9.dev4 → polyapi_python-0.3.9.dev6}/README.md +0 -0
  8. {polyapi_python-0.3.9.dev4 → polyapi_python-0.3.9.dev6}/polyapi/__init__.py +0 -0
  9. {polyapi_python-0.3.9.dev4 → polyapi_python-0.3.9.dev6}/polyapi/__main__.py +0 -0
  10. {polyapi_python-0.3.9.dev4 → polyapi_python-0.3.9.dev6}/polyapi/api.py +0 -0
  11. {polyapi_python-0.3.9.dev4 → polyapi_python-0.3.9.dev6}/polyapi/auth.py +0 -0
  12. {polyapi_python-0.3.9.dev4 → polyapi_python-0.3.9.dev6}/polyapi/cli.py +0 -0
  13. {polyapi_python-0.3.9.dev4 → polyapi_python-0.3.9.dev6}/polyapi/client.py +0 -0
  14. {polyapi_python-0.3.9.dev4 → polyapi_python-0.3.9.dev6}/polyapi/config.py +0 -0
  15. {polyapi_python-0.3.9.dev4 → polyapi_python-0.3.9.dev6}/polyapi/constants.py +0 -0
  16. {polyapi_python-0.3.9.dev4 → polyapi_python-0.3.9.dev6}/polyapi/deployables.py +0 -0
  17. {polyapi_python-0.3.9.dev4 → polyapi_python-0.3.9.dev6}/polyapi/error_handler.py +0 -0
  18. {polyapi_python-0.3.9.dev4 → polyapi_python-0.3.9.dev6}/polyapi/exceptions.py +0 -0
  19. {polyapi_python-0.3.9.dev4 → polyapi_python-0.3.9.dev6}/polyapi/function_cli.py +0 -0
  20. {polyapi_python-0.3.9.dev4 → polyapi_python-0.3.9.dev6}/polyapi/generate.py +0 -0
  21. {polyapi_python-0.3.9.dev4 → polyapi_python-0.3.9.dev6}/polyapi/parser.py +0 -0
  22. {polyapi_python-0.3.9.dev4 → polyapi_python-0.3.9.dev6}/polyapi/poly_schemas.py +0 -0
  23. {polyapi_python-0.3.9.dev4 → polyapi_python-0.3.9.dev6}/polyapi/prepare.py +0 -0
  24. {polyapi_python-0.3.9.dev4 → polyapi_python-0.3.9.dev6}/polyapi/py.typed +0 -0
  25. {polyapi_python-0.3.9.dev4 → polyapi_python-0.3.9.dev6}/polyapi/rendered_spec.py +0 -0
  26. {polyapi_python-0.3.9.dev4 → polyapi_python-0.3.9.dev6}/polyapi/schema.py +0 -0
  27. {polyapi_python-0.3.9.dev4 → polyapi_python-0.3.9.dev6}/polyapi/server.py +0 -0
  28. {polyapi_python-0.3.9.dev4 → polyapi_python-0.3.9.dev6}/polyapi/sync.py +0 -0
  29. {polyapi_python-0.3.9.dev4 → polyapi_python-0.3.9.dev6}/polyapi/typedefs.py +0 -0
  30. {polyapi_python-0.3.9.dev4 → polyapi_python-0.3.9.dev6}/polyapi/utils.py +0 -0
  31. {polyapi_python-0.3.9.dev4 → polyapi_python-0.3.9.dev6}/polyapi/variables.py +0 -0
  32. {polyapi_python-0.3.9.dev4 → polyapi_python-0.3.9.dev6}/polyapi/webhook.py +0 -0
  33. {polyapi_python-0.3.9.dev4 → polyapi_python-0.3.9.dev6}/polyapi_python.egg-info/SOURCES.txt +0 -0
  34. {polyapi_python-0.3.9.dev4 → polyapi_python-0.3.9.dev6}/polyapi_python.egg-info/dependency_links.txt +0 -0
  35. {polyapi_python-0.3.9.dev4 → polyapi_python-0.3.9.dev6}/polyapi_python.egg-info/top_level.txt +0 -0
  36. {polyapi_python-0.3.9.dev4 → polyapi_python-0.3.9.dev6}/setup.cfg +0 -0
  37. {polyapi_python-0.3.9.dev4 → polyapi_python-0.3.9.dev6}/tests/test_api.py +0 -0
  38. {polyapi_python-0.3.9.dev4 → polyapi_python-0.3.9.dev6}/tests/test_auth.py +0 -0
  39. {polyapi_python-0.3.9.dev4 → polyapi_python-0.3.9.dev6}/tests/test_deployables.py +0 -0
  40. {polyapi_python-0.3.9.dev4 → polyapi_python-0.3.9.dev6}/tests/test_generate.py +0 -0
  41. {polyapi_python-0.3.9.dev4 → polyapi_python-0.3.9.dev6}/tests/test_parser.py +0 -0
  42. {polyapi_python-0.3.9.dev4 → polyapi_python-0.3.9.dev6}/tests/test_rendered_spec.py +0 -0
  43. {polyapi_python-0.3.9.dev4 → polyapi_python-0.3.9.dev6}/tests/test_schema.py +0 -0
  44. {polyapi_python-0.3.9.dev4 → polyapi_python-0.3.9.dev6}/tests/test_server.py +0 -0
  45. {polyapi_python-0.3.9.dev4 → polyapi_python-0.3.9.dev6}/tests/test_utils.py +0 -0
  46. {polyapi_python-0.3.9.dev4 → polyapi_python-0.3.9.dev6}/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.9.dev4
3
+ Version: 0.3.9.dev6
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
@@ -35,7 +35,7 @@ Requires-Dist: pydantic>=2.8.0
35
35
  Requires-Dist: stdlib_list>=0.10.0
36
36
  Requires-Dist: colorama==0.4.4
37
37
  Requires-Dist: python-socketio[asyncio_client]==5.11.1
38
- Requires-Dist: truststore==0.8.0
38
+ Requires-Dist: truststore>=0.8.0
39
39
  Dynamic: license-file
40
40
 
41
41
  # PolyAPI Python Library
@@ -1,10 +1,13 @@
1
1
  from typing import Dict, Optional
2
2
  import requests
3
3
  import os
4
+ import logging
4
5
  from requests import Response
5
6
  from polyapi.config import get_api_key_and_url, get_mtls_config
6
7
  from polyapi.exceptions import PolyApiException
7
8
 
9
+ logger = logging.getLogger("poly")
10
+
8
11
  def direct_execute(function_type, function_id, data) -> Response:
9
12
  """ execute a specific function id/type
10
13
  """
@@ -46,7 +49,7 @@ def direct_execute(function_type, function_id, data) -> Response:
46
49
  if (resp.status_code < 200 or resp.status_code >= 300):
47
50
  error_content = resp.content.decode("utf-8", errors="ignore")
48
51
  if function_type == 'api' and os.getenv("LOGS_ENABLED"):
49
- raise PolyApiException(f"Error executing api function with id: {function_id}. Status code: {resp.status_code}. Request data: {data}, Response: {error_content}")
52
+ logger.error(f"Error executing api function with id: {function_id}. Status code: {resp.status_code}. Request data: {data}, Response: {error_content}")
50
53
  elif function_type != 'api':
51
54
  raise PolyApiException(f"{resp.status_code}: {error_content}")
52
55
 
@@ -70,7 +73,7 @@ def execute(function_type, function_id, data) -> Response:
70
73
  if (resp.status_code < 200 or resp.status_code >= 300) and os.getenv("LOGS_ENABLED"):
71
74
  error_content = resp.content.decode("utf-8", errors="ignore")
72
75
  if function_type == 'api' and os.getenv("LOGS_ENABLED"):
73
- raise PolyApiException(f"Error executing api function with id: {function_id}. Status code: {resp.status_code}. Request data: {data}, Response: {error_content}")
76
+ logger.error(f"Error executing api function with id: {function_id}. Status code: {resp.status_code}. Request data: {data}, Response: {error_content}")
74
77
  elif function_type != 'api':
75
78
  raise PolyApiException(f"{resp.status_code}: {error_content}")
76
79
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: polyapi-python
3
- Version: 0.3.9.dev4
3
+ Version: 0.3.9.dev6
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
@@ -35,7 +35,7 @@ Requires-Dist: pydantic>=2.8.0
35
35
  Requires-Dist: stdlib_list>=0.10.0
36
36
  Requires-Dist: colorama==0.4.4
37
37
  Requires-Dist: python-socketio[asyncio_client]==5.11.1
38
- Requires-Dist: truststore==0.8.0
38
+ Requires-Dist: truststore>=0.8.0
39
39
  Dynamic: license-file
40
40
 
41
41
  # PolyAPI Python Library
@@ -5,4 +5,4 @@ pydantic>=2.8.0
5
5
  stdlib_list>=0.10.0
6
6
  colorama==0.4.4
7
7
  python-socketio[asyncio_client]==5.11.1
8
- truststore==0.8.0
8
+ truststore>=0.8.0
@@ -3,7 +3,7 @@ requires = ["setuptools>=61.2", "wheel"]
3
3
 
4
4
  [project]
5
5
  name = "polyapi-python"
6
- version = "0.3.9.dev4"
6
+ version = "0.3.9.dev6"
7
7
  description = "The Python Client for PolyAPI, the IPaaS by Developers for Developers"
8
8
  authors = [{ name = "Dan Fellin", email = "dan@polyapi.io" }]
9
9
  dependencies = [
@@ -14,7 +14,7 @@ dependencies = [
14
14
  "stdlib_list>=0.10.0",
15
15
  "colorama==0.4.4",
16
16
  "python-socketio[asyncio_client]==5.11.1",
17
- "truststore==0.8.0",
17
+ "truststore>=0.8.0",
18
18
  ]
19
19
  readme = "README.md"
20
20
  license = { file = "LICENSE" }