forked from bitvavo/python-bitvavo-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodel_preferences.py
More file actions
51 lines (34 loc) · 1.11 KB
/
model_preferences.py
File metadata and controls
51 lines (34 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
"""Model preference enum for API endpoints."""
from __future__ import annotations
import sys
from enum import Enum
if sys.version_info >= (3, 11):
from enum import StrEnum
else:
class StrEnum(str, Enum):
"""Compatibility StrEnum for Python < 3.11."""
class ModelPreference(StrEnum):
"""Enumeration of available model preferences for API responses.
This enum allows users to specify their preferred response format across
all API methods without having to pass model parameters to each call.
"""
# Return raw Python data structures (dict/list)
RAW = "raw"
# Return Polars DataFrame
POLARS = "polars"
# Return Pandas DataFrame
PANDAS = "pandas"
# Return PyArrow Table
PYARROW = "pyarrow"
# Return Dask DataFrame
DASK = "dask"
# Return Modin DataFrame
MODIN = "modin"
# Return CuDF DataFrame (GPU accelerated)
CUDF = "cudf"
# Return Ibis DataFrame
IBIS = "ibis"
# Return appropriate Pydantic model for each endpoint
PYDANTIC = "pydantic"
# Let each method use its own default (legacy behavior)
AUTO = "auto"