docs

FastAPI-Data documentation

Everything below covers the open-source edition. Notes on the complete edition sit at the bottom of the page.

Requirements

Python 3.11 or newer, and one of the fastapi-data releases from GitHub. Polars, FastAPI, uvicorn, and pytest are pulled in by pip install -e ..

Setup

git clone https://github.com/FauziMatakupan/\
  fastapi-data.git
cd fastapi-data
python -m venv .venv && source .venv/bin/activate
pip install -e .
uvicorn app.main:app --reload

API server defaults to port 8000. The docs page, generated from the OpenAPI schema, lives at /docs.

Configuration

Settings read from environment variables or a .env file.

SettingDefaultWhat it does
APP_NAMEFastAPI-DataShown on /docs
ENVIRONMENTdevelopmentReported by /health
API_V1_PREFIX/api/v1Route prefix
DATA_DIR./dataUpload target directory
MAX_UPLOAD_MB100Declared limit, not enforced by the upload endpoint yet

Endpoints

POST /api/v1/data/upload

Multipart form with a file field. Accepts .csv, .parquet, .pq. Everything else returns 415. The response carries a dataset_id, which is abs(hash(filename)) & 0xFFFFFFFF, so the same filename in one process always lands on the same path and the second upload writes over the first.

curl -s -F "file=@sample.csv" localhost:8000/api/v1/data/upload
{"dataset_id": "891903036.csv", "size_bytes": 49}

GET /api/v1/data/{id}/profile

Dtype, null count, and distinct count per column, for every column in the upload. Scalar JSON keyed by column name. Unknown dataset returns 404.

GET /api/v1/data/{id}/stats

Numeric columns only. Count, mean, std, min, p25, median, p75, max. Quartiles are interpolated linearly — Polars' default nearest mode snaps to a real value and disagrees with everything else you would compare against.

GET /health

{"status": "ok", "environment": "development"}

Complete edition — what it adds

Same engine, same JSON contract. Around that core:

Self-hosted. One codebase, stays yours. It's a one-time purchase of the source code — the checkout takes you to Polar.sh and you get the full repository and a license key on the spot: Get the complete edition.