Unofficial research mirror of the Pydantic documentation (MIT licence) for an academic study. Some details differ from the official documentation, so do not rely on this site for real projects. Official docs: docs.pydantic.dev. About this study.
Skip to content

Script Code

script definitions that are based on the ISO 15924

ISO_15924

Bases: str

ISO_15924 parses script in the ISO 15924 format.

from pydantic import BaseModel

from pydantic_extra_types.language_code import ISO_15924


class Script(BaseModel):
    alpha_4: ISO_15924


script = Script(alpha_4='Java')
print(lang)
# > script='Java'