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.31.tar.gz (2.3 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.31-py3-none-any.whl (2.5 MB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for srcly-0.1.31.tar.gz
Algorithm Hash digest
SHA256 f75e6710406054662ff223dfa1b38148257102a5a8919297c01a29703c0bb604
MD5 817a9a812489a15e9a02769ba376ce64
BLAKE2b-256 334161f5e9bc14fb0ae5b33c10a51f8a3ba7c0925e99dca1804f7fe14749e1c6

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for srcly-0.1.31-py3-none-any.whl
Algorithm Hash digest
SHA256 a2840d080a10b3a0909b4333ad41dbd170952bb754a8c4e1f18fb17f52e1e318
MD5 41c08e5a793db426fc25d7abf86d5c1a
BLAKE2b-256 4f53d7d22897c76bf4e62fa137dad3c3a6a0937a824b2ea3b62251ad01ebed39

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