Types¶
secret_type.typing.types
¶
This module contains helper types that are used by the rest of the library.
StringLike = Union[str, bytes]
module-attribute
¶
A type that can be treated as a string.
Secret[StringLike] support all str operations.
IntLike = Union[int, Integral, float, Rational]
module-attribute
¶
A numeric type that supports integer operations.
Secret[IntLike] support all int operations.
NumberLike = Union[complex, Number]
module-attribute
¶
A numeric type that does not support integer operations.
Secret[NumberLike] support only a limited set of numeric operations.
BoolLike = TypeVar('BoolLike', bound=bool)
module-attribute
¶
A boolean type.
ProtectedValue = Union[StringLike, IntLike, NumberLike, bool]
module-attribute
¶
A type that can be wrapped in a Secret.
T = TypeVar('T', bound=ProtectedValue)
module-attribute
¶
T2 = TypeVar('T2', bound=ProtectedValue)
module-attribute
¶
Another ProtectedValue.
S = TypeVar('S', bound=StringLike)
module-attribute
¶
A StringLike.