From 72a36eb0560f3a0ffcec22f898b933251602368b Mon Sep 17 00:00:00 2001 From: "eric.neumann" Date: Wed, 17 Sep 2025 15:41:19 -0700 Subject: [PATCH 1/2] EN #5300 add optional deploy env vars in setup for poly deployments --- polyapi/cli.py | 7 +++++-- pyproject.toml | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/polyapi/cli.py b/polyapi/cli.py index 62c3cad..3e00a47 100644 --- a/polyapi/cli.py +++ b/polyapi/cli.py @@ -47,8 +47,11 @@ def execute_from_cli(): setup_parser.add_argument("url", nargs="?", help="URL for the Poly API") def setup(args): - if args.api_key and args.url: - set_api_key_and_url(args.url, args.api_key) + api_key = args.api_key or os.getenv("DEPLOY_POLY_API_KEY") + url = args.url or os.getenv("DEPLOY_POLY_API_BASE_URL") + + if api_key and url: + set_api_key_and_url(api_key, url) else: initialize_config(force=True) # setup command should have default cache values diff --git a/pyproject.toml b/pyproject.toml index b208338..3e1ce32 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ requires = ["setuptools>=61.2", "wheel"] [project] name = "polyapi-python" -version = "0.3.10" +version = "0.3.11.dev1" description = "The Python Client for PolyAPI, the IPaaS by Developers for Developers" authors = [{ name = "Dan Fellin", email = "dan@polyapi.io" }] dependencies = [ From 479c2707b162b2db3ff3924fdd183b6c957b4a34 Mon Sep 17 00:00:00 2001 From: "eric.neumann" Date: Wed, 17 Sep 2025 17:02:15 -0700 Subject: [PATCH 2/2] EN #5300 match env var names with TS client --- polyapi/cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/polyapi/cli.py b/polyapi/cli.py index 3e00a47..df7fedc 100644 --- a/polyapi/cli.py +++ b/polyapi/cli.py @@ -47,8 +47,8 @@ def execute_from_cli(): setup_parser.add_argument("url", nargs="?", help="URL for the Poly API") def setup(args): - api_key = args.api_key or os.getenv("DEPLOY_POLY_API_KEY") - url = args.url or os.getenv("DEPLOY_POLY_API_BASE_URL") + api_key = args.api_key or os.getenv("POLY_API_KEY") + url = args.url or os.getenv("POLY_API_BASE_URL") if api_key and url: set_api_key_and_url(api_key, url)