Tags
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
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]'
This post was a thought by Waylon Walker see all my thoughts at https://waylonwalker.com/thoughts