Skip to content

Commit ebde948

Browse files
authored
EN #5300 add optional deploy env vars in setup for poly deployments (#87)
* EN #5300 add optional deploy env vars in setup for poly deployments * EN #5300 match env var names with TS client
1 parent 7611e79 commit ebde948

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

polyapi/cli.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,11 @@ def execute_from_cli():
4747
setup_parser.add_argument("url", nargs="?", help="URL for the Poly API")
4848

4949
def setup(args):
50-
if args.api_key and args.url:
51-
set_api_key_and_url(args.url, args.api_key)
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(api_key, url)
5255
else:
5356
initialize_config(force=True)
5457
# setup command should have default cache values

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ requires = ["setuptools>=61.2", "wheel"]
33

44
[project]
55
name = "polyapi-python"
6-
version = "0.3.10"
6+
version = "0.3.11.dev1"
77
description = "The Python Client for PolyAPI, the IPaaS by Developers for Developers"
88
authors = [{ name = "Dan Fellin", email = "[email protected]" }]
99
dependencies = [

0 commit comments

Comments
 (0)