diff --git a/lightspeed-stack.yaml b/lightspeed-stack.yaml new file mode 100644 index 00000000..ff55d09a --- /dev/null +++ b/lightspeed-stack.yaml @@ -0,0 +1 @@ +name: foo bar baz diff --git a/src/lightspeed-stack.py b/src/lightspeed-stack.py index 33414c24..b6fd2a59 100644 --- a/src/lightspeed-stack.py +++ b/src/lightspeed-stack.py @@ -1,8 +1,20 @@ """Lightspeed stack.""" +import yaml + from runners.uvicorn import start_uvicorn -import version +from models.config import Configuration + + +def load_configuration(filename: str) -> Configuration: + """Load configuration from YAML file.""" + with open(filename, encoding="utf-8") as fin: + config_dict = yaml.safe_load(fin) + return Configuration(**config_dict) + if __name__ == "__main__": print("Lightspeed stack") + configuration = load_configuration("lightspeed-stack.yaml") + print(configuration) start_uvicorn()