Pydantic types#

Pydantic is a validation library that provides a rich selection of useful types for command-line inputs.

The following commonly used Pydantic types can be used as type hints for Feud commands.

Important

This page only lists a subset of Pydantic types, i.e. those which would commonly be used as command-line inputs.

All Pydantic types (including those not listed on this page) are compatible with Feud.

Tip

All of the types listed on this page are easily accessible from the feud.typing module.

It is recommended to import the feud.typing module with an alias such as t for convenient short-hand use, e.g.

from feud import typing as t

t.PositiveInt  # pydantic.types.PositiveInt
t.FutureDatetime  # pydantic.types.FutureDatetime
t.conint  # pydantic.types.conint
t.IPvAnyAddress  # pydantic.networks.IPvAnyAddress

The version number indicates the minimum pydantic version required to use the type.

If this version requirement is not met, the type is not imported by Feud.

String types#

Integer types#

Float types#

Sequence types#

Datetime types#

Path types#

Decimal type#

URL types#

Email types#

Important

In order to use email types, you must install Feud with the optional email-validator dependency (see here).

$ pip install feud[email]

Base-64 types#

Byte types#

JSON type#

IP address types#

Database connection types#

UUID types#

Boolean type#

Other types#