← All projects
Back end
Python API
FastAPI service exposing the topology computations, containerised with Docker.
Done
Sprint S6-S7 · 8 points
In short, no jargon for non-developersRead the summaryClose
- What it is
- An online service to which other programs send a 3D object, and which sends back its measurements.
- What it is for
- To plug the portfolio's computations into other software, with nothing to install on their side.
- What it shows
- Putting a program into service on a server, in Python, safely and reproducibly.
How the pieces fit together
- HTTP client (raw file body) → API (FastAPI, uvicorn): POST /v1/mesh/…
- API (FastAPI, uvicorn) → lib-c (shared library): statistics
- API (FastAPI, uvicorn) → Topology (C API, under a lock): invariants
- API (FastAPI, uvicorn) → Classifier (ONNX Runtime, no PyTorch): shape class
Tech stack
Who does what
- Python
- Calls lib-c and the topology library, built as shared libraries, through ctypes: the same code as the site's demos.
- FastAPI
- The HTTP routes (statistics, topology, classification), request validation and the OpenAPI documentation on /docs.
- pytest
- Tests of every route and every error (unreadable file, too large), on Linux, Windows and macOS.
- Docker
- Runs the API next to the site with docker compose, the C and C++ libraries built in the image.
Definition of Done
- Code reviewed, diff by diff
- Unit and integration tests green
- Green CI on Linux, Windows and macOS when compiled
- README, REVIEW.md and DECISIONS.md up to date
- Texts in French and English
- Demo deployed and tested on mobile