Skip to main content
Pydantic Docs
current

Search documentation

Type to search this documentation.

On this pageOverview

Routing Numbers

The pydantic_extra_types.routing_number module provides the ABARoutingNumber data type.

Bases: str

The ABARoutingNumber data type is a string of 9 digits representing an ABA routing transit number.

The algorithm used to validate the routing number is described in the ABA routing transit number Wikipedia article.

Python
from pydantic import BaseModel

from pydantic_extra_types.routing_number import ABARoutingNumber

class BankAccount(BaseModel):
    routing_number: ABARoutingNumber

account = BankAccount(routing_number='122105155')
print(account)
# > routing_number='122105155'
Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu