From d0070aec2c38e09b36bf477bb5c1ba055ded4067 Mon Sep 17 00:00:00 2001 From: Javed Habib Date: Wed, 10 Jul 2024 23:24:46 +0530 Subject: [PATCH] custom config model --- tesk/app.py | 1 + tesk/custom_config.py | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 tesk/custom_config.py diff --git a/tesk/app.py b/tesk/app.py index f09e525..1dd4883 100644 --- a/tesk/app.py +++ b/tesk/app.py @@ -38,6 +38,7 @@ def init_app() -> FlaskApp: foca = Foca( config_file=config_path, + custom_config_model="tesk.custom_config.CustomConfig", ) return foca.create_app() diff --git a/tesk/custom_config.py b/tesk/custom_config.py new file mode 100644 index 0000000..ae1cbaf --- /dev/null +++ b/tesk/custom_config.py @@ -0,0 +1,12 @@ +"""Custom configuration model for the FOCA app.""" + +from pydantic import BaseModel + +from tesk.api.ga4gh.tes.models import Service + + +class CustomConfig(BaseModel): + """Custom configuration model for the FOCA app.""" + + # Define custom configuration fields here + service_info: Service