Skip to content

Commit 385ddeb

Browse files
committed
Fixed #22
1 parent 7a89e24 commit 385ddeb

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ Additionally, our client supports pephub authorization.
1616
The authorization process is based on pephub device authorization protocol.
1717
To upload projects or to download private projects, user must be authorized through pephub.
1818

19+
If you want to use your own pephub instance, you can specify it by setting `PEPHUB_BASE_URL` environment variable.
20+
e.g. `export PEPHUB_BASE_URL=https://pephub.databio.org` (This is original pephub instance)
21+
1922
To login, use the `login` argument; to logout, use `logout`.
2023

2124
----

pephubclient/constants.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
from enum import Enum
22
from typing import Optional
3+
import os
34

45
import pydantic
56
from pydantic import BaseModel
67

7-
PEPHUB_BASE_URL = "https://pephub.databio.org/"
8+
PEPHUB_BASE_URL = os.getenv("PEPHUB_BASE_URL", default="https://pephub.databio.org/")
89
# PEPHUB_BASE_URL = "http://0.0.0.0:8000/"
910
PEPHUB_PEP_API_BASE_URL = f"{PEPHUB_BASE_URL}api/v1/projects/"
1011
PEPHUB_PEP_SEARCH_URL = f"{PEPHUB_BASE_URL}api/v1/namespaces/{{namespace}}/projects"

0 commit comments

Comments
 (0)