Skip to main content

Helpful tools for Logging, Typer, Pydantic, and Debugging

Project description

🛠️ pytools

A modular collection of Python utilities for Typer, Pydantic, and Debugging. Built for high-performance developer workflows using uv and hatchling.

pytools is designed as a "buffet" library—install only the submodules you need to keep your project dependencies lean.

🚀 Quick Start

Add pytools to your project using uv. You can choose specific "extras" to pull in only the dependencies required for that module.

# Install just the Typer utilities (and their deps)
uv add "pytools[typer] @ git+ssh://git@github.com/buchanan-solutions/pytools.git"

# Install everything
uv add "pytools[all] @ git+ssh://git@github.com/buchanan-solutions/pytools.git"

📦 Submodules

Extra Description Key Dependencies
core Foundational logic used by all modules. None (Std Lib only)
typer CLI helpers, context management, and rich logging. typer, rich, python-dotenv
pydantic Custom validators and base model configurations. pydantic
pydantic-settings Environment management and config loading. pydantic-settings
debugging Enhanced print utilities and object inspection. icecream

💡 Usage

Typer Context Helper

Easily grab objects from the Typer context in nested commands:

from pytools.typer.utils.get_from_ctx import get_from_ctx
from my_app.models import Config

@app.command()
def run(ctx: typer.Context):
    # Traverses parent contexts automatically
    config = get_from_ctx(ctx, "config", Config)
    ...

Enhanced Debugging

from pytools.debugging.debug_print import debug_print

data = {"status": "success", "meta": [1, 2, 3]}
debug_print(data) # Beautifully formatted terminal output

🛠️ Development

This project uses the src layout and hatchling backend.

# Clone and sync environment
git clone https://github.com/your-org/pytools.git
cd pytools
uv sync --all-extras

# Run tests
uv run pytest

📜 License

MIT © 2026 Buchanan Information Systems Inc.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

buchanan_solutions_pytools-0.2.1.tar.gz (61.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

buchanan_solutions_pytools-0.2.1-py3-none-any.whl (44.2 kB view details)

Uploaded Python 3

File details

Details for the file buchanan_solutions_pytools-0.2.1.tar.gz.

File metadata

  • Download URL: buchanan_solutions_pytools-0.2.1.tar.gz
  • Upload date:
  • Size: 61.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.16.5 cpython/3.13.9 HTTPX/0.28.1

File hashes

Hashes for buchanan_solutions_pytools-0.2.1.tar.gz
Algorithm Hash digest
SHA256 e102d13bf500075f53f07cefcc85bcba4721e1840b9142baa7d5d839eb16e3b7
MD5 41cb4e308bb1b3bd1fa8d386a81df17a
BLAKE2b-256 39a56a044fb89a71d0ccd1976e27bbfd2138b9247ce19059f4f631b0a865c0e3

See more details on using hashes here.

File details

Details for the file buchanan_solutions_pytools-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for buchanan_solutions_pytools-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a1e63538d0b2772e3366685c63236f64ee146e4204ea0b16833d68ecb6cb0fc1
MD5 80e489a5fee9cf3f99fdd12e138fc247
BLAKE2b-256 5c7e6e45c54e82b9207ff9eb0623fccefb2ae6c98212b0152b8a0ca225810735

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page