Skip to main content

A diagnostic tool for Python Azure Functions

Project description

Azure Functions Doctor Logo

Test Workflow Status Release Workflow Status PyPI Version License Codecov Coverage Python Versions


🤔 Why Azure Functions Doctor?

  • You're 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?

This tool saves time by automating common Azure Functions environment diagnostics.

🚀 Key Features

  • Diagnose Python version, venv, azure-functions package
  • Validate host.json, local.settings.json, and function structure
  • Fully customizable via rules.json (see docs)

🩺 Overview

Azure Functions Doctor is a Python-based CLI tool designed to diagnose and validate your local Azure Functions environment. This tool helps identify configuration issues, missing dependencies, or version mismatches commonly found in Python-based Azure Functions.

The behavior and rules for each check are defined declaratively in the rules.json file located in the project root. This file allows users and developers to customize or extend validation logic without modifying Python code directly. 📘 Learn more: rules.json documentation


🪠 Requirements

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

📦 Installation

  1. Clone the repository and navigate to the project directory:
git clone https://github.com/yeongseon/azure-functions-doctor.git
cd azure-functions-doctor
  1. Create and activate a virtual environment:
python3 -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
  1. Install the tool:
pip install -e .

Alternatively, install from PyPI (when published):

pip install azure-functions-doctor

🩺 Usage

Navigate to your Azure Functions project directory, then run:

azfunc-doctor diagnose

To see all available commands:

azfunc-doctor --help

✅ Sample Output

azfunc-doctor diagnose
🩺 Azure Functions Doctor for Python v0.1.0
📁 Path: /root/Github/azure-functions-doctor/examples/basic-hello

✖ Python Env
   Python version: Python version is 3.12.3, expected >=3.9
   Virtual environment: VIRTUAL_ENV is set
   Python executable: /root/.local/share/hatch/env/virtual/azure-functions-doctor/.../bin/python exists
   requirements.txt: /root/Github/azure-functions-doctor/examples/basic-hello/requirements.txt exists
   azure-functions package: Package 'azure_functions' is not installed

✖ Project Structure
   host.json: exists
   local.settings.json: is missing
   main.py: is missing

Summary
✔ 0 Passed     2 Failed

📌 Full output: examples/basic-hello/diagnose-output.md


💡 Example

A full example is available under examples/basic-hello, showing how to:

  • Prepare a minimal Azure Functions app structure with only host.json and requirements.txt
  • Run azfunc-doctor to simulate and inspect diagnosis results

📋 Documentation

For advanced usage and developer guides, visit the project site or GitHub repository.


🤝 Contributing

We welcome issues and pull requests! See CONTRIBUTING.md for guidelines.

If you’ve found this tool helpful, please ⭐ the repo!


📄 License

This project is licensed under the MIT License.

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

azure_functions_doctor-0.1.7.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

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

azure_functions_doctor-0.1.7-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file azure_functions_doctor-0.1.7.tar.gz.

File metadata

  • Download URL: azure_functions_doctor-0.1.7.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for azure_functions_doctor-0.1.7.tar.gz
Algorithm Hash digest
SHA256 6f967f8dd4a88b81bc7e50bcdb38548771c5185b225077b52cf70c6754d24acd
MD5 646f601356a2e8dde09117e6a6c1ca54
BLAKE2b-256 3378daaaeab4ab37bb3c50c0ac2fa86dc0b9e40254ad7a0cc64cb87be35639dd

See more details on using hashes here.

File details

Details for the file azure_functions_doctor-0.1.7-py3-none-any.whl.

File metadata

File hashes

Hashes for azure_functions_doctor-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 d4f41fa009c3f374c0a32b9d9c7f90489fce9b55cee0ec417865a65f57f37678
MD5 b6a0fcc9ef7f1f311e4f52ca3155bf67
BLAKE2b-256 aeea4b41f29a66120069f3eea320e73fa013834a14c3ade61bedd3e98beafcfe

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