polyapi-python 0.3.10.dev6__py3-none-any.whl → 0.3.11.dev2__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 +5 -2
- polyapi/config.py +2 -2
- {polyapi_python-0.3.10.dev6.dist-info → polyapi_python-0.3.11.dev2.dist-info}/METADATA +1 -1
- {polyapi_python-0.3.10.dev6.dist-info → polyapi_python-0.3.11.dev2.dist-info}/RECORD +7 -7
- {polyapi_python-0.3.10.dev6.dist-info → polyapi_python-0.3.11.dev2.dist-info}/WHEEL +0 -0
- {polyapi_python-0.3.10.dev6.dist-info → polyapi_python-0.3.11.dev2.dist-info}/licenses/LICENSE +0 -0
- {polyapi_python-0.3.10.dev6.dist-info → polyapi_python-0.3.11.dev2.dist-info}/top_level.txt +0 -0
polyapi/cli.py
CHANGED
|
@@ -47,8 +47,11 @@ def execute_from_cli():
|
|
|
47
47
|
setup_parser.add_argument("url", nargs="?", help="URL for the Poly API")
|
|
48
48
|
|
|
49
49
|
def setup(args):
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
api_key = args.api_key or os.getenv("POLY_API_KEY")
|
|
51
|
+
url = args.url or os.getenv("POLY_API_BASE_URL")
|
|
52
|
+
|
|
53
|
+
if api_key and url:
|
|
54
|
+
set_api_key_and_url(url, api_key)
|
|
52
55
|
else:
|
|
53
56
|
initialize_config(force=True)
|
|
54
57
|
# setup command should have default cache values
|
polyapi/config.py
CHANGED
|
@@ -73,7 +73,7 @@ def get_api_key_and_url() -> Tuple[str | None, str | None]:
|
|
|
73
73
|
return key, url
|
|
74
74
|
|
|
75
75
|
|
|
76
|
-
def set_api_key_and_url(
|
|
76
|
+
def set_api_key_and_url(url: str, key: str):
|
|
77
77
|
config = configparser.ConfigParser()
|
|
78
78
|
config["polyapi"] = {}
|
|
79
79
|
config.set("polyapi", "poly_api_key", key)
|
|
@@ -107,7 +107,7 @@ def initialize_config(force=False):
|
|
|
107
107
|
print_yellow("\n".join(errors))
|
|
108
108
|
sys.exit(1)
|
|
109
109
|
|
|
110
|
-
set_api_key_and_url(
|
|
110
|
+
set_api_key_and_url(url, key)
|
|
111
111
|
print_green("Poly setup complete.")
|
|
112
112
|
|
|
113
113
|
if not key or not url:
|
|
@@ -2,9 +2,9 @@ polyapi/__init__.py,sha256=hw7x4j9JNJfPdkIOZqV0X9pbYcw3_5AH1iQFdSogH-c,3235
|
|
|
2
2
|
polyapi/__main__.py,sha256=V4zhAh_YGxno5f_KSrlkELxcuDh9bR3WSd0n-2r-qQQ,93
|
|
3
3
|
polyapi/api.py,sha256=2nds6ZdNe9OHvCba4IjOPga0CAYIsib2SbhEyDDCmd8,2188
|
|
4
4
|
polyapi/auth.py,sha256=EGstBjTSdAydI5hGAHeRRc1GcmHshogudb3sxCgO6zA,5341
|
|
5
|
-
polyapi/cli.py,sha256=
|
|
5
|
+
polyapi/cli.py,sha256=KvDd6C3UbHCRI1vR8m5Usx3Sv_-bBI7LPqU_FLFsMLI,11198
|
|
6
6
|
polyapi/client.py,sha256=DW6ljG_xCwAo2yz23A9QfLooE6ZUDvSpdA4e_dCQjiQ,1418
|
|
7
|
-
polyapi/config.py,sha256=
|
|
7
|
+
polyapi/config.py,sha256=LgkZXG1DspNxIwukpcFTbsj46YyN5lQjmlvdVby87uQ,7638
|
|
8
8
|
polyapi/constants.py,sha256=sc-FnS0SngBLvSu1ZWMs0UCf9EYD1u1Yhfr-sZXGLns,607
|
|
9
9
|
polyapi/deployables.py,sha256=6R7XSgpTohZBcqoGd7GioQdXXKuvbBsdq_cAJ1p8jfQ,12184
|
|
10
10
|
polyapi/error_handler.py,sha256=I_e0iz6VM23FLVQWJljxs2NGcl_OODbi43OcbnqBlp8,2398
|
|
@@ -25,8 +25,8 @@ polyapi/typedefs.py,sha256=VEaYODLm-3a26_cK1uSRoYwenmprLOQQdoKFz4gqK_0,5587
|
|
|
25
25
|
polyapi/utils.py,sha256=Ca189i4PM4TpwvpzwF3T8MfQsOPD45b_falXjjgYCyI,12603
|
|
26
26
|
polyapi/variables.py,sha256=SJv106ePpQP5mx7Iiafl_shtFlE8FoaO9Q8lvw-3IRg,7270
|
|
27
27
|
polyapi/webhook.py,sha256=I3_uOl4f4L2-2WehzRLMVMRrB-76EiXCPA9Vzoaj30I,5326
|
|
28
|
-
polyapi_python-0.3.
|
|
29
|
-
polyapi_python-0.3.
|
|
30
|
-
polyapi_python-0.3.
|
|
31
|
-
polyapi_python-0.3.
|
|
32
|
-
polyapi_python-0.3.
|
|
28
|
+
polyapi_python-0.3.11.dev2.dist-info/licenses/LICENSE,sha256=6b_I7aPVp8JXhqQwdw7_B84Ca0S4JGjHj0sr_1VOdB4,1068
|
|
29
|
+
polyapi_python-0.3.11.dev2.dist-info/METADATA,sha256=jhbcFxknorQvZTBNK8395spXQyJyS9H2B6NUtLqZ338,5318
|
|
30
|
+
polyapi_python-0.3.11.dev2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
31
|
+
polyapi_python-0.3.11.dev2.dist-info/top_level.txt,sha256=CEFllOnzowci_50RYJac-M54KD2IdAptFsayVVF_f04,8
|
|
32
|
+
polyapi_python-0.3.11.dev2.dist-info/RECORD,,
|
|
File without changes
|
{polyapi_python-0.3.10.dev6.dist-info → polyapi_python-0.3.11.dev2.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|