From f7d6e25766c86cd072aede4d847895d730118bd4 Mon Sep 17 00:00:00 2001 From: Limitex <76650151+Limitex@users.noreply.github.com> Date: Sun, 9 Nov 2025 06:55:17 +0900 Subject: [PATCH] feat: get project root config --- src/config/__init__.py | 3 ++- src/config/_path.py | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 src/config/_path.py diff --git a/src/config/__init__.py b/src/config/__init__.py index f856df3..04d1d94 100644 --- a/src/config/__init__.py +++ b/src/config/__init__.py @@ -1,4 +1,5 @@ from ._cache import get_cache_dir from ._env import load_envs +from ._path import get_project_root -__all__ = ["load_envs", "get_cache_dir"] +__all__ = ["load_envs", "get_cache_dir", "get_project_root"] diff --git a/src/config/_path.py b/src/config/_path.py new file mode 100644 index 0000000..0bf09e6 --- /dev/null +++ b/src/config/_path.py @@ -0,0 +1,5 @@ +from pathlib import Path + + +def get_project_root() -> Path: + return Path(__file__).parents[2].resolve()