Tags
Here's my thought on π Network Types - Pydantic
pydantic has a nice built in email validator EmailStr
It requires an optional pydantic dependency
pip install email-validator
Then you can validate email addresses.
from pydantic import BaseModel, EmailStr
class Model(BaseModel):
email: EmailStr
print(Model(email='[email protected]'))
#> email='[email protected]'
!!! note This post is a thought. It's a short note that I make about someone else's content online. Learn more about the process [[ thoughts ]]
{.text-opacity-80} This post was a thought by Waylon Walker see all my thoughts at https://waylonwalker.com/thoughts