laplace-python-sdk 1.5.1__tar.gz → 1.6.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {laplace_python_sdk-1.5.1/src/laplace_python_sdk.egg-info → laplace_python_sdk-1.6.0}/PKG-INFO +1 -1
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.6.0}/pyproject.toml +3 -3
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.6.0}/src/laplace/models.py +159 -3
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.6.0}/src/laplace/screener.py +1 -1
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.6.0/src/laplace_python_sdk.egg-info}/PKG-INFO +1 -1
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.6.0}/LICENSE +0 -0
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.6.0}/MANIFEST.in +0 -0
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.6.0}/README.md +0 -0
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.6.0}/setup.cfg +0 -0
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.6.0}/src/laplace/__init__.py +0 -0
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.6.0}/src/laplace/base.py +0 -0
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.6.0}/src/laplace/brokers.py +0 -0
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.6.0}/src/laplace/capital_increase.py +0 -0
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.6.0}/src/laplace/client.py +0 -0
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.6.0}/src/laplace/collections.py +0 -0
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.6.0}/src/laplace/earnings.py +0 -0
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.6.0}/src/laplace/financials.py +0 -0
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.6.0}/src/laplace/funds.py +0 -0
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.6.0}/src/laplace/live_price.py +0 -0
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.6.0}/src/laplace/news.py +0 -0
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.6.0}/src/laplace/politician.py +0 -0
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.6.0}/src/laplace/search.py +0 -0
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.6.0}/src/laplace/state.py +0 -0
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.6.0}/src/laplace/stocks.py +0 -0
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.6.0}/src/laplace/websocket.py +0 -0
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.6.0}/src/laplace_python_sdk.egg-info/SOURCES.txt +0 -0
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.6.0}/src/laplace_python_sdk.egg-info/dependency_links.txt +0 -0
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.6.0}/src/laplace_python_sdk.egg-info/requires.txt +0 -0
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.6.0}/src/laplace_python_sdk.egg-info/top_level.txt +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "laplace-python-sdk"
|
|
7
|
-
version = "1.
|
|
7
|
+
version = "1.6.0"
|
|
8
8
|
description = "Python SDK for Laplace stock data platform"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.8"
|
|
@@ -64,14 +64,14 @@ profile = "black"
|
|
|
64
64
|
line_length = 100
|
|
65
65
|
|
|
66
66
|
[tool.mypy]
|
|
67
|
-
python_version = "1.
|
|
67
|
+
python_version = "1.6.0"
|
|
68
68
|
strict = true
|
|
69
69
|
warn_return_any = true
|
|
70
70
|
warn_unused_configs = true
|
|
71
71
|
|
|
72
72
|
[tool.ruff]
|
|
73
73
|
line-length = 100
|
|
74
|
-
target-version = "1.
|
|
74
|
+
target-version = "1.6.0"
|
|
75
75
|
|
|
76
76
|
[tool.ruff.lint]
|
|
77
77
|
select = ["E", "W", "F", "I", "N", "B", "UP"]
|
|
@@ -996,16 +996,40 @@ class NewsHighlight(BaseModel):
|
|
|
996
996
|
|
|
997
997
|
model_config = {"populate_by_name": True}
|
|
998
998
|
|
|
999
|
+
class ScreenerLetterGrade(str, Enum):
|
|
1000
|
+
"""Letter grades (A-E) used by the SMR and A/D ratings."""
|
|
1001
|
+
|
|
1002
|
+
A = "A"
|
|
1003
|
+
B = "B"
|
|
1004
|
+
C = "C"
|
|
1005
|
+
D = "D"
|
|
1006
|
+
E = "E"
|
|
1007
|
+
|
|
1008
|
+
|
|
999
1009
|
class ScreenerRangeFilter(BaseModel):
|
|
1000
|
-
"""Min/max numeric range filter for the screener.
|
|
1010
|
+
"""Min/max numeric range filter for the screener.
|
|
1011
|
+
|
|
1012
|
+
Both bounds are optional and inclusive. If both are set, ``min`` must be
|
|
1013
|
+
<= ``max`` (otherwise the API returns 400). Rows whose value is NULL in the
|
|
1014
|
+
filtered column are excluded by any range filter touching it.
|
|
1015
|
+
"""
|
|
1001
1016
|
|
|
1002
1017
|
min: Optional[float] = None
|
|
1003
1018
|
max: Optional[float] = None
|
|
1004
1019
|
|
|
1005
1020
|
|
|
1006
1021
|
class ScreenerFilters(BaseModel):
|
|
1007
|
-
"""Filters accepted by the screener endpoint.
|
|
1022
|
+
"""Filters accepted by the screener endpoint.
|
|
1008
1023
|
|
|
1024
|
+
Three filter types are supported:
|
|
1025
|
+
|
|
1026
|
+
- Range filters: an optional ``{min, max}`` pair per field.
|
|
1027
|
+
- Letter-grade list filters: ``smr_rating`` and ``ad_rating`` accept a list
|
|
1028
|
+
of grades ``A``-``E`` (IN match).
|
|
1029
|
+
- Boolean filter: ``eps_acceleration`` accepts ``True``/``False``.
|
|
1030
|
+
"""
|
|
1031
|
+
|
|
1032
|
+
# Range filters
|
|
1009
1033
|
price: Optional[ScreenerRangeFilter] = None
|
|
1010
1034
|
daily_change: Optional[ScreenerRangeFilter] = Field(default=None, alias="dailyChange")
|
|
1011
1035
|
pe_ratio: Optional[ScreenerRangeFilter] = Field(default=None, alias="peRatio")
|
|
@@ -1018,6 +1042,52 @@ class ScreenerFilters(BaseModel):
|
|
|
1018
1042
|
three_year_return: Optional[ScreenerRangeFilter] = Field(default=None, alias="threeYearReturn")
|
|
1019
1043
|
five_year_return: Optional[ScreenerRangeFilter] = Field(default=None, alias="fiveYearReturn")
|
|
1020
1044
|
ytd_return: Optional[ScreenerRangeFilter] = Field(default=None, alias="ytdReturn")
|
|
1045
|
+
composite_rating: Optional[ScreenerRangeFilter] = Field(default=None, alias="compositeRating")
|
|
1046
|
+
composite_score: Optional[ScreenerRangeFilter] = Field(default=None, alias="compositeScore")
|
|
1047
|
+
rs_rating: Optional[ScreenerRangeFilter] = Field(default=None, alias="rsRating")
|
|
1048
|
+
rs_score: Optional[ScreenerRangeFilter] = Field(default=None, alias="rsScore")
|
|
1049
|
+
perf_q1: Optional[ScreenerRangeFilter] = Field(default=None, alias="perfQ1")
|
|
1050
|
+
perf_q2: Optional[ScreenerRangeFilter] = Field(default=None, alias="perfQ2")
|
|
1051
|
+
perf_q3: Optional[ScreenerRangeFilter] = Field(default=None, alias="perfQ3")
|
|
1052
|
+
perf_q4: Optional[ScreenerRangeFilter] = Field(default=None, alias="perfQ4")
|
|
1053
|
+
eps_rating: Optional[ScreenerRangeFilter] = Field(default=None, alias="epsRating")
|
|
1054
|
+
eps_score: Optional[ScreenerRangeFilter] = Field(default=None, alias="epsScore")
|
|
1055
|
+
eps_growth_yoy: Optional[ScreenerRangeFilter] = Field(default=None, alias="epsGrowthYoy")
|
|
1056
|
+
eps_growth_qoq: Optional[ScreenerRangeFilter] = Field(default=None, alias="epsGrowthQoq")
|
|
1057
|
+
eps_trailing_4q: Optional[ScreenerRangeFilter] = Field(default=None, alias="epsTrailing4q")
|
|
1058
|
+
ad_score: Optional[ScreenerRangeFilter] = Field(default=None, alias="adScore")
|
|
1059
|
+
up_volume_ratio: Optional[ScreenerRangeFilter] = Field(default=None, alias="upVolumeRatio")
|
|
1060
|
+
volume_trend: Optional[ScreenerRangeFilter] = Field(default=None, alias="volumeTrend")
|
|
1061
|
+
smr_score: Optional[ScreenerRangeFilter] = Field(default=None, alias="smrScore")
|
|
1062
|
+
sales_growth_2q: Optional[ScreenerRangeFilter] = Field(default=None, alias="salesGrowth2q")
|
|
1063
|
+
gross_margin: Optional[ScreenerRangeFilter] = Field(default=None, alias="grossMargin")
|
|
1064
|
+
net_margin: Optional[ScreenerRangeFilter] = Field(default=None, alias="netMargin")
|
|
1065
|
+
roe: Optional[ScreenerRangeFilter] = None
|
|
1066
|
+
sma20: Optional[ScreenerRangeFilter] = None
|
|
1067
|
+
sma50: Optional[ScreenerRangeFilter] = None
|
|
1068
|
+
sma150: Optional[ScreenerRangeFilter] = None
|
|
1069
|
+
sma200: Optional[ScreenerRangeFilter] = None
|
|
1070
|
+
volume_sma50: Optional[ScreenerRangeFilter] = Field(default=None, alias="volumeSma50")
|
|
1071
|
+
price_vs_sma20: Optional[ScreenerRangeFilter] = Field(default=None, alias="priceVsSma20")
|
|
1072
|
+
price_vs_sma50: Optional[ScreenerRangeFilter] = Field(default=None, alias="priceVsSma50")
|
|
1073
|
+
price_vs_sma150: Optional[ScreenerRangeFilter] = Field(default=None, alias="priceVsSma150")
|
|
1074
|
+
price_vs_sma200: Optional[ScreenerRangeFilter] = Field(default=None, alias="priceVsSma200")
|
|
1075
|
+
high_52w: Optional[ScreenerRangeFilter] = Field(default=None, alias="high52w")
|
|
1076
|
+
low_52w: Optional[ScreenerRangeFilter] = Field(default=None, alias="low52w")
|
|
1077
|
+
off_high_pct: Optional[ScreenerRangeFilter] = Field(default=None, alias="offHighPct")
|
|
1078
|
+
volume_vs_avg50: Optional[ScreenerRangeFilter] = Field(default=None, alias="volumeVsAvg50")
|
|
1079
|
+
price_change_pct: Optional[ScreenerRangeFilter] = Field(default=None, alias="priceChangePct")
|
|
1080
|
+
price_change_amount: Optional[ScreenerRangeFilter] = Field(
|
|
1081
|
+
default=None, alias="priceChangeAmount"
|
|
1082
|
+
)
|
|
1083
|
+
ytd_change_pct: Optional[ScreenerRangeFilter] = Field(default=None, alias="ytdChangePct")
|
|
1084
|
+
|
|
1085
|
+
# Letter-grade list filters
|
|
1086
|
+
smr_rating: Optional[List[ScreenerLetterGrade]] = Field(default=None, alias="smrRating")
|
|
1087
|
+
ad_rating: Optional[List[ScreenerLetterGrade]] = Field(default=None, alias="adRating")
|
|
1088
|
+
|
|
1089
|
+
# Boolean filter
|
|
1090
|
+
eps_acceleration: Optional[bool] = Field(default=None, alias="epsAcceleration")
|
|
1021
1091
|
|
|
1022
1092
|
model_config = {"populate_by_name": True}
|
|
1023
1093
|
|
|
@@ -1038,10 +1108,56 @@ class ScreenerSortBy(str, Enum):
|
|
|
1038
1108
|
THREE_YEAR_RETURN = "threeYearReturn"
|
|
1039
1109
|
FIVE_YEAR_RETURN = "fiveYearReturn"
|
|
1040
1110
|
YTD_RETURN = "ytdReturn"
|
|
1111
|
+
COMPOSITE_RATING = "compositeRating"
|
|
1112
|
+
COMPOSITE_SCORE = "compositeScore"
|
|
1113
|
+
RS_RATING = "rsRating"
|
|
1114
|
+
RS_SCORE = "rsScore"
|
|
1115
|
+
PERF_Q1 = "perfQ1"
|
|
1116
|
+
PERF_Q2 = "perfQ2"
|
|
1117
|
+
PERF_Q3 = "perfQ3"
|
|
1118
|
+
PERF_Q4 = "perfQ4"
|
|
1119
|
+
EPS_RATING = "epsRating"
|
|
1120
|
+
EPS_SCORE = "epsScore"
|
|
1121
|
+
EPS_GROWTH_YOY = "epsGrowthYoy"
|
|
1122
|
+
EPS_GROWTH_QOQ = "epsGrowthQoq"
|
|
1123
|
+
EPS_TRAILING_4Q = "epsTrailing4q"
|
|
1124
|
+
EPS_ACCELERATION = "epsAcceleration"
|
|
1125
|
+
AD_RATING = "adRating"
|
|
1126
|
+
AD_SCORE = "adScore"
|
|
1127
|
+
UP_VOLUME_RATIO = "upVolumeRatio"
|
|
1128
|
+
VOLUME_TREND = "volumeTrend"
|
|
1129
|
+
SMR_RATING = "smrRating"
|
|
1130
|
+
SMR_SCORE = "smrScore"
|
|
1131
|
+
SALES_GROWTH_2Q = "salesGrowth2q"
|
|
1132
|
+
GROSS_MARGIN = "grossMargin"
|
|
1133
|
+
NET_MARGIN = "netMargin"
|
|
1134
|
+
ROE = "roe"
|
|
1135
|
+
SMA20 = "sma20"
|
|
1136
|
+
SMA50 = "sma50"
|
|
1137
|
+
SMA150 = "sma150"
|
|
1138
|
+
SMA200 = "sma200"
|
|
1139
|
+
VOLUME_SMA50 = "volumeSma50"
|
|
1140
|
+
PRICE_VS_SMA20 = "priceVsSma20"
|
|
1141
|
+
PRICE_VS_SMA50 = "priceVsSma50"
|
|
1142
|
+
PRICE_VS_SMA150 = "priceVsSma150"
|
|
1143
|
+
PRICE_VS_SMA200 = "priceVsSma200"
|
|
1144
|
+
HIGH_52W = "high52w"
|
|
1145
|
+
LOW_52W = "low52w"
|
|
1146
|
+
OFF_HIGH_PCT = "offHighPct"
|
|
1147
|
+
VOLUME_VS_AVG50 = "volumeVsAvg50"
|
|
1148
|
+
PRICE_CHANGE_PCT = "priceChangePct"
|
|
1149
|
+
PRICE_CHANGE_AMOUNT = "priceChangeAmount"
|
|
1150
|
+
YTD_CHANGE_PCT = "ytdChangePct"
|
|
1041
1151
|
|
|
1042
1152
|
|
|
1043
1153
|
class ScreenerStock(BaseModel):
|
|
1044
|
-
"""A single stock entry returned by the screener endpoint.
|
|
1154
|
+
"""A single stock entry returned by the screener endpoint.
|
|
1155
|
+
|
|
1156
|
+
Decimal fields return 0 when there is no data. Rating integers
|
|
1157
|
+
(``composite_rating``, ``rs_rating``, ``eps_rating``), letter grades
|
|
1158
|
+
(``ad_rating``, ``smr_rating``) and ``eps_acceleration`` may be ``None``
|
|
1159
|
+
when absent.
|
|
1160
|
+
"""
|
|
1045
1161
|
|
|
1046
1162
|
symbol: str
|
|
1047
1163
|
price: Optional[float] = None
|
|
@@ -1056,6 +1172,46 @@ class ScreenerStock(BaseModel):
|
|
|
1056
1172
|
three_year_return: Optional[float] = Field(default=None, alias="threeYearReturn")
|
|
1057
1173
|
five_year_return: Optional[float] = Field(default=None, alias="fiveYearReturn")
|
|
1058
1174
|
ytd_return: Optional[float] = Field(default=None, alias="ytdReturn")
|
|
1175
|
+
composite_rating: Optional[int] = Field(default=None, alias="compositeRating")
|
|
1176
|
+
composite_score: Optional[float] = Field(default=None, alias="compositeScore")
|
|
1177
|
+
rs_rating: Optional[int] = Field(default=None, alias="rsRating")
|
|
1178
|
+
rs_score: Optional[float] = Field(default=None, alias="rsScore")
|
|
1179
|
+
perf_q1: Optional[float] = Field(default=None, alias="perfQ1")
|
|
1180
|
+
perf_q2: Optional[float] = Field(default=None, alias="perfQ2")
|
|
1181
|
+
perf_q3: Optional[float] = Field(default=None, alias="perfQ3")
|
|
1182
|
+
perf_q4: Optional[float] = Field(default=None, alias="perfQ4")
|
|
1183
|
+
eps_rating: Optional[int] = Field(default=None, alias="epsRating")
|
|
1184
|
+
eps_score: Optional[float] = Field(default=None, alias="epsScore")
|
|
1185
|
+
eps_growth_yoy: Optional[float] = Field(default=None, alias="epsGrowthYoy")
|
|
1186
|
+
eps_growth_qoq: Optional[float] = Field(default=None, alias="epsGrowthQoq")
|
|
1187
|
+
eps_trailing_4q: Optional[float] = Field(default=None, alias="epsTrailing4q")
|
|
1188
|
+
eps_acceleration: Optional[bool] = Field(default=None, alias="epsAcceleration")
|
|
1189
|
+
ad_rating: Optional[str] = Field(default=None, alias="adRating")
|
|
1190
|
+
ad_score: Optional[float] = Field(default=None, alias="adScore")
|
|
1191
|
+
up_volume_ratio: Optional[float] = Field(default=None, alias="upVolumeRatio")
|
|
1192
|
+
volume_trend: Optional[float] = Field(default=None, alias="volumeTrend")
|
|
1193
|
+
smr_rating: Optional[str] = Field(default=None, alias="smrRating")
|
|
1194
|
+
smr_score: Optional[float] = Field(default=None, alias="smrScore")
|
|
1195
|
+
sales_growth_2q: Optional[float] = Field(default=None, alias="salesGrowth2q")
|
|
1196
|
+
gross_margin: Optional[float] = Field(default=None, alias="grossMargin")
|
|
1197
|
+
net_margin: Optional[float] = Field(default=None, alias="netMargin")
|
|
1198
|
+
roe: Optional[float] = None
|
|
1199
|
+
sma20: Optional[float] = None
|
|
1200
|
+
sma50: Optional[float] = None
|
|
1201
|
+
sma150: Optional[float] = None
|
|
1202
|
+
sma200: Optional[float] = None
|
|
1203
|
+
volume_sma50: Optional[float] = Field(default=None, alias="volumeSma50")
|
|
1204
|
+
price_vs_sma20: Optional[float] = Field(default=None, alias="priceVsSma20")
|
|
1205
|
+
price_vs_sma50: Optional[float] = Field(default=None, alias="priceVsSma50")
|
|
1206
|
+
price_vs_sma150: Optional[float] = Field(default=None, alias="priceVsSma150")
|
|
1207
|
+
price_vs_sma200: Optional[float] = Field(default=None, alias="priceVsSma200")
|
|
1208
|
+
high_52w: Optional[float] = Field(default=None, alias="high52w")
|
|
1209
|
+
low_52w: Optional[float] = Field(default=None, alias="low52w")
|
|
1210
|
+
off_high_pct: Optional[float] = Field(default=None, alias="offHighPct")
|
|
1211
|
+
volume_vs_avg50: Optional[float] = Field(default=None, alias="volumeVsAvg50")
|
|
1212
|
+
price_change_pct: Optional[float] = Field(default=None, alias="priceChangePct")
|
|
1213
|
+
price_change_amount: Optional[float] = Field(default=None, alias="priceChangeAmount")
|
|
1214
|
+
ytd_change_pct: Optional[float] = Field(default=None, alias="ytdChangePct")
|
|
1059
1215
|
|
|
1060
1216
|
model_config = {"populate_by_name": True}
|
|
1061
1217
|
|
|
@@ -48,7 +48,7 @@ class ScreenerClient:
|
|
|
48
48
|
body: dict = {"page": page, "pageSize": page_size}
|
|
49
49
|
|
|
50
50
|
if filters is not None:
|
|
51
|
-
filters_body = filters.model_dump(by_alias=True, exclude_none=True)
|
|
51
|
+
filters_body = filters.model_dump(mode="json", by_alias=True, exclude_none=True)
|
|
52
52
|
if filters_body:
|
|
53
53
|
body["filters"] = filters_body
|
|
54
54
|
if sort_by is not None:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{laplace_python_sdk-1.5.1 → laplace_python_sdk-1.6.0}/src/laplace_python_sdk.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{laplace_python_sdk-1.5.1 → laplace_python_sdk-1.6.0}/src/laplace_python_sdk.egg-info/requires.txt
RENAMED
|
File without changes
|
{laplace_python_sdk-1.5.1 → laplace_python_sdk-1.6.0}/src/laplace_python_sdk.egg-info/top_level.txt
RENAMED
|
File without changes
|