Quickstart: Setup the project root in one line
mainThe simplest way to initialize your project environment is using rootutils.setup_root(). This method combines finding the root and configuring the environment into a single call.
import rootutils
# This finds the root and applies settings in one step
root = rootutils.setup_root(__file__, dotenv=True, pythonpath=True, cwd=False)import rootutils
root = rootutils.setup_root(__file__, dotenv=True, pythonpath=True, cwd=False)