Skip to main content

Diagnose FastAPI codebases for best practices

Project description

fastapi-therapist

Diagnose FastAPI codebases for security, performance, correctness, and architecture issues. Outputs a 0–100 health score.

Installation

pip install fastapi-therapist

Usage

# Scan current directory with verbose output
fastapi-therapist . --verbose

# Scan a specific project
fastapi-therapist /path/to/fastapi/project --verbose

# Output only the score (useful for CI)
fastapi-therapist . --score

Rules

Async/Sync Correctness

Rule Severity Detects
FASTT001 ERROR Sync blocking IO (requests.get, time.sleep) in async endpoint
FASTT002 ERROR Sync SQLAlchemy calls in async endpoint
FASTT003 WARN/ERROR async def endpoint with no await
FASTT004 ERROR asyncio.run() inside async context — nested event loop
FASTT005 ERROR open() blocking file I/O in async endpoint
FASTT006 WARNING subprocess.run() / os.system() in async endpoint

Correctness

Rule Severity Detects
FASTT011 WARNING POST/PUT/PATCH/DELETE missing explicit status_code

Score

The health score formula:

100 - (unique error rules × 1.5) - (unique warning rules × 0.75)
  • 75–100 Great
  • 50–74 Needs work
  • 0–49 Critical

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

fastapi_therapist-0.1.2.tar.gz (24.5 kB view details)

Uploaded Source

Built Distribution

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

fastapi_therapist-0.1.2-py3-none-any.whl (28.8 kB view details)

Uploaded Python 3

File details

Details for the file fastapi_therapist-0.1.2.tar.gz.

File metadata

  • Download URL: fastapi_therapist-0.1.2.tar.gz
  • Upload date:
  • Size: 24.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for fastapi_therapist-0.1.2.tar.gz
Algorithm Hash digest
SHA256 6aa8c0859572e034856c96eacc66d38ffdd11b8e3f426d570229ad76e6955950
MD5 bcae0acea1956985f1a3d25b83d8a594
BLAKE2b-256 03b5accdd54a6f01269998d8cec70f8611132cfe59a2857f0b73a3b0eb6ba386

See more details on using hashes here.

File details

Details for the file fastapi_therapist-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: fastapi_therapist-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 28.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for fastapi_therapist-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0843be68de190de2b70ea0b7264f0f23069d80f8623b705d99e24748fe5e12f0
MD5 b1cf52bd3aeb161d6676d4e0364a9b64
BLAKE2b-256 77f5541a89b2fe462057efeae3fe5da9b79f4b91eeafd2ac05eec341d6f1b67f

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