Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

UKRDC-FastAPI

Pydantic and Type Hints

  • Our data goes through 2 “conversions”:

    • SQLAlchemy ORM turns database rows into Python objects

    • Pydantic (via FastAPI response_model) turns Python objects into JSON

UKRDC-Nuxt

TypeScript

  • Initially it often just looks like a source of frustration, but it does a tonne of good for catching errors early on

  • Interfaces are roughly equivalent to Pydantic models. They give the expected fields and types for objects (JS dictionaries)

...