Skip to main content

WebsocketUrl

A type that will accept any ws or wss URL.

Constructor

Signature

def WebsocketUrl() - > null

Methods


_constraints()

def _constraints() - > [UrlConstraints](urlconstraints.md?sid=pydantic_networks_urlconstraints)

Defines the validation rules for WebSocket URLs, enforcing a maximum length of 2083 characters and restricting protocols to 'ws' or 'wss'.

Returns

TypeDescription
[UrlConstraints](urlconstraints.md?sid=pydantic_networks_urlconstraints)A configuration object containing the length and scheme constraints for the URL validator.