We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e5448b9 commit 1fbdd1cCopy full SHA for 1fbdd1c
2 files changed
src/murfey/server/murfey_db.py
@@ -17,6 +17,8 @@ def url(security_config: Security | None = None) -> str:
17
creds = yaml.safe_load(stream)
18
f = Fernet(security_config.crypto_key.encode("ascii"))
19
p = f.decrypt(creds["password"].encode("ascii"))
20
+ if security_config.db == "sqlite":
21
+ return f"sqlite:///{creds['database']}"
22
return f"postgresql+psycopg2://{creds['username']}:{p.decode()}@{creds['host']}:{creds['port']}/{creds['database']}"
23
24
src/murfey/util/config.py
@@ -228,6 +228,7 @@ class Security(BaseModel):
228
# Murfey database settings
229
murfey_db_credentials: Path
230
crypto_key: str
231
+ db: str = "postgres"
232
sqlalchemy_pooling: bool = True
233
234
# ISPyB settings
0 commit comments