Skip to content

Commit

Permalink
Fixes related to xatarc reading (#7)
Browse files Browse the repository at this point in the history
* Fixes related to xatarc reading

* formatting
  • Loading branch information
tsg authored Nov 21, 2022
1 parent 304e209 commit adf9030
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "xata"
version = "0.1.2"
version = "0.1.3"
description = "Python client for Xata.io"
authors = ["Xata <[email protected]>"]
license = "Apache-2.0"
Expand Down
9 changes: 6 additions & 3 deletions xata/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def __init__(
self.workspace_id = workspace_id
self.workspace_id_location = "parameter"
self.region = region
self.base_url = f"https://{self.workspace_id}.{region}.{base_url_domain}"
self.base_url = f"https://{self.workspace_id}.{self.region}.{base_url_domain}"
self.control_plane_url = (
f"https://{control_plane_domain}/workspaces/{self.workspace_id}/"
)
Expand All @@ -108,7 +108,10 @@ def __init__(
# print (
# f"API key: {self.api_key}, "
# f"location: {self.api_key_location}, "
# f"workspaceId: {self.workspace_id}"
# f"workspaceId: {self.workspace_id}, "
# f"region: {self.region}, "
# f"dbName: {self.db_name}, "
# f"branchName: {self.branch_name}"
# )

def get_api_key(self) -> tuple[str, ApiKeyLocation]:
Expand Down Expand Up @@ -158,7 +161,7 @@ def get_workspace_id(self) -> tuple[str, str, WorkspaceIdLocation]:
def get_database_name_if_configured(self) -> str:
self.ensure_config_read()
if self.config is not None and self.config.get("databaseURL"):
_, db_name = self.parse_database_url(self.config.get("databaseURL"))
_, _, db_name = self.parse_database_url(self.config.get("databaseURL"))
return db_name
return None

Expand Down

0 comments on commit adf9030

Please sign in to comment.