lomas_server package

Subpackages

Submodules

lomas_server.app module

lomas_server.app.lifespan(lomas_app: FastAPI) AsyncGenerator[None][source]

Lifespan function for the server.

This function is executed once on server startup, yields and finishes running at server shutdown.

Server initialization is performed (config loading, etc.) and the server state is updated accordingly. This can have potential side effects on the return values of the “depends” functions, which check the server state.

lomas_server.constants module

class lomas_server.constants.KCAttributeNames(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: StrEnum

Keycloak attribute names, also used as claim names in JWT token.

LOMAS_USER_CLIENT = 'lomas_user_client'
USER_EMAIL = 'user_email'
USER_NAME = 'user_name'
class lomas_server.constants.OpenDPDatasetInputMetric(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: StrEnum

Type of opendp input metric for datasets.

see https://docs.opendp.org/en/stable/api/python/opendp.metrics.html see https://github.com/opendp/opendp/blob/main/rust/src/metrics/mod.rs

CHANGE_ONE_DISTANCE = 'ChangeOneDistance'
HAMMING_DISTANCE = 'HammingDistance'
INSERT_DELETE_DISTANCE = 'InsertDeleteDistance'
INT_DISTANCE = 'u32'
SYMMETRIC_DISTANCE = 'SymmetricDistance'
class lomas_server.constants.OpenDPMeasurement(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: StrEnum

Type of divergence for opendp measurement.

see https://docs.opendp.org/en/stable/api/python/opendp.measurements.html

FIXED_SMOOTHED_MAX_DIVERGENCE = 'fixed_smoothed_max_divergence'
MAX_DIVERGENCE = 'max_divergence'
SMOOTHED_MAX_DIVERGENCE = 'smoothed_max_divergence'
ZERO_CONCENTRATED_DIVERGENCE = 'zero_concentrated_divergence'
class lomas_server.constants.SSynthColumnType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: StrEnum

Type of columns for SmartnoiseSynth transformer pre-processing.

CATEGORICAL = 'categorical'
CONTINUOUS = 'continuous'
DATETIME = 'datetime'
PRIVATE_ID = 'private_id'
class lomas_server.constants.SSynthTableTransStyle(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: StrEnum

Transformer style for smartnoise synth.

CUBE = 'cube'
GAN = 'gan'

lomas_server.mongodb_admin module

lomas_server.mongodb_admin_cli module

lomas_server.uvicorn_serve module

lomas_server.uvicorn_serve.uvicorn_serve() None[source]

Start the ASGI server for lomas.

Module contents