diff options
| -rw-r--r-- | src/technical_renaissance/app.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/technical_renaissance/app.py b/src/technical_renaissance/app.py index 3ce2efe..a35ec2d 100644 --- a/src/technical_renaissance/app.py +++ b/src/technical_renaissance/app.py @@ -1,5 +1,18 @@ +from typing import cast +import tomllib +from pathlib import Path from robyn import Request from robyn import Robyn +from typing import TypedDict + + +User = TypedDict("User", {"name": str, "url": str, "description": str}) +Config = TypedDict("Config", {"user": list[User]}) + + +def return_config(path: Path) -> Config: + with path.open("rb") as config: + return cast(Config, tomllib.load(config)) app = Robyn(__file__) |
