Skip to content

Commit 445d714

Browse files
ml-evsjjmortensen
andcommitted
Draft of SQLAlchemy integration
Co-authored-by: Jens Jørgen Mortensen <[email protected]>
1 parent 03ab81e commit 445d714

File tree

4 files changed

+438
-31
lines changed

4 files changed

+438
-31
lines changed

optimade/server/config.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ class SupportedBackend(Enum):
6565
ELASTIC = "elastic"
6666
MONGODB = "mongodb"
6767
MONGOMOCK = "mongomock"
68+
SQL = "sql"
6869

6970

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

161+
sql_connection: Optional[str] = Field(
162+
None, description="SQLAlchemy connection string."
163+
)
164+
160165
mongo_database: str = Field(
161-
"optimade", description="Mongo database for collection data"
166+
"optimade", description="Mongo database name for collection data"
162167
)
163168
mongo_uri: str = Field("localhost:27017", description="URI for the Mongo server")
169+
164170
links_collection: str = Field(
165171
"links", description="Mongo collection name for /links endpoint resources"
166172
)

0 commit comments

Comments
 (0)