2026-01-27 13:52:44 +01:00
2026-01-27 13:52:44 +01:00
2026-01-27 13:52:44 +01:00
2026-01-27 13:52:44 +01:00
2026-01-27 13:52:44 +01:00
2026-01-27 13:52:44 +01:00

Hotspot API

Backend FastAPI per riconoscimento e matching hotspot europei.

Endpoints

Metodo Endpoint Descrizione
GET / Info servizio
GET /health Health check
GET /hotspots Lista tutti gli hotspot
GET /hotspots/{id} Singolo hotspot
POST /match Cerca corrispondenza per testo
POST /reload Ricarica database JSON

Esempio chiamata /match

curl -X POST "https://api.tuodominio.com/match" \
  -H "Content-Type: application/json" \
  -d '{"text": "Brussels", "language": "en"}'

Risposta:

{
  "found": true,
  "hotspot_id": "1",
  "name": "Brussels",
  "confidence": 1.0,
  "video_ids": [133]
}

Deploy su Coolify

  1. Crea un nuovo progetto
  2. Add Resource → Docker Image o Git repository
  3. Se usi Git, punta al repo con questo codice
  4. Configura il volume: /data → persistent storage
  5. Carica hotspots.json in /data/
  6. Deploy!

Aggiornare il database

  1. Carica il nuovo hotspots.json via SFTP in /data/
  2. Chiama POST /reload oppure fai redeploy

Documentazione API

Dopo il deploy, visita /docs per la documentazione Swagger interattiva.

Description
Hoovers OCR
Readme 28 KiB
Languages
Python 94.2%
Dockerfile 5.8%