This commit is contained in:
Marc Beninca 2023-10-10 22:11:57 +02:00
parent fb180e8084
commit 16d3f72a6d
8 changed files with 154 additions and 43 deletions

13
project/__init__.py Normal file
View file

@ -0,0 +1,13 @@
import os
class Project:
def __init__(self, root_path: str):
self.root = root_path
def from_root_file(file_path: str):
project_file = os.path.realpath(file_path)
project_root = os.path.dirname(project_file)
return Project(real_file)