polyapi-python 0.0.28__py3-none-any.whl → 0.0.30__py3-none-any.whl

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/cli.py CHANGED
@@ -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()
polyapi/config.py CHANGED
@@ -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.28
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,8 +1,8 @@
1
1
  polyapi/__init__.py,sha256=BbXhEtZ3TSGBfAagj62oRxrc5yFNz5fO0FMoGqS-ENQ,366
2
2
  polyapi/__main__.py,sha256=V4zhAh_YGxno5f_KSrlkELxcuDh9bR3WSd0n-2r-qQQ,93
3
3
  polyapi/api.py,sha256=1dtwY7u79Xk7AeCJKEopECmLwsEd7yVLe69TGtxClpI,8344
4
- polyapi/cli.py,sha256=yZYE9IMuqx_wxD0181pZp9FiVLBQChtifdGkrSmife4,1280
5
- polyapi/config.py,sha256=Wzd4YlWndu5lsRIYpeYDUgfAdciirfn2dSXyTyGTJrc,1897
4
+ polyapi/cli.py,sha256=XafGV_MGYWHOSbn7KZ03GKrSihirT2LVLDhFh_FgyF0,1425
5
+ polyapi/config.py,sha256=RMg8OUKXKFENtS17l4rkaZhfGrwXN-_-F1V1HKJGbYU,2006
6
6
  polyapi/constants.py,sha256=SKDdSaG6NUZHsyBxGxBGYm85y82hSE_M1ytKv1hp5gk,337
7
7
  polyapi/exceptions.py,sha256=Zh7i7eCUhDuXEdUYjatkLFTeZkrx1BJ1P5ePgbJ9eIY,89
8
8
  polyapi/function_cli.py,sha256=qMWZm07F0PP1d-LeHnUw2oJzIea0YEwYJG809zYJeqY,6557
@@ -12,8 +12,8 @@ polyapi/schema.py,sha256=ljXDoXDY5570onOEAzWyVTF7Cc76WK48dG6u51xCIxQ,2626
12
12
  polyapi/typedefs.py,sha256=zh4F36fZSZ6r4YqkcjDjNo_z__kIdiX7fLkC3QniDK0,1082
13
13
  polyapi/utils.py,sha256=mvkuJU27QMLKdcqyPktlDD-iO0OI3gbA7xhWCjR4UeM,709
14
14
  polyapi/variables.py,sha256=z1zfR3imJ735G2V89BMOYdzEdXiEHKZ5Q58O4ipWcpk,2897
15
- polyapi_python-0.0.28.dist-info/LICENSE,sha256=Hi0kDr56Dsy0uYIwNt4r9G7tI8x8miXRTlyvbeplCP8,1068
16
- polyapi_python-0.0.28.dist-info/METADATA,sha256=z_HN6X6nJWNsQdWAQ9uYCrrG56oIBMy71SJPnl8N03o,4093
17
- polyapi_python-0.0.28.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
18
- polyapi_python-0.0.28.dist-info/top_level.txt,sha256=CEFllOnzowci_50RYJac-M54KD2IdAptFsayVVF_f04,8
19
- polyapi_python-0.0.28.dist-info/RECORD,,
15
+ polyapi_python-0.0.30.dist-info/LICENSE,sha256=Hi0kDr56Dsy0uYIwNt4r9G7tI8x8miXRTlyvbeplCP8,1068
16
+ polyapi_python-0.0.30.dist-info/METADATA,sha256=Doe4hY5obMf8kW_sjyqgk7J2YCqH7Cu51oQwD5WPKFI,4093
17
+ polyapi_python-0.0.30.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
18
+ polyapi_python-0.0.30.dist-info/top_level.txt,sha256=CEFllOnzowci_50RYJac-M54KD2IdAptFsayVVF_f04,8
19
+ polyapi_python-0.0.30.dist-info/RECORD,,