Skip to content

Commit 8c1f69e

Browse files
[docs] Clarify using GITPOD_BASE_URL env var for custom domains
Co-authored-by: Ona <no-reply@ona.com>
1 parent ebceec8 commit 8c1f69e

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,26 @@ we recommend using [python-dotenv](https://pypi.org/project/python-dotenv/)
4040
to add `GITPOD_API_KEY="My Bearer Token"` to your `.env` file
4141
so that your Bearer Token is not stored in source control.
4242

43+
## Custom Domains
44+
45+
By default, the SDK connects to `https://app.gitpod.io/api`. To connect to a custom Gitpod domain, set the `GITPOD_BASE_URL` environment variable:
46+
47+
```sh
48+
export GITPOD_BASE_URL="https://custom.domain.com/api"
49+
```
50+
51+
Or provide it directly when creating the client:
52+
53+
```python
54+
from gitpod import Gitpod
55+
56+
client = Gitpod(
57+
base_url="https://custom.domain.com/api",
58+
)
59+
```
60+
61+
The SDK will automatically use the custom domain for all API requests.
62+
4363
## Async usage
4464

4565
Simply import `AsyncGitpod` instead of `Gitpod` and use `await` with each API call:

0 commit comments

Comments
 (0)