Schemas¶
Pandera DataFrameModel schemas for pyth-pandas DataFrame-returning endpoints.
- Convention:
Every public method that returns a
pd.DataFrameMUST have a correspondingDataFrameModelschema defined here and annotated asDataFrame[SomeSchema]in its return type. Integration tests validate live API responses against these schemas.
All schemas use strict=False (extra columns allowed) and coerce=True
to avoid breaking when the upstream API adds new fields.
Column names reflect the post-preprocessing camelCase convention.
- class pyth_pandas.schemas.ParsedFeedSchema(*args, **kwargs)[source]¶
Bases:
_LenientSchema for one row of a parsed Pyth Pro feed update.
- Source:
POST /v1/latest_price,POST /v1/price,POST /v1/reduce_price— specifically theparsed.priceFeeds[]array of each response.
Columns are post-preprocessing camelCase names. All numeric fields are raw mantissas — multiply by
10 ** exponentto get the human value.- Return type:
DataFrameBase[Self]