polyapi-python 0.3.9.dev5__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.
- {polyapi_python-0.3.9.dev5 → polyapi_python-0.3.9.dev6}/PKG-INFO +1 -1
- {polyapi_python-0.3.9.dev5 → polyapi_python-0.3.9.dev6}/polyapi/execute.py +5 -2
- {polyapi_python-0.3.9.dev5 → polyapi_python-0.3.9.dev6}/polyapi_python.egg-info/PKG-INFO +1 -1
- {polyapi_python-0.3.9.dev5 → polyapi_python-0.3.9.dev6}/pyproject.toml +1 -1
- {polyapi_python-0.3.9.dev5 → polyapi_python-0.3.9.dev6}/LICENSE +0 -0
- {polyapi_python-0.3.9.dev5 → polyapi_python-0.3.9.dev6}/README.md +0 -0
- {polyapi_python-0.3.9.dev5 → polyapi_python-0.3.9.dev6}/polyapi/__init__.py +0 -0
- {polyapi_python-0.3.9.dev5 → polyapi_python-0.3.9.dev6}/polyapi/__main__.py +0 -0
- {polyapi_python-0.3.9.dev5 → polyapi_python-0.3.9.dev6}/polyapi/api.py +0 -0
- {polyapi_python-0.3.9.dev5 → polyapi_python-0.3.9.dev6}/polyapi/auth.py +0 -0
- {polyapi_python-0.3.9.dev5 → polyapi_python-0.3.9.dev6}/polyapi/cli.py +0 -0
- {polyapi_python-0.3.9.dev5 → polyapi_python-0.3.9.dev6}/polyapi/client.py +0 -0
- {polyapi_python-0.3.9.dev5 → polyapi_python-0.3.9.dev6}/polyapi/config.py +0 -0
- {polyapi_python-0.3.9.dev5 → polyapi_python-0.3.9.dev6}/polyapi/constants.py +0 -0
- {polyapi_python-0.3.9.dev5 → polyapi_python-0.3.9.dev6}/polyapi/deployables.py +0 -0
- {polyapi_python-0.3.9.dev5 → polyapi_python-0.3.9.dev6}/polyapi/error_handler.py +0 -0
- {polyapi_python-0.3.9.dev5 → polyapi_python-0.3.9.dev6}/polyapi/exceptions.py +0 -0
- {polyapi_python-0.3.9.dev5 → polyapi_python-0.3.9.dev6}/polyapi/function_cli.py +0 -0
- {polyapi_python-0.3.9.dev5 → polyapi_python-0.3.9.dev6}/polyapi/generate.py +0 -0
- {polyapi_python-0.3.9.dev5 → polyapi_python-0.3.9.dev6}/polyapi/parser.py +0 -0
- {polyapi_python-0.3.9.dev5 → polyapi_python-0.3.9.dev6}/polyapi/poly_schemas.py +0 -0
- {polyapi_python-0.3.9.dev5 → polyapi_python-0.3.9.dev6}/polyapi/prepare.py +0 -0
- {polyapi_python-0.3.9.dev5 → polyapi_python-0.3.9.dev6}/polyapi/py.typed +0 -0
- {polyapi_python-0.3.9.dev5 → polyapi_python-0.3.9.dev6}/polyapi/rendered_spec.py +0 -0
- {polyapi_python-0.3.9.dev5 → polyapi_python-0.3.9.dev6}/polyapi/schema.py +0 -0
- {polyapi_python-0.3.9.dev5 → polyapi_python-0.3.9.dev6}/polyapi/server.py +0 -0
- {polyapi_python-0.3.9.dev5 → polyapi_python-0.3.9.dev6}/polyapi/sync.py +0 -0
- {polyapi_python-0.3.9.dev5 → polyapi_python-0.3.9.dev6}/polyapi/typedefs.py +0 -0
- {polyapi_python-0.3.9.dev5 → polyapi_python-0.3.9.dev6}/polyapi/utils.py +0 -0
- {polyapi_python-0.3.9.dev5 → polyapi_python-0.3.9.dev6}/polyapi/variables.py +0 -0
- {polyapi_python-0.3.9.dev5 → polyapi_python-0.3.9.dev6}/polyapi/webhook.py +0 -0
- {polyapi_python-0.3.9.dev5 → polyapi_python-0.3.9.dev6}/polyapi_python.egg-info/SOURCES.txt +0 -0
- {polyapi_python-0.3.9.dev5 → polyapi_python-0.3.9.dev6}/polyapi_python.egg-info/dependency_links.txt +0 -0
- {polyapi_python-0.3.9.dev5 → polyapi_python-0.3.9.dev6}/polyapi_python.egg-info/requires.txt +0 -0
- {polyapi_python-0.3.9.dev5 → polyapi_python-0.3.9.dev6}/polyapi_python.egg-info/top_level.txt +0 -0
- {polyapi_python-0.3.9.dev5 → polyapi_python-0.3.9.dev6}/setup.cfg +0 -0
- {polyapi_python-0.3.9.dev5 → polyapi_python-0.3.9.dev6}/tests/test_api.py +0 -0
- {polyapi_python-0.3.9.dev5 → polyapi_python-0.3.9.dev6}/tests/test_auth.py +0 -0
- {polyapi_python-0.3.9.dev5 → polyapi_python-0.3.9.dev6}/tests/test_deployables.py +0 -0
- {polyapi_python-0.3.9.dev5 → polyapi_python-0.3.9.dev6}/tests/test_generate.py +0 -0
- {polyapi_python-0.3.9.dev5 → polyapi_python-0.3.9.dev6}/tests/test_parser.py +0 -0
- {polyapi_python-0.3.9.dev5 → polyapi_python-0.3.9.dev6}/tests/test_rendered_spec.py +0 -0
- {polyapi_python-0.3.9.dev5 → polyapi_python-0.3.9.dev6}/tests/test_schema.py +0 -0
- {polyapi_python-0.3.9.dev5 → polyapi_python-0.3.9.dev6}/tests/test_server.py +0 -0
- {polyapi_python-0.3.9.dev5 → polyapi_python-0.3.9.dev6}/tests/test_utils.py +0 -0
- {polyapi_python-0.3.9.dev5 → polyapi_python-0.3.9.dev6}/tests/test_variables.py +0 -0
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
|
|
@@ -3,7 +3,7 @@ requires = ["setuptools>=61.2", "wheel"]
|
|
|
3
3
|
|
|
4
4
|
[project]
|
|
5
5
|
name = "polyapi-python"
|
|
6
|
-
version = "0.3.9.
|
|
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 = [
|
|
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.9.dev5 → polyapi_python-0.3.9.dev6}/polyapi_python.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{polyapi_python-0.3.9.dev5 → polyapi_python-0.3.9.dev6}/polyapi_python.egg-info/requires.txt
RENAMED
|
File without changes
|
{polyapi_python-0.3.9.dev5 → polyapi_python-0.3.9.dev6}/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
|