Skip to main content

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 in the user cache directory (see the main README) and reuses them until files change.
  • 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 unless an unchanged cached analysis exists.
  • POST /api/analysis/refresh: Force a new scan and replace the cached analysis.

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

Metadata

Release files for srcly 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for srcly 0.3.0
File Size Uploaded
srcly-0.3.0.tar.gz 1.2 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for srcly 0.3.0
File Interpreter ABI Platform
srcly-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 2.4 MB

Release files / srcly-0.3.0.tar.gz

Download URL srcly-0.3.0.tar.gz
Size 1.2 MB
Tags Source
SHA-256 checksum
How to use checksums
8d573d61f25dc453ea2ccb2a691bcf43ab04a8073377fd520b3146daa2f543e0
BLAKE2b-256 checksum
How to use checksums
5742066d32701eafee3e9f00b161db3b34df5496ba6aa4588f54bf76a18b8380
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","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":true}

Release files / srcly-0.3.0-py3-none-any.whl

Download URL srcly-0.3.0-py3-none-any.whl
Size 1.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
c2a5c5acbfbfcdfe1f1ca91be54cc3f276104736982482c2a37537fd2143d30d
BLAKE2b-256 checksum
How to use checksums
1af74f7fc234592fcfbfd6b7258bf3043f45c36df258fcf8781c7fe6785e74fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","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":true}

Release history Release notifications | RSS feed

1.0.0

2 release files

This release

0.3.0 This release

2 release files

0.2.0

2 release files

0.1.29

2 release files

0.1.27

2 release files

0.1.26

2 release files

0.1.24

2 release files

0.1.23

2 release files

0.1.21

2 release files

0.1.20

2 release files

0.1.11

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page