<<<<<<< HEAD
FastAPI backend scaffold for:
POST /auth/loginPOST /jobsGET /jobs/{id}GET /results/{id}
This repo is designed to sit behind:
https://skunkscrape.comfor the static frontendhttps://api.skunkscrape.comfor the API
- FastAPI app with JWT authentication
- SQLite persistence via SQLAlchemy
- Bootstrap admin user from environment variables
- Job creation and status tracking
- Result retrieval endpoint
- Background job runner placeholder you can replace with the real SkunkScrape engine
- Dockerfile and
.env.example - Pytest smoke tests
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
cp .env.example .env
uvicorn app.main:app --reloadOpen:
http://127.0.0.1:8000/docs
POST /auth/loginwith form fieldsusernameandpassword- Use the returned bearer token
POST /jobswith a JSON payloadGET /jobs/{id}for stateGET /results/{id}for output
The included background runner is intentionally simple so the repo works immediately.
For real production workloads, replace app/services/job_runner.py with one of:
- Cloud Run Jobs
- Celery + Redis
- Cloud Tasks / Pub/Sub
- RQ / Dramatiq
The API contract stays the same.
app/
core/
db/
routers/
schemas/
services/
tests/
=======
API endpoint
9283559212cb3f31a2478b2ef5e1871fdecedc79