Skip to content
masterclass Buddy

Pydantic · Type Alias

PostgresDsn

PostgresDsn validates PostgreSQL connection strings. It requires user information and a host, does not require a top-level domain, and supports multiple hosts.

Last updated

Syntax

class Model(BaseModel):
    database: PostgresDsn

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

Subscribe
  • AnyUrl
  • HttpUrl
  • MySQLDsn
  • MariaDBDsn
  • CockroachDsn
  • AmqpDsn
  • RedisDsn
  • MongoDsn

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