Metadata-Version: 2.1
Name: hawk-debug
Version: 0.0.2
Summary: A dubugging & profiling toolkit for production Python microservices
Author-Email: Roman Glushko <roman.glushko.m@gmail.com>
License: MIT
Requires-Python: >=3.9
Provides-Extra: pyinstrument
Provides-Extra: zpages
Provides-Extra: docs
Requires-Dist: pyinstrument>=4.7.2; extra == "pyinstrument"
Requires-Dist: jinja2>=3.1.4; extra == "zpages"
Requires-Dist: mkdocs>=1.6.1; extra == "docs"
Requires-Dist: mkdocs-material>=9.5.34; extra == "docs"
Requires-Dist: mdx-include>=1.4.2; extra == "docs"
Requires-Dist: mkautodoc>=0.2.0; extra == "docs"
Requires-Dist: mkdocs-pymdownx-material-extras>=2.5.6; extra == "docs"
Description-Content-Type: text/markdown

<div align="center">
    <img src="https://raw.githubusercontent.com/roma-glushko/hawk/main/assets/logo/hawk-debug_transparent_bg.png" width="300px" alt="Hawk Debug Toolkit For Python" />
    <h1>Hawk: Debug & Profile</h1>
    <p>A lightweight debugging & profiling toolkit <br/> for production 🐍 Python microservices</p>
</div>

🦅 Hawk gives you more control over how your Python microservices run in production
with little overhead by bringing a set of internal API to help you to profile and debug your services.

> [!NOTE]
>
> 🚧 **This project is under active development and not ready for production use yet.** 🚧

Hawk is inspired by Go's `net/http/pprof` & `expvars` packages and 
OpenTelemetry Collector's ZPages which are in turn stemmed from Google's internal practices around
debugging production services.

> [!IMPORTANT]
>
> Be sure to start this project and watch it if you find it helpful ⭐️

## Features

- ⏱️ **Memory Profiling** via the `tracemalloc` stdlib
- ⏱️ **CPU Profiling** (incl. Asyncio services) via `pyinstrument` & `cProfile` (soon)
- 🙋‍♀️ **Activate profiling on demand** in real environments
- 🎨 **Render your profiles** right from your browser
- ⬇️ **Download your profiles** for the further investigation
- 🔭 **Expose internal state** of your service via debug vars (🚧soon)
- 🔧 **Create custom debug pages** (a.k.a. `ZPages`) in a simplified way
- 🔧 **Controlled via environment variables**, no codebase modifications needed to enable/disable functionality completely
- 🔓 **No elevated permissions needed** (`CAP_PTRACE`, etc.)
- 🔭 **OpenTelemetry**-aware (🚧soon)

<div align="center">
    <p>Integrated With:</p>
    <p align="center">
        <img src="https://raw.githubusercontent.com/roma-glushko/hawk/main/assets/contrib/fastapi.png" width="150px" alt="FastAPI Logo" />
        <img src="https://raw.githubusercontent.com/roma-glushko/hawk/main/assets/contrib/starlette.svg" width="150px" alt="Starlette Logo" />
        <img src="https://raw.githubusercontent.com/roma-glushko/hawk/main/assets/contrib/flask.png" width="150px" alt="Flask Logo" />
    </p>
</div>
