Pydantic and pydantic-extra-types
ID pydantic
other
Pydantic is a Python data validation library; its built-in types include email addresses, URLs, IP addresses, UUIDs and payment card numbers. The companion package pydantic-extra-types adds validated types for country, currency and language codes, phone numbers, MAC addresses, coordinates, colors, ISBN, IBAN, ISIN, ULID, semantic versions, ABA routing numbers, MIME types, time zone names and similar values. A model field of such a type validates a value that you supply, it does not scan data. The supported types cover only registry datatypes that match a documented type.
- Website
- https://github.com/pydantic/pydantic-extra-types
- Supported types
- 35
Supported semantic types
| ID | Name | Categories | Countries | Description |
|---|---|---|---|---|
| aba | US ABA routing number draft | finances | global | Datatype for 'US ABA routing number' (aba) from rules in context 'finances'. |
| aws_s3_uri | Amazon S3 URI draft | internet | global | Location of an Amazon S3 bucket, prefix or object written as s3://bucket/key, as the AWS CLI and many tools accept it. The regexp checks... |
| bankcard | Bank card (credit/debit card) PII | pii, finances | global | A bank card is typically a plastic card issued by a bank to its clients that performs one or more of a number of services that relate to... |
| color | Color draft | common | global | Color of a subject, written as a color name or a color code. |
| countrycode_alpha2 | ISO 3166-1 Alpha2 country code pattern | geo | global | ISO 3166-1 alpha-2 codes are two-letter country codes defined in ISO 3166-1, part of the ISO 3166 standard published by the... |
| countrycode_alpha3 | ISO 3166-1 Alpha3 country code pattern | geo | global | ISO 3166-1 alpha-3 codes are three-letter country codes defined in ISO 3166-1, part of the ISO 3166 standard published by the... |
| countrycode_num | ISO 3166-1 Numeric code (country code) pattern | geo | global | ISO 3166-1 numeric (or numeric-3) codes are three-digit country codes defined in ISO 3166-1, part of the ISO 3166 standard published by... |
| cron_expression | Cron schedule expression draft | software, datetime | global | Schedule of a cron job: five fields separated by spaces, giving the minute, the hour, the day of the month, the month and the day of the... |
| Email address PII | common, internet, pii | global | Address of an electronic mailbox in the form local-part@domain, defined in section 3.4.1 of RFC 5322. The local part names the mailbox,... | |
| iban | International Bank Account Number | finances | global | The International Bank Account Number (IBAN) is an internationally agreed system of identifying bank accounts across national borders to... |
| ipaddr | IP address (IPv4 or IPv6) PII | internet, pii | global | Address of a network interface in the Internet Protocol: a 32-bit IPv4 address in dotted-decimal form (192.0.2.1) or a 128-bit IPv6... |
| ipsubnet | IP network prefix (IPv4 or IPv6 subnet) PII | internet | global | Block of IPv4 or IPv6 addresses in CIDR notation: an address, a slash and the length of the prefix in bits, as in 192.0.2.0/24 or... |
| ipv4 | IPv4 address PII | internet, pii | global | 32-bit address of Internet Protocol version 4 (RFC 791), written in dotted-decimal notation as four numbers from 0 to 255, such as... |
| ipv6 | IPv6 address PII | internet, pii | global | 128-bit address of Internet Protocol version 6, written as eight groups of up to four hexadecimal digits separated by colons (RFC 4291,... |
| isbn | International Standard Book Number (ISBN) | publishing, objectids | global | ISO 2108 identifier of a book edition, in either of its two forms: the 10-character ISBN used until 2007, whose last character is a... |
| isin | International Securities Identification Number | finances | global | An International Securities Identification Number (ISIN) uniquely identifies a security. Its structure is defined in ISO 6166. The ISIN... |
| iso15924 | ISO 15924 script code draft | common | global | Four-letter code of a writing system (script) in ISO 15924, written with an initial capital, such as Latn for Latin or Cyrl for... |
| iso4217curcode | ISO 4217 Currency code pattern draft | finances | global | Three-letter alphabetic code of a currency in ISO 4217, as in EUR or USD. The Russian classifier of currencies (OKV, okvalpha) uses the... |
| iso639_1 | ISO 639-1 language code (two letters) pattern draft | common | global | Two-letter code of a language from ISO 639-1, such as en (English), de (German) or ja (Japanese). About 180 languages have such a code.... |
| iso639_3 | ISO 639-3 language code draft | common | global | Three-letter code of an individual language, macrolanguage or special code in ISO 639-3. It extends ISO 639-2 to cover all known living,... |
| latitude | latitude | geo, common | global | In geography, latitude is a geographic coordinate that specifies the north–south position of a point on the Earths surface. Latitude is... |
| longitude | Longitude | geo, common | global | Longitude is a geographic coordinate that specifies the east–west position of a point on the Earths surface, or the surface of a... |
| mac_address | MAC address (Media Access Control) PII | internet, identifiers, pii | global | 48-bit hardware address (EUI-48) of a network interface in Ethernet, Wi-Fi, Bluetooth and other IEEE 802 networks, used to deliver... |
| mimetype | Media type (MIME type) | common, internet | global | Two-part identifier of a data format, type/subtype, such as text/html, image/png or application/vnd.ms-excel, defined by RFC 6838 and... |
| mongodbid | MongoDB unique Object ID | identifiers, common | global | MongoDB ObjectId, the unique id that MongoDB assigns to each document of a collection as the field _id. It is a 12-byte value written as... |
| phone | Phone number PII | pii, common, telecom | global | Telephone number in standard format (RFC3966), without 'tel:' prefix |
| semver | Semantic version (SemVer) | software | global | Version number in the Semantic Versioning 2.0.0 format: MAJOR.MINOR.PATCH, optionally followed by a pre-release part after '-' and build... |
| sha256hash | SHA-256 hash | cryptography, software | global | Digest of the SHA-256 hash function (SHA-2 family, 256 bits), widely used for file checksums, content addressing and digital signatures.... |
| timezone | Time zone | datetime | global | A time zone is an area that observes a uniform standard time for legal, commercial and social purposes |
| ulid | ULID (Universally Unique Lexicographically Sortable Identifier) | identifiers | global | 128-bit identifier from the ULID specification. The first 48 bits are the Unix time in milliseconds and the other 80 bits are random, so... |
| url | Uniform Resource Locator (URL) | common, internet | global | Address of a resource on a network that also says how to retrieve it: a scheme such as https, a host, an optional port, a path, a query... |
| uuid | Universally unique identifier (UUID) | identifiers | global | 128-bit identifier that systems generate without a central registry, defined by RFC 9562 (2024), which replaced RFC 4122. Microsoft... |
| uuid_v1 | Time-based UUID (version 1) draft | identifiers | global | UUID of version 1 under RFC 9562. It holds a 60-bit count of 100-nanosecond intervals since 15 October 1582, a clock sequence and a... |
| uuid_v4 | Random UUID (version 4) draft | identifiers | global | UUID of version 4 under RFC 9562. Apart from the version and variant bits, its 122 bits are random, so it carries no time or host... |
| uuid_v7 | Unix time-ordered UUID (version 7) draft | identifiers | global | UUID of version 7, introduced by RFC 9562 in 2024. The first 48 bits are the Unix time in milliseconds, and the rest, apart from the... |
Use this record
- JSON: API v1 · legacy shape
- Improve it: edit
data/tools/other/pydantic.yamlon GitHub