Getting Started¶
An opinionated OS-path module for people who take paths too seriously. ProperPath, as a subclass of Python's popular
pathlib.Path, is a drop-in replacement with some
extra features. The added features/APIs are mainly aimed at improving developer experience in building CLI
tools/applications. ProperPath was originally created for elAPI.

Main Features in a Nutshell¶
- A drop-in
pathlib.Pathreplacement with more descriptive REPL representation - Built-in error logging for raised exceptions
- Simplified APIs for working with files and directories
- Better
platformfirsintegration - Validation for file/directory write permission
- Support for Pydantic validation and Rich pretty-repr printing
Installation¶
Make sure your Python virtual environment is activated. properpath requires Python 3.12 and above. Install
properpath with pip.
You can install with uv as well.
Quickstart¶
Open a Python REPL and try the following:
>>> from properpath import P # "P" is a shorthand for "ProperPath"
>>> P("~")
ProperPath(path=/Users/username, actual=('~',), kind=dir, exists=True, is_symlink=False, err_logger=<RootLogger root (WARNING)>)
There's also Pydantic and Rich-pretty-printing support. If you already have a script or a project
where you've used from pathlib import Path, and if you're feeling adventurous (!), try the following:
Head over to the Tutorial page for more hands-on examples.