Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft of SQLAlchemy-based EntryCollection #1656

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
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
8 changes: 7 additions & 1 deletion optimade/server/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ class SupportedBackend(Enum):
ELASTIC = "elastic"
MONGODB = "mongodb"
MONGOMOCK = "mongomock"
SQL = "sql"


def config_file_settings(settings: BaseSettings) -> Dict[str, Any]:
Expand Down Expand Up @@ -157,10 +158,15 @@ class ServerConfig(BaseSettings):
None, description="Host settings to pass through to the `Elasticsearch` class."
)

sql_connection: Optional[str] = Field(
None, description="SQLAlchemy connection string."
)

mongo_database: str = Field(
"optimade", description="Mongo database for collection data"
"optimade", description="Mongo database name for collection data"
)
mongo_uri: str = Field("localhost:27017", description="URI for the Mongo server")

links_collection: str = Field(
"links", description="Mongo collection name for /links endpoint resources"
)
Expand Down
Loading