Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions 2025/sdk/sdk_v3/client.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import httpx

_client = None
_token = None
_base_url = "http://localhost:8000"
_client: httpx.Client | None = None
_token: str | None = None
_base_url: str = "http://localhost:8000"


def set_credentials(token: str):
Expand All @@ -21,15 +21,15 @@ def request(method: str, endpoint: str, **kwargs) -> httpx.Response:
return response


def get(endpoint: str, params: dict = None) -> httpx.Response:
def get(endpoint: str, params: dict | None = None) -> httpx.Response:
return request("GET", endpoint, params=params)


def post(endpoint: str, json: dict = None) -> httpx.Response:
def post(endpoint: str, json: dict | None = None) -> httpx.Response:
return request("POST", endpoint, json=json)


def put(endpoint: str, json: dict = None) -> httpx.Response:
def put(endpoint: str, json: dict | None = None) -> httpx.Response:
return request("PUT", endpoint, json=json)


Expand Down