polyapi-python 0.3.1.dev17__tar.gz → 0.3.2.dev1__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 (44) hide show
  1. {polyapi_python-0.3.1.dev17/polyapi_python.egg-info → polyapi_python-0.3.2.dev1}/PKG-INFO +2 -2
  2. {polyapi_python-0.3.1.dev17 → polyapi_python-0.3.2.dev1}/polyapi/cli.py +2 -2
  3. {polyapi_python-0.3.1.dev17 → polyapi_python-0.3.2.dev1}/polyapi/function_cli.py +6 -3
  4. {polyapi_python-0.3.1.dev17 → polyapi_python-0.3.2.dev1/polyapi_python.egg-info}/PKG-INFO +2 -2
  5. {polyapi_python-0.3.1.dev17 → polyapi_python-0.3.2.dev1}/polyapi_python.egg-info/requires.txt +1 -1
  6. {polyapi_python-0.3.1.dev17 → polyapi_python-0.3.2.dev1}/pyproject.toml +2 -2
  7. {polyapi_python-0.3.1.dev17 → polyapi_python-0.3.2.dev1}/LICENSE +0 -0
  8. {polyapi_python-0.3.1.dev17 → polyapi_python-0.3.2.dev1}/README.md +0 -0
  9. {polyapi_python-0.3.1.dev17 → polyapi_python-0.3.2.dev1}/polyapi/__init__.py +0 -0
  10. {polyapi_python-0.3.1.dev17 → polyapi_python-0.3.2.dev1}/polyapi/__main__.py +0 -0
  11. {polyapi_python-0.3.1.dev17 → polyapi_python-0.3.2.dev1}/polyapi/api.py +0 -0
  12. {polyapi_python-0.3.1.dev17 → polyapi_python-0.3.2.dev1}/polyapi/auth.py +0 -0
  13. {polyapi_python-0.3.1.dev17 → polyapi_python-0.3.2.dev1}/polyapi/client.py +0 -0
  14. {polyapi_python-0.3.1.dev17 → polyapi_python-0.3.2.dev1}/polyapi/config.py +0 -0
  15. {polyapi_python-0.3.1.dev17 → polyapi_python-0.3.2.dev1}/polyapi/constants.py +0 -0
  16. {polyapi_python-0.3.1.dev17 → polyapi_python-0.3.2.dev1}/polyapi/deployables.py +0 -0
  17. {polyapi_python-0.3.1.dev17 → polyapi_python-0.3.2.dev1}/polyapi/error_handler.py +0 -0
  18. {polyapi_python-0.3.1.dev17 → polyapi_python-0.3.2.dev1}/polyapi/exceptions.py +0 -0
  19. {polyapi_python-0.3.1.dev17 → polyapi_python-0.3.2.dev1}/polyapi/execute.py +0 -0
  20. {polyapi_python-0.3.1.dev17 → polyapi_python-0.3.2.dev1}/polyapi/generate.py +0 -0
  21. {polyapi_python-0.3.1.dev17 → polyapi_python-0.3.2.dev1}/polyapi/parser.py +0 -0
  22. {polyapi_python-0.3.1.dev17 → polyapi_python-0.3.2.dev1}/polyapi/prepare.py +0 -0
  23. {polyapi_python-0.3.1.dev17 → polyapi_python-0.3.2.dev1}/polyapi/py.typed +0 -0
  24. {polyapi_python-0.3.1.dev17 → polyapi_python-0.3.2.dev1}/polyapi/rendered_spec.py +0 -0
  25. {polyapi_python-0.3.1.dev17 → polyapi_python-0.3.2.dev1}/polyapi/schema.py +0 -0
  26. {polyapi_python-0.3.1.dev17 → polyapi_python-0.3.2.dev1}/polyapi/server.py +0 -0
  27. {polyapi_python-0.3.1.dev17 → polyapi_python-0.3.2.dev1}/polyapi/sync.py +0 -0
  28. {polyapi_python-0.3.1.dev17 → polyapi_python-0.3.2.dev1}/polyapi/typedefs.py +0 -0
  29. {polyapi_python-0.3.1.dev17 → polyapi_python-0.3.2.dev1}/polyapi/utils.py +0 -0
  30. {polyapi_python-0.3.1.dev17 → polyapi_python-0.3.2.dev1}/polyapi/variables.py +0 -0
  31. {polyapi_python-0.3.1.dev17 → polyapi_python-0.3.2.dev1}/polyapi/webhook.py +0 -0
  32. {polyapi_python-0.3.1.dev17 → polyapi_python-0.3.2.dev1}/polyapi_python.egg-info/SOURCES.txt +0 -0
  33. {polyapi_python-0.3.1.dev17 → polyapi_python-0.3.2.dev1}/polyapi_python.egg-info/dependency_links.txt +0 -0
  34. {polyapi_python-0.3.1.dev17 → polyapi_python-0.3.2.dev1}/polyapi_python.egg-info/top_level.txt +0 -0
  35. {polyapi_python-0.3.1.dev17 → polyapi_python-0.3.2.dev1}/setup.cfg +0 -0
  36. {polyapi_python-0.3.1.dev17 → polyapi_python-0.3.2.dev1}/tests/test_api.py +0 -0
  37. {polyapi_python-0.3.1.dev17 → polyapi_python-0.3.2.dev1}/tests/test_auth.py +0 -0
  38. {polyapi_python-0.3.1.dev17 → polyapi_python-0.3.2.dev1}/tests/test_deployables.py +0 -0
  39. {polyapi_python-0.3.1.dev17 → polyapi_python-0.3.2.dev1}/tests/test_parser.py +0 -0
  40. {polyapi_python-0.3.1.dev17 → polyapi_python-0.3.2.dev1}/tests/test_rendered_spec.py +0 -0
  41. {polyapi_python-0.3.1.dev17 → polyapi_python-0.3.2.dev1}/tests/test_schema.py +0 -0
  42. {polyapi_python-0.3.1.dev17 → polyapi_python-0.3.2.dev1}/tests/test_server.py +0 -0
  43. {polyapi_python-0.3.1.dev17 → polyapi_python-0.3.2.dev1}/tests/test_utils.py +0 -0
  44. {polyapi_python-0.3.1.dev17 → polyapi_python-0.3.2.dev1}/tests/test_variables.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: polyapi-python
3
- Version: 0.3.1.dev17
3
+ Version: 0.3.2.dev1
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
@@ -29,7 +29,7 @@ Requires-Python: >=3.10
29
29
  Description-Content-Type: text/markdown
30
30
  License-File: LICENSE
31
31
  Requires-Dist: requests==2.31.0
32
- Requires-Dist: typing_extensions==4.10.0
32
+ Requires-Dist: typing_extensions>=4.10.0
33
33
  Requires-Dist: jsonschema-gentypes==2.6.0
34
34
  Requires-Dist: pydantic==2.6.4
35
35
  Requires-Dist: stdlib_list==0.10.0
@@ -66,13 +66,13 @@ def execute_from_cli():
66
66
  fn_add_parser.add_argument("--description", required=False, default="", help="Description of the function")
67
67
  fn_add_parser.add_argument("--server", action="store_true", help="Marks the function as a server function")
68
68
  fn_add_parser.add_argument("--client", action="store_true", help="Marks the function as a client function")
69
- fn_add_parser.add_argument("--logs", choices=["enabled", "disabled"], default="disabled", help="Enable or disable logs for the function.")
69
+ fn_add_parser.add_argument("--logs", choices=["enabled", "disabled"], default=None, help="Enable or disable logs for the function.")
70
70
  fn_add_parser.add_argument("--execution-api-key", required=False, default="", help="API key for execution (for server functions only).")
71
71
  fn_add_parser.add_argument("--disable-ai", "--skip-generate", action="store_true", help="Pass --disable-ai skip AI generation of missing descriptions")
72
72
 
73
73
  def add_function(args):
74
74
  initialize_config()
75
- logs_enabled = args.logs == "enabled"
75
+ logs_enabled = args.logs == "enabled" if args.logs else None
76
76
  err = ""
77
77
  if args.server and args.client:
78
78
  err = "Specify either `--server` or `--client`. Found both."
@@ -1,5 +1,5 @@
1
1
  import sys
2
- from typing import Any, List
2
+ from typing import Any, List, Optional
3
3
  import requests
4
4
  from polyapi.generate import get_functions_and_parse, generate_functions
5
5
  from polyapi.config import get_api_key_and_url
@@ -23,7 +23,7 @@ def function_add_or_update(
23
23
  description: str,
24
24
  client: bool,
25
25
  server: bool,
26
- logs_enabled: bool,
26
+ logs_enabled: Optional[bool],
27
27
  generate: bool = True,
28
28
  execution_api_key: str = ""
29
29
  ):
@@ -45,6 +45,9 @@ def function_add_or_update(
45
45
  )
46
46
  sys.exit(1)
47
47
 
48
+ if logs_enabled is None:
49
+ logs_enabled = parsed["config"].get("logs_enabled", None)
50
+
48
51
  data = {
49
52
  "context": context or parsed["context"],
50
53
  "name": name,
@@ -54,7 +57,7 @@ def function_add_or_update(
54
57
  "returnType": get_jsonschema_type(return_type),
55
58
  "returnTypeSchema": parsed["types"]["returns"]["typeSchema"],
56
59
  "arguments": [{**p, "key": p["name"], "type": get_jsonschema_type(p["type"]) } for p in parsed["types"]["params"]],
57
- "logsEnabled": logs_enabled or parsed["config"].get("logs_enabled", False),
60
+ "logsEnabled": logs_enabled,
58
61
  }
59
62
 
60
63
  if server and parsed["dependencies"]:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: polyapi-python
3
- Version: 0.3.1.dev17
3
+ Version: 0.3.2.dev1
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
@@ -29,7 +29,7 @@ Requires-Python: >=3.10
29
29
  Description-Content-Type: text/markdown
30
30
  License-File: LICENSE
31
31
  Requires-Dist: requests==2.31.0
32
- Requires-Dist: typing_extensions==4.10.0
32
+ Requires-Dist: typing_extensions>=4.10.0
33
33
  Requires-Dist: jsonschema-gentypes==2.6.0
34
34
  Requires-Dist: pydantic==2.6.4
35
35
  Requires-Dist: stdlib_list==0.10.0
@@ -1,5 +1,5 @@
1
1
  requests==2.31.0
2
- typing_extensions==4.10.0
2
+ typing_extensions>=4.10.0
3
3
  jsonschema-gentypes==2.6.0
4
4
  pydantic==2.6.4
5
5
  stdlib_list==0.10.0
@@ -3,12 +3,12 @@ requires = ["setuptools>=61.2", "wheel"]
3
3
 
4
4
  [project]
5
5
  name = "polyapi-python"
6
- version = "0.3.1.dev17"
6
+ version = "0.3.2.dev1"
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 = [
10
10
  "requests==2.31.0",
11
- "typing_extensions==4.10.0",
11
+ "typing_extensions>=4.10.0",
12
12
  "jsonschema-gentypes==2.6.0",
13
13
  "pydantic==2.6.4",
14
14
  "stdlib_list==0.10.0",