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
Metadata
Release files for srcly 0.1.34
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| srcly-0.1.34.tar.gz | 1.6 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| srcly-0.1.34-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 3.1 MB
Release files / srcly-0.1.34.tar.gz
| Download URL | srcly-0.1.34.tar.gz |
|---|---|
| Size | 1.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ce9ddd7236be99384593987ae75e9f5d6536c2c220a918a9946cb3d6e68851bc
|
|
BLAKE2b-256 checksum How to use checksums |
4b4ecd2e4cc55efa577bdd958b3ff1547a4cc18ddfb4799a3b0dd37daa531cfa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","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.1.34-py3-none-any.whl
| Download URL | srcly-0.1.34-py3-none-any.whl |
|---|---|
| Size | 1.6 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
36c21049657ff52fc0743145a748c424f86a834042631f13c31f32dcab4c62b8
|
|
BLAKE2b-256 checksum How to use checksums |
f92a4e033b4daf8cdc0ace20589fb4fb7c6c8f85bb5d639bb477924b73b8512c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","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}
|