AuthorsTwitter@__Attsun__Published onMonday, September 6, 2021 Aboutpydantic 単体でも利用可能な便利な機能についてご紹介します。 pydantic とは公式ドキュメント の冒頭には以下のような記載があります。 Data validation and settings management using python type annotations. python の型アノテーションを使った、データバリデーションと設定管理のライブラリ、ですね。 基本的な使い方このあとの話を理解するのに必要な、基本となる機能をさらっと紹介します。 モデルの定義pydantic では、クラスを使ってモデルを定義します。 各フィールドには型が必要です。 from datetime import datetime from typing i