Skip to main content

Interactive codebase treemap and metrics viewer.

Project description

Srcly Server

A FastAPI server for static code analysis using lizard.

Features

  • Static Analysis: Scans the codebase for cyclomatic complexity and LOC (Lines of Code).
  • Caching: Caches analysis results to codebase_mri.json to avoid redundant scans.
  • File Serving: Provides an API to read raw file contents (absolute paths).
  • API Documentation: Auto-generated Swagger UI at /docs.

Setup

This project is managed with uv.

  1. Install dependencies:

    uv sync
    

Running the Server

Start the server with hot-reloading:

uv run uvicorn app.main:app --reload

The API will be available at http://localhost:8000.

API Endpoints

Analysis

  • GET /api/analysis: Get the analysis tree. Scans if no cache exists.
  • POST /api/analysis/refresh: Force a new scan.

Files

  • GET /api/files/content?path=/absolute/path/to/file: Get raw file content.

Client Generation

You can generate a client SDK (TypeScript, Python, etc.) using the OpenAPI schema available at http://localhost:8000/openapi.json.

Example using openapi-generator-cli:

npx @openapitools/openapi-generator-cli generate -i http://localhost:8000/openapi.json -g typescript-axios -o ../client/src/api

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

srcly-0.1.4.tar.gz (1.7 MB view details)

Uploaded Source

Built Distribution

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

srcly-0.1.4-py3-none-any.whl (1.9 MB view details)

Uploaded Python 3

File details

Details for the file srcly-0.1.4.tar.gz.

File metadata

  • Download URL: srcly-0.1.4.tar.gz
  • Upload date:
  • Size: 1.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.2

File hashes

Hashes for srcly-0.1.4.tar.gz
Algorithm Hash digest
SHA256 72859d96f8da18af33d9b36fc2b0a5307daf9b1a7d686668fcc79abd32b8a621
MD5 6b4f1caf3b433fdede8d75efd0e3e324
BLAKE2b-256 533c25dda22b13e070f8ec6bbb17cbd691be2cf5a910d236749d13b8274e7314

See more details on using hashes here.

File details

Details for the file srcly-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: srcly-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 1.9 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.2

File hashes

Hashes for srcly-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 db177c9e635d8a726a90de2d2686eb799088c8a3aa052197495d1f46fb23b014
MD5 ac6db551837d41a36019fd9aeda77abc
BLAKE2b-256 f04ee6eff57638027b94d0ddea3e87e2f205bd72b8f551a67152aba2463b7db9

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