nexla_sdk.models.base
Classes
BaseModel
Defined in nexla_sdk/models/base.py:8
Base model class with Pydantic functionality and Nexla API compatibility.
Features:
- Automatically ignores unknown fields from API responses
- Supports both camelCase and snake_case field names
- Handles datetime parsing automatically
- Provides JSON serialization methods
- Validates data types automatically
- Easy logging and printing support
Methods:
to_dict(self, exclude_none: bool = True) -> Dict[str, Any]- Source:
nexla_sdk/models/base.py:40 - Convert model to dictionary.
- Source:
to_json(self, exclude_none: bool = True, indent: int = 2) -> str- Source:
nexla_sdk/models/base.py:52 - Convert model to JSON string.
- Source: