Skip to content
masterclass Buddy

Pydantic · Type Alias

AnyUrl

Pydantic URL types validate and parse URLs, HTTP URLs, WebSocket URLs, file URLs, and database connection strings. Choose a specialized type when the scheme, host, credentials, or length must follow a rule.

Last updated

Syntax

class Model(BaseModel):
    url: HttpUrl

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • AnyUrl
  • AnyHttpUrl
  • HttpUrl
  • FileUrl
  • AnyWebsocketUrl
  • WebsocketUrl
  • PostgresDsn
  • MySQLDsn

Source: Network Types | Pydantic Docs. Checked 2026-11-03.