Metadata-Version: 2.4
Name: azure-functions-doctor
Version: 0.1.9
Summary: A diagnostic tool for Python Azure Functions
Author-email: Yeongseon Choe <yeongseon.choe@gmail.com>
License: MIT
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Requires-Dist: packaging
Requires-Dist: requests
Requires-Dist: rich
Requires-Dist: typer
Provides-Extra: dev
Requires-Dist: black==24.4.2; extra == 'dev'
Requires-Dist: build; extra == 'dev'
Requires-Dist: coverage; extra == 'dev'
Requires-Dist: hatch; extra == 'dev'
Requires-Dist: mkdocs; extra == 'dev'
Requires-Dist: mkdocs-material; extra == 'dev'
Requires-Dist: mkdocstrings[python]; extra == 'dev'
Requires-Dist: mypy==1.15.0; extra == 'dev'
Requires-Dist: pre-commit; extra == 'dev'
Requires-Dist: pytest; extra == 'dev'
Requires-Dist: ruff==0.11.11; extra == 'dev'
Requires-Dist: tox; extra == 'dev'
Requires-Dist: types-requests; extra == 'dev'
Description-Content-Type: text/markdown

<p align="center">
  <img
    src="https://raw.githubusercontent.com/yeongseon/azure-functions-doctor-for-python/main/logo_assets/logo_full.png"
    alt="Azure Functions Doctor Logo"
    width="320"
  />
</p>

<p align="center">
  <a href="https://github.com/yeongseon/azure-functions-doctor-for-python/actions/workflows/test.yml">
    <img src="https://github.com/yeongseon/azure-functions-doctor-for-python/actions/workflows/test.yml/badge.svg" alt="Test Status" />
  </a>
  <a href="https://github.com/yeongseon/azure-functions-doctor-for-python/actions/workflows/release.yml">
    <img src="https://github.com/yeongseon/azure-functions-doctor-for-python/actions/workflows/release.yml/badge.svg" alt="Release Status" />
  </a>
  <a href="https://pypi.org/project/azure-functions-doctor/">
    <img src="https://img.shields.io/pypi/v/azure-functions-doctor.svg" alt="PyPI Version" />
  </a>
  <a href="LICENSE">
    <img src="https://img.shields.io/github/license/yeongseon/azure-functions-doctor-for-python.svg" alt="License" />
  </a>
  <a href="https://codecov.io/gh/yeongseon/azure-functions-doctor-for-python">
    <img src="https://codecov.io/gh/yeongseon/azure-functions-doctor-for-python/branch/main/graph/badge.svg" alt="Codecov Coverage" />
  </a>
  <a href="https://pypi.org/project/azure-functions-doctor/">
    <img src="https://img.shields.io/pypi/pyversions/azure-functions-doctor.svg" alt="Python Versions" />
  </a>
</p>

---

# 🚑 Azure Functions Doctor for Python

A fast and extensible diagnostic CLI for Python-based Azure Functions projects.

---

## 🤔 Why Azure Functions Doctor?

- Getting random 500 errors and suspect misconfiguration?
- Need to verify your dev environment before CI/CD deployment?
- Want a quick health check without digging through docs?

**Azure Functions Doctor** helps save time by automating common environment diagnostics.

---

## ✨ Key Features

- Diagnose Python version, venv, `azure-functions` package
- Validate `host.json`, `local.settings.json`, function structure
- Fully customizable via `rules.json`
- Output: colorized CLI or machine-readable JSON
- Built-in rule engine, easily extensible

---

## 🪠 Requirements

- Python 3.9+
- Git
- (Optional) Azure Functions Core Tools v4+ (`npm i -g azure-functions-core-tools@4`)
- (Recommended) Unix-like shell or PowerShell for Makefile support

---

## 📦 Installation

From PyPI:

```bash
pip install azure-functions-doctor
```

Or from source:

```bash
git clone https://github.com/yeongseon/azure-functions-doctor-for-python.git
cd azure-functions-doctor-for-python
python3 -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
pip install -e .
```

---

## 🩺 Usage

### Run the Doctor

```bash
func-doctor diagnose
```

<img src="docs/assets/func-doctor-example.png" alt="Sample output" width="100%" />

### Show Help

```bash
func-doctor --help
```

📌 Sample: [examples/basic-hello/diagnose-output.md](examples/basic-hello/diagnose-output.md)

---

## 📋 Example

See [`examples/basic-hello`](examples/basic-hello) for:

- Minimal Azure Functions structure setup
- Running the CLI and inspecting results

---

## 📘 Documentation

- Getting Started: [docs/index.md](https://yeongseon.github.io/azure-functions-doctor-for-python/)
- Custom Rules: [docs/rules.md](https://yeongseon.github.io/azure-functions-doctor-for-python/rules/)
- Developer Guide: [docs/development.md](https://yeongseon.github.io/azure-functions-doctor-for-python/development/)

---

## 🤝 Contributing

We welcome issues and PRs!

Please see [`CONTRIBUTING.md`](CONTRIBUTING.md) for contribution guidelines.

If you find this useful, please ⭐️ the repo!

---

## 📄 License

This project is licensed under the [MIT License](LICENSE).