diff --git a/main.py b/main.py index 0254e78..0969463 100644 --- a/main.py +++ b/main.py @@ -1,3 +1,12 @@ +import typer + from source.core import logger, settings -logger.debug(settings) + +def main(name: str, lastname: str): + logger.debug(settings) + print(f"Hello {name} {lastname}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/pdm.lock b/pdm.lock index 20b9c48..c5884e9 100644 --- a/pdm.lock +++ b/pdm.lock @@ -5,7 +5,7 @@ groups = ["default", "dev", "lint"] strategy = ["inherit_metadata"] lock_version = "4.5.0" -content_hash = "sha256:7b04645e6abcf9237cb757035b561be74c25f7de2d90cc16fe2aa7efac234309" +content_hash = "sha256:ad1b08466bebff9620f2b5e44868ef059b52362117834987257ecab2e355ca48" [[metadata.targets]] requires_python = "==3.10.*" @@ -1592,6 +1592,17 @@ files = [ {file = "setuptools-72.1.0.tar.gz", hash = "sha256:8d243eff56d095e5817f796ede6ae32941278f542e0f941867cc05ae52b162ec"}, ] +[[package]] +name = "shellingham" +version = "1.5.4" +requires_python = ">=3.7" +summary = "Tool to Detect Surrounding Shell" +groups = ["default"] +files = [ + {file = "shellingham-1.5.4-py2.py3-none-any.whl", hash = "sha256:7ecfff8f2fd72616f7481040475a65b2bf8af90a56c89140852d1120324e8686"}, + {file = "shellingham-1.5.4.tar.gz", hash = "sha256:8dbca0739d487e5bd35ab3ca4b36e11c4078f3a234bfce294b0a0291363404de"}, +] + [[package]] name = "siapy" version = "0.4.0" @@ -1772,6 +1783,23 @@ files = [ {file = "tqdm-4.66.5.tar.gz", hash = "sha256:e1020aef2e5096702d8a025ac7d16b1577279c9d63f8375b63083e9a5f0fcbad"}, ] +[[package]] +name = "typer" +version = "0.12.3" +requires_python = ">=3.7" +summary = "Typer, build great CLIs. Easy to code. Based on Python type hints." +groups = ["default"] +dependencies = [ + "click>=8.0.0", + "rich>=10.11.0", + "shellingham>=1.3.0", + "typing-extensions>=3.7.4.3", +] +files = [ + {file = "typer-0.12.3-py3-none-any.whl", hash = "sha256:070d7ca53f785acbccba8e7d28b08dcd88f79f1fbda035ade0aecec71ca5c914"}, + {file = "typer-0.12.3.tar.gz", hash = "sha256:49e73131481d804288ef62598d97a1ceef3058905aa536a1134f90891ba35482"}, +] + [[package]] name = "types-pytz" version = "2024.1.0.20240417" diff --git a/pyproject.toml b/pyproject.toml index 3f4bf28..f0cbf37 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,6 +7,7 @@ dependencies = [ "siapy>=0.4.0", "loguru>=0.7.2", "pydantic-settings>=2.4.0", + "typer>=0.12.3", ] requires-python = "==3.10.*" readme = "README.md" diff --git a/source/core/settings.py b/source/core/settings.py index 5c7db51..32587db 100644 --- a/source/core/settings.py +++ b/source/core/settings.py @@ -20,7 +20,7 @@ class Settings(BaseSettings): model_config = SettingsConfigDict( env_file=DOTENV_PATH, env_file_encoding="utf-8", - cli_parse_args=True, + cli_parse_args=False, )