polyapi-python 0.0.29__tar.gz → 0.0.30__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 (27) hide show
  1. {polyapi-python-0.0.29 → polyapi-python-0.0.30}/PKG-INFO +1 -1
  2. {polyapi-python-0.0.29 → polyapi-python-0.0.30}/polyapi/cli.py +7 -2
  3. {polyapi-python-0.0.29 → polyapi-python-0.0.30}/polyapi/config.py +7 -1
  4. {polyapi-python-0.0.29 → polyapi-python-0.0.30}/polyapi_python.egg-info/PKG-INFO +1 -1
  5. {polyapi-python-0.0.29 → polyapi-python-0.0.30}/pyproject.toml +1 -1
  6. {polyapi-python-0.0.29 → polyapi-python-0.0.30}/LICENSE +0 -0
  7. {polyapi-python-0.0.29 → polyapi-python-0.0.30}/README.md +0 -0
  8. {polyapi-python-0.0.29 → polyapi-python-0.0.30}/polyapi/__init__.py +0 -0
  9. {polyapi-python-0.0.29 → polyapi-python-0.0.30}/polyapi/__main__.py +0 -0
  10. {polyapi-python-0.0.29 → polyapi-python-0.0.30}/polyapi/api.py +0 -0
  11. {polyapi-python-0.0.29 → polyapi-python-0.0.30}/polyapi/constants.py +0 -0
  12. {polyapi-python-0.0.29 → polyapi-python-0.0.30}/polyapi/exceptions.py +0 -0
  13. {polyapi-python-0.0.29 → polyapi-python-0.0.30}/polyapi/function_cli.py +0 -0
  14. {polyapi-python-0.0.29 → polyapi-python-0.0.30}/polyapi/generate.py +0 -0
  15. {polyapi-python-0.0.29 → polyapi-python-0.0.30}/polyapi/py.typed +0 -0
  16. {polyapi-python-0.0.29 → polyapi-python-0.0.30}/polyapi/schema.py +0 -0
  17. {polyapi-python-0.0.29 → polyapi-python-0.0.30}/polyapi/typedefs.py +0 -0
  18. {polyapi-python-0.0.29 → polyapi-python-0.0.30}/polyapi/utils.py +0 -0
  19. {polyapi-python-0.0.29 → polyapi-python-0.0.30}/polyapi/variables.py +0 -0
  20. {polyapi-python-0.0.29 → polyapi-python-0.0.30}/polyapi_python.egg-info/SOURCES.txt +0 -0
  21. {polyapi-python-0.0.29 → polyapi-python-0.0.30}/polyapi_python.egg-info/dependency_links.txt +0 -0
  22. {polyapi-python-0.0.29 → polyapi-python-0.0.30}/polyapi_python.egg-info/requires.txt +0 -0
  23. {polyapi-python-0.0.29 → polyapi-python-0.0.30}/polyapi_python.egg-info/top_level.txt +0 -0
  24. {polyapi-python-0.0.29 → polyapi-python-0.0.30}/setup.cfg +0 -0
  25. {polyapi-python-0.0.29 → polyapi-python-0.0.30}/tests/test_function_cli.py +0 -0
  26. {polyapi-python-0.0.29 → polyapi-python-0.0.30}/tests/test_generate.py +0 -0
  27. {polyapi-python-0.0.29 → polyapi-python-0.0.30}/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.29
3
+ Version: 0.0.30
4
4
  Summary: The PolyAPI Python Client
5
5
  Author-email: Dan Fellin <dan@polyapi.io>
6
6
  License: MIT License
@@ -1,10 +1,11 @@
1
- import sys
2
1
  import argparse
2
+
3
+ from .config import clear_config
3
4
  from .generate import generate, clear
4
5
  from .function_cli import function_add_or_update
5
6
 
6
7
 
7
- CLI_COMMANDS = ["generate", "clear", "function", "help"]
8
+ CLI_COMMANDS = ["generate", "config", "clear", "function", "help"]
8
9
 
9
10
 
10
11
  def execute_from_cli():
@@ -25,6 +26,10 @@ def execute_from_cli():
25
26
  elif command == "generate":
26
27
  print("Generating...")
27
28
  generate()
29
+ elif command == "config":
30
+ print("Clearing old config...")
31
+ clear_config()
32
+ generate()
28
33
  elif command == "clear":
29
34
  print("Clearing the generated library...")
30
35
  clear()
@@ -65,4 +65,10 @@ def initialize_config():
65
65
  print("Poly API Key and Poly API Base URL are required.")
66
66
  sys.exit(1)
67
67
 
68
- return key, url
68
+ return key, url
69
+
70
+
71
+ def clear_config():
72
+ path = get_config_file_path()
73
+ if os.path.exists(path):
74
+ os.remove(path)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: polyapi-python
3
- Version: 0.0.29
3
+ Version: 0.0.30
4
4
  Summary: The PolyAPI Python Client
5
5
  Author-email: Dan Fellin <dan@polyapi.io>
6
6
  License: MIT License
@@ -3,7 +3,7 @@ requires = ["setuptools>=61.2", "wheel"]
3
3
 
4
4
  [project]
5
5
  name = "polyapi-python"
6
- version = "0.0.29"
6
+ version = "0.0.30"
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"]
File without changes