dara.server.setting module#
- pydantic settings DaraServerSettings[source]#
Bases:
BaseSettingsSettings for the Dara server.
- host#
The host address for the server. Default is “127.0.0.1”.
- Type:
str
- port#
The port on which the server will run. Default is 8898.
- Type:
int
- database_backend#
The backend to use for the database. Default is “monty”.
- Type:
Literal[“monty”, “mongodb”]
- mongodb_host#
Host for MongoDB. Used only if database_backend is “mongodb”. Default is “localhost”.
- Type:
str
- mongodb_port#
Port for MongoDB. Used only if database_backend is “mongodb”. Default is 27017.
- Type:
int
- mongodb_database#
Database name for MongoDB. Used only if database_backend is “mongodb”. Default is “dara_server”.
- Type:
str
- mongodb_username#
Username for MongoDB. Used only if database_backend is “mongodb”. Default is None.
- Type:
str | None
- mongodb_password#
Password for MongoDB. Used only if database_backend is “mongodb”. Default is None.
- Type:
str | None
- montydb_path#
Path for MontyDB database. Used only if database_backend is “monty”. Default is “~/.dara-server/montydb”.
- Type:
str
Show JSON schema
{ "title": "DaraServerSettings", "description": "Settings for the Dara server.\n\nAttributes:\n host (str): The host address for the server.\n Default is \"127.0.0.1\".\n port (int): The port on which the server will run.\n Default is 8898.\n database_backend (Literal[\"monty\", \"mongodb\"]): The backend\n to use for the database. Default is \"monty\".\n mongodb_host (str): Host for MongoDB. Used only if database_backend\n is \"mongodb\". Default is \"localhost\".\n mongodb_port (int): Port for MongoDB. Used only if database_backend\n is \"mongodb\". Default is 27017.\n mongodb_database (str): Database name for MongoDB. Used only if\n database_backend is \"mongodb\". Default is \"dara_server\".\n mongodb_username (str | None): Username for MongoDB. Used only if\n database_backend is \"mongodb\". Default is None.\n mongodb_password (str | None): Password for MongoDB. Used only if\n database_backend is \"mongodb\". Default is None.\n montydb_path (str): Path for MontyDB database. Used only if\n database_backend is \"monty\". Default is \"~/.dara-server/montydb\".", "type": "object", "properties": { "host": { "default": "127.0.0.1", "description": "The host address for the server.", "title": "Host", "type": "string" }, "port": { "default": 8898, "description": "The port on which the server will run.", "title": "Port", "type": "integer" }, "database_backend": { "default": "monty", "description": "The backend to use for the database.", "enum": [ "monty", "mongodb" ], "title": "Database Backend", "type": "string" }, "mongodb_host": { "default": "localhost", "description": "Host for MongoDB. Used only if database_backend is \"mongodb\".", "title": "Mongodb Host", "type": "string" }, "mongodb_port": { "default": 27017, "description": "Port for MongoDB. Used only if database_backend is \"mongodb\".", "title": "Mongodb Port", "type": "integer" }, "mongodb_database": { "default": "dara_server", "description": "Database name for MongoDB. Used only if database_backend is \"mongodb\".", "title": "Mongodb Database", "type": "string" }, "mongodb_username": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Username for MongoDB. Used only if database_backend is \"mongodb\".", "title": "Mongodb Username" }, "mongodb_password": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Password for MongoDB. Used only if database_backend is \"mongodb\".", "title": "Mongodb Password" }, "montydb_path": { "default": "/home/runner/.dara-server/montydb", "description": "Path for MontyDB database. Used only if database_backend is \"monty\".", "title": "Montydb Path", "type": "string" } }, "additionalProperties": false }
- Config:
env_prefix: str = dara_server_
cli_parse_args: bool = True
cli_ignore_unknown_args: bool = True
- Fields:
- field database_backend: Literal['monty', 'mongodb'] = 'monty'#
The backend to use for the database.
- field host: str = '127.0.0.1'#
The host address for the server.
- field mongodb_database: str = 'dara_server'#
Database name for MongoDB. Used only if database_backend is “mongodb”.
- field mongodb_host: str = 'localhost'#
Host for MongoDB. Used only if database_backend is “mongodb”.
- field mongodb_password: str | None = None#
Password for MongoDB. Used only if database_backend is “mongodb”.
- field mongodb_port: int = 27017#
Port for MongoDB. Used only if database_backend is “mongodb”.
- field mongodb_username: str | None = None#
Username for MongoDB. Used only if database_backend is “mongodb”.
- field montydb_path: str = '/home/runner/.dara-server/montydb'#
Path for MontyDB database. Used only if database_backend is “monty”.
- field port: int = 8898#
The port on which the server will run.