pydantic

安装量: 2.2K
排名: #9186

安装

npx skills add https://github.com/pydantic/skills --skill pydantic

Pydantic Validation In a nutshell, Pydantic is dataclasses with runtime validation. It leverages type hints to understand how validation (and serialization) should be performed. It is mostly useful when dealing with external untrusted data, for example when defining an HTTP API. It is generally not recommended to use Pydantic to define classes that are instantiated within the user code. By doing so, you will lose flexibility (e.g. you cannot use types not supported by Pydantic, and it is harder to perform post-init changes). It is usually better to use vanilla classes (or standard library dataclasses) in this case, as a static type checker will already catch type mismatches. Basic usage Here is a simple example of using a Pydantic model: from datetime import date from pydantic import BaseModel , Field Show more Installs 2.3K Repository pydantic/skills GitHub Stars 147 First Seen Jul 21, 2026 Security Audits Gen Agent Trust Hub Pass Socket Pass Snyk Pass

← 返回排行榜