Patterns & Best Practices

Best practices for Python tooling used throughout this documentation.

Topics

  • uv & PEP 723 Scripts - Single-file scripts with inline dependencies

  • Virtual environment management

  • Testing patterns

  • Packaging and distribution

Standards

All tools in domus-python follow these conventions:

  1. PEP 723 inline metadata for dependency declaration

  2. uv for execution and dependency resolution

  3. Click or argparse for CLI argument parsing

  4. Type hints throughout

  5. Docstrings following Google style