service_result
service_result
Service result wrapper for operation outcomes.
Classes
ServiceResult
Bases: BaseModel, Generic[T]
A uniform result object for all service runners.
- success=False means a breaking error: data will be None
- success=True but non-empty errors means warnings only
- data can be any type
Functions
ok
classmethod
Use when your runner fetched data; pass warnings in errors if any.
Source code in src/pyetm/services/service_result.py
fail
classmethod
Use when a critical error happened and you cannot proceed.