File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed
Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -38,10 +38,11 @@ from descope import DescopeClient
3838# Initialized after setting the DESCOPE_PROJECT_ID and DESCOPE_AUTH_MANAGEMENT_KEY env vars
3939descope_client = DescopeClient()
4040
41- # ** Or directly **
41+ # ** Or directly (w/ optional base URL) **
4242descope_client = DescopeClient(
43- project_id = " <Project ID>"
44- auth_management_key = " <Auth Managemet Key>
43+ project_id = " <Project ID>" ,
44+ auth_management_key = " <Descope Project Management Key>,
45+ base_url = " <Descope Base URL>"
4546)
4647```
4748
@@ -1245,8 +1246,9 @@ descope_client = DescopeClient(
12451246```
12461247
12471248When the ` fga_cache_url ` is configured, the following FGA methods will automatically use the cache proxy instead of the default Descope API:
1249+
12481250- ` save_schema `
1249- - ` create_relations `
1251+ - ` create_relations `
12501252- ` delete_relations `
12511253- ` check `
12521254
Original file line number Diff line number Diff line change @@ -77,9 +77,9 @@ def __init__(
7777 # Management Initialization
7878 mgmt_http_client = HTTPClient (
7979 project_id = project_id ,
80- base_url = base_url ,
81- timeout_seconds = timeout_seconds ,
82- secure = not skip_verify ,
80+ base_url = auth_http_client . base_url ,
81+ timeout_seconds = auth_http_client . timeout_seconds ,
82+ secure = auth_http_client . secure ,
8383 management_key = management_key or os .getenv ("DESCOPE_MANAGEMENT_KEY" ),
8484 )
8585 self ._mgmt = MGMT (
You can’t perform that action at this time.
0 commit comments