domain.entities.provider¶
src.domain.entities.provider
¶
Provider domain entity.
Represents a financial data provider (Schwab, Chase, Fidelity, etc.) that users can connect to for data aggregation.
This is a relatively static entity - providers are typically seeded at deployment and rarely change. It serves as a registry of supported providers with their configuration metadata.
Reference
- docs/architecture/provider-domain-model.md
Classes¶
Provider
dataclass
¶
Financial data provider entity.
Represents a supported provider in the system. Providers are typically seeded at deployment (e.g., Schwab) and can be enabled/disabled.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
UUID
|
Unique provider identifier. |
slug |
str
|
URL-safe identifier (e.g., "schwab", "chase"). Unique. |
name |
str
|
Human-readable name (e.g., "Charles Schwab"). |
category |
ProviderCategory
|
Type of provider (brokerage, bank, credit_card, etc.). |
credential_type |
CredentialType
|
Default authentication mechanism for this provider. |
description |
str | None
|
Optional description for UI display. |
logo_url |
str | None
|
Optional URL to provider logo for UI. |
website_url |
str | None
|
Optional provider website URL. |
is_active |
bool
|
Whether provider is available for new connections. |
created_at |
datetime
|
When provider was added to registry. |
updated_at |
datetime
|
When provider was last modified. |
Example
provider = Provider( ... id=uuid7(), ... slug="schwab", ... name="Charles Schwab", ... category=ProviderCategory.BROKERAGE, ... credential_type=CredentialType.OAUTH2, ... is_active=True, ... ) provider.slug 'schwab'
Source code in src/domain/entities/provider.py
Functions¶
__post_init__
¶
Validate provider after initialization.
Raises:
| Type | Description |
|---|---|
ValueError
|
If required fields are invalid. |
Source code in src/domain/entities/provider.py
__repr__
¶
Return repr for debugging.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
String representation. |
__str__
¶
Return string representation.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Human-readable string. |