FastAPI Complete Course - CRUD App - BaseModel Class

Поделиться
HTML-код
  • Опубликовано: 28 фев 2023
  • The primary means of defining objects in pydantic is via models (models are simply classes which inherit from BaseModel).
    You can think of models as similar to types in strictly typed languages, or as the requirements of a single endpoint in an API.
    Untrusted data can be passed to a model, and after parsing and validation pydantic guarantees that the fields of the resultant model instance will conform to the field types defined on the model.
    docs.pydantic.dev/usage/models/

Комментарии • 1

  • @krishnayadav-rb2ei
    @krishnayadav-rb2ei Год назад

    Excellent tutorial. Explained the basic concepts very nicely