Skip to content

Conversation

@gaokevin1
Copy link
Member

@gaokevin1 gaokevin1 commented Nov 24, 2025

Related Issues

Fixes https://github.com/descope/etc/issues/12954

Related PRs

branch PR
service a PR Link to PR
service b PR Link to PR

Description

Added the ability to override the base URL in the Python SDK from DescopeClient as a parameter.

Must

  • Tests
  • Documentation (if applicable)

@gaokevin1 gaokevin1 requested review from aviadl, Copilot, guyp-descope and talaharoni and removed request for Copilot November 24, 2025 23:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds the ability to override the base URL in the Python SDK by introducing a base_url parameter to the DescopeClient constructor. This enables users to connect to different Descope API environments beyond the default.

Key Changes:

  • Added optional base_url parameter to DescopeClient.__init__()
  • The parameter is passed to the auth HTTP client initialization
  • Added test coverage to verify the base URL is correctly propagated to both auth and management HTTP clients

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
descope/descope_client.py Added base_url parameter to constructor and passed it to auth HTTP client
tests/test_descope_client.py Added test to verify base URL setting in both auth and management clients

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link

Coverage report

The coverage rate went from 98.18% to 98.18% ➡️

None of the new lines are part of the tested code. Therefore, there is no coverage data about them.

@rohit-ganguly
Copy link

Can we test if base_url is None?

@dorsha dorsha requested a review from itaihanski November 25, 2025 07:58
@gaokevin1 gaokevin1 requested a review from dorsha November 25, 2025 16:37
@gaokevin1 gaokevin1 enabled auto-merge (squash) November 26, 2025 07:45
@gaokevin1 gaokevin1 merged commit 66fddd3 into main Nov 26, 2025
24 checks passed
@gaokevin1 gaokevin1 deleted the add-base-url branch November 26, 2025 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants