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.jsonto 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.
-
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file srcly-0.1.6.tar.gz.
File metadata
- Download URL: srcly-0.1.6.tar.gz
- Upload date:
- Size: 1.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1b328356587f2a440c8d6b5784f72ed00999542de5c652b547467581db04fec
|
|
| MD5 |
92fb9d7e49c636133c7d4746ba6a43fc
|
|
| BLAKE2b-256 |
1dd50e8c569c88e2f0f2657977bc7bacc51f0d8582c7fe28a03a9ef1964e07f6
|
File details
Details for the file srcly-0.1.6-py3-none-any.whl.
File metadata
- Download URL: srcly-0.1.6-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d9c6e80f65c8db35d549c47356baeacf6b17d609843710fe25604a983315e04
|
|
| MD5 |
0b011304ba0cf1a1705ade52bba65f6a
|
|
| BLAKE2b-256 |
67d93f13d1bc3376c29846d02cf867fb0de2aba40d330af7685279dde246f60d
|