types.strings¶
Char = t.Annotated[str, Len(1)]
module-attribute
¶
String than can only be length 1
Email = t.Annotated[str, Matches(email_regex, message='is not a valid email address')]
module-attribute
¶
String type with email validation
Password
¶
Bases: UserString
For Secret Strings.
When prompted for input, the user's input will not be echoed to the screen.
Additionally, the string will be obscured when printed. For example:
from typing import Annotated
import arc
from arc.types import Password
@arc.command
def command(password: Password):
print(password) # This would be obscured
print(password.data) # This would be the actual password