Skip to content

Commit 08eee2a

Browse files
committed
more changes
1 parent a4f28bd commit 08eee2a

File tree

4 files changed

+3
-7
lines changed

4 files changed

+3
-7
lines changed

src/anyvlm/config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class Settings(BaseSettings):
2323

2424
env: ServiceEnvironment = ServiceEnvironment.LOCAL
2525
anyvar_uri: str = "http://localhost:8000"
26+
storage_uri: str = "postgresql://postgres@localhost:5432/anyvlm"
2627

2728

2829
@cache

src/anyvlm/main.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import logging
44
from collections.abc import AsyncGenerator
55
from contextlib import asynccontextmanager
6-
from os import environ
76
from urllib.parse import urlparse
87

98
from anyvar.anyvar import create_storage, create_translator
@@ -20,7 +19,6 @@
2019
ServiceOrganization,
2120
ServiceType,
2221
)
23-
from anyvlm.storage import DEFAULT_STORAGE_URI
2422
from anyvlm.storage.base_storage import Storage
2523
from anyvlm.utils.types import (
2624
EndpointTag,
@@ -68,7 +66,7 @@ def create_anyvlm_storage(uri: str | None = None) -> Storage:
6866
:return: AnyVLM storage instance
6967
"""
7068
if not uri:
71-
uri = environ.get("ANYVLM_STORAGE_URI", DEFAULT_STORAGE_URI)
69+
uri = get_config().storage_uri
7270

7371
parsed_uri = urlparse(uri)
7472
if parsed_uri.scheme == "postgresql":

src/anyvlm/storage/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,4 @@
22

33
from .base_storage import Storage
44

5-
DEFAULT_STORAGE_URI = "postgresql://postgres@localhost:5432/anyvlm"
6-
7-
__all__ = ["DEFAULT_STORAGE_URI", "Storage"]
5+
__all__ = ["Storage"]

tests/__init__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)