Skip to content

Commit

Permalink
refactor: add load config from
Browse files Browse the repository at this point in the history
  • Loading branch information
TudorAndrei-Pythia committed Oct 10, 2023
1 parent bcff387 commit 335b069
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/sirqle/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,17 @@ def __init__(
scheme = str(urlparse(url).scheme)
if scheme in ["wss", "ws"]:
self.client = CLIENT[scheme](url=url)
else:
url = os.environ.get("SURREAL_URL")
namespace = os.environ.get("SURREAL_NS")
username = os.environ.get("SURREAL_DB")
username = os.environ.get("SURREAL_USER")
password = os.environ.get("SURREAL_PASSWORD")
scheme = str(urlparse(url).scheme)
self.client = CLIENT[scheme](
url,
namespace=namespace,
database=database,
username=username,
password=password,
)

0 comments on commit 335b069

Please sign in to comment.