def path ( self ) : return pathlib . Path ( self . package . __file__ ) . resolve ( ) . parent . parent
refer to project directory in python
Return the project path ( aka project root )
def path(self):
        """Return the project path (aka project root)

        If ``package.__file__`` is ``/foo/foo/__init__.py``, then project.path
        should be ``/foo``.
        """
        return pathlib.Path(self.package.__file__).resolve().parent.parent