Skip to content

sok.server.app

The FastAPI application of S.O.K Server, and its entry point (sok-server).

The database is sok.db in data_dir() (SOK_CONFIG_DIR, /config in the image). The server listens on SOK_HOST (0.0.0.0) and SOK_PORT (8080).

Functions

configure_logging

def configure_logging() -> None:

Log to the console and to logs/sok.log of the config folder.

Source

create_app

def create_app(folder: Optional[Path] = None) -> FastAPI:

Create the application.

Parameters

NameTypeDefaultDescription
folderOptional[Path]NoneFolder of the database; data_dir() by default.
Source

main

def main() -> None:

Run the server (the sok-server command, and the Docker image).

Source

Attributes

NameValue
DEFAULT_PORT8080
loggerlogging.getLogger(__name__)
Built with Kiln