laplace-python-sdk 1.5.1__tar.gz → 1.7.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.7.0}/PKG-INFO +1 -1
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.7.0}/pyproject.toml +3 -3
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.7.0}/src/laplace/models.py +161 -3
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.7.0}/src/laplace/screener.py +1 -1
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.7.0/src/laplace_python_sdk.egg-info}/PKG-INFO +1 -1
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.7.0}/LICENSE +0 -0
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.7.0}/MANIFEST.in +0 -0
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.7.0}/README.md +0 -0
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.7.0}/setup.cfg +0 -0
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.7.0}/src/laplace/__init__.py +0 -0
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.7.0}/src/laplace/base.py +0 -0
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.7.0}/src/laplace/brokers.py +0 -0
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.7.0}/src/laplace/capital_increase.py +0 -0
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.7.0}/src/laplace/client.py +0 -0
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.7.0}/src/laplace/collections.py +0 -0
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.7.0}/src/laplace/earnings.py +0 -0
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.7.0}/src/laplace/financials.py +0 -0
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.7.0}/src/laplace/funds.py +0 -0
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.7.0}/src/laplace/live_price.py +0 -0
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.7.0}/src/laplace/news.py +0 -0
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.7.0}/src/laplace/politician.py +0 -0
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.7.0}/src/laplace/search.py +0 -0
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.7.0}/src/laplace/state.py +0 -0
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.7.0}/src/laplace/stocks.py +0 -0
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.7.0}/src/laplace/websocket.py +0 -0
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.7.0}/src/laplace_python_sdk.egg-info/SOURCES.txt +0 -0
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.7.0}/src/laplace_python_sdk.egg-info/dependency_links.txt +0 -0
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.7.0}/src/laplace_python_sdk.egg-info/requires.txt +0 -0
- {laplace_python_sdk-1.5.1 → laplace_python_sdk-1.7.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.7.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.7.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.7.0"
|
|
75
75
|
|
|
76
76
|
[tool.ruff.lint]
|
|
77
77
|
select = ["E", "W", "F", "I", "N", "B", "UP"]
|
|
@@ -682,6 +682,7 @@ class BrokerStats(BaseModel):
|
|
|
682
682
|
net_amount: float = Field(alias="netAmount")
|
|
683
683
|
total_buy_volume: float = Field(alias="totalBuyVolume")
|
|
684
684
|
total_sell_volume: float = Field(alias="totalSellVolume")
|
|
685
|
+
net_volume: Optional[float] = Field(alias="netVolume", default=None)
|
|
685
686
|
total_volume: float = Field(alias="totalVolume")
|
|
686
687
|
total_amount: float = Field(alias="totalAmount")
|
|
687
688
|
average_cost: Optional[float] = Field(alias="averageCost", default=None)
|
|
@@ -715,6 +716,7 @@ class BrokerSort(str, Enum):
|
|
|
715
716
|
TOTAL_BUY_VOLUME = "totalBuyVolume"
|
|
716
717
|
TOTAL_SELL_AMOUNT = "totalSellAmount"
|
|
717
718
|
TOTAL_SELL_VOLUME = "totalSellVolume"
|
|
719
|
+
NET_VOLUME = "netVolume"
|
|
718
720
|
|
|
719
721
|
|
|
720
722
|
class SortDirection(str, Enum):
|
|
@@ -996,16 +998,40 @@ class NewsHighlight(BaseModel):
|
|
|
996
998
|
|
|
997
999
|
model_config = {"populate_by_name": True}
|
|
998
1000
|
|
|
1001
|
+
class ScreenerLetterGrade(str, Enum):
|
|
1002
|
+
"""Letter grades (A-E) used by the SMR and A/D ratings."""
|
|
1003
|
+
|
|
1004
|
+
A = "A"
|
|
1005
|
+
B = "B"
|
|
1006
|
+
C = "C"
|
|
1007
|
+
D = "D"
|
|
1008
|
+
E = "E"
|
|
1009
|
+
|
|
1010
|
+
|
|
999
1011
|
class ScreenerRangeFilter(BaseModel):
|
|
1000
|
-
"""Min/max numeric range filter for the screener.
|
|
1012
|
+
"""Min/max numeric range filter for the screener.
|
|
1013
|
+
|
|
1014
|
+
Both bounds are optional and inclusive. If both are set, ``min`` must be
|
|
1015
|
+
<= ``max`` (otherwise the API returns 400). Rows whose value is NULL in the
|
|
1016
|
+
filtered column are excluded by any range filter touching it.
|
|
1017
|
+
"""
|
|
1001
1018
|
|
|
1002
1019
|
min: Optional[float] = None
|
|
1003
1020
|
max: Optional[float] = None
|
|
1004
1021
|
|
|
1005
1022
|
|
|
1006
1023
|
class ScreenerFilters(BaseModel):
|
|
1007
|
-
"""Filters accepted by the screener endpoint.
|
|
1024
|
+
"""Filters accepted by the screener endpoint.
|
|
1008
1025
|
|
|
1026
|
+
Three filter types are supported:
|
|
1027
|
+
|
|
1028
|
+
- Range filters: an optional ``{min, max}`` pair per field.
|
|
1029
|
+
- Letter-grade list filters: ``smr_rating`` and ``ad_rating`` accept a list
|
|
1030
|
+
of grades ``A``-``E`` (IN match).
|
|
1031
|
+
- Boolean filter: ``eps_acceleration`` accepts ``True``/``False``.
|
|
1032
|
+
"""
|
|
1033
|
+
|
|
1034
|
+
# Range filters
|
|
1009
1035
|
price: Optional[ScreenerRangeFilter] = None
|
|
1010
1036
|
daily_change: Optional[ScreenerRangeFilter] = Field(default=None, alias="dailyChange")
|
|
1011
1037
|
pe_ratio: Optional[ScreenerRangeFilter] = Field(default=None, alias="peRatio")
|
|
@@ -1018,6 +1044,52 @@ class ScreenerFilters(BaseModel):
|
|
|
1018
1044
|
three_year_return: Optional[ScreenerRangeFilter] = Field(default=None, alias="threeYearReturn")
|
|
1019
1045
|
five_year_return: Optional[ScreenerRangeFilter] = Field(default=None, alias="fiveYearReturn")
|
|
1020
1046
|
ytd_return: Optional[ScreenerRangeFilter] = Field(default=None, alias="ytdReturn")
|
|
1047
|
+
composite_rating: Optional[ScreenerRangeFilter] = Field(default=None, alias="compositeRating")
|
|
1048
|
+
composite_score: Optional[ScreenerRangeFilter] = Field(default=None, alias="compositeScore")
|
|
1049
|
+
rs_rating: Optional[ScreenerRangeFilter] = Field(default=None, alias="rsRating")
|
|
1050
|
+
rs_score: Optional[ScreenerRangeFilter] = Field(default=None, alias="rsScore")
|
|
1051
|
+
perf_q1: Optional[ScreenerRangeFilter] = Field(default=None, alias="perfQ1")
|
|
1052
|
+
perf_q2: Optional[ScreenerRangeFilter] = Field(default=None, alias="perfQ2")
|
|
1053
|
+
perf_q3: Optional[ScreenerRangeFilter] = Field(default=None, alias="perfQ3")
|
|
1054
|
+
perf_q4: Optional[ScreenerRangeFilter] = Field(default=None, alias="perfQ4")
|
|
1055
|
+
eps_rating: Optional[ScreenerRangeFilter] = Field(default=None, alias="epsRating")
|
|
1056
|
+
eps_score: Optional[ScreenerRangeFilter] = Field(default=None, alias="epsScore")
|
|
1057
|
+
eps_growth_yoy: Optional[ScreenerRangeFilter] = Field(default=None, alias="epsGrowthYoy")
|
|
1058
|
+
eps_growth_qoq: Optional[ScreenerRangeFilter] = Field(default=None, alias="epsGrowthQoq")
|
|
1059
|
+
eps_trailing_4q: Optional[ScreenerRangeFilter] = Field(default=None, alias="epsTrailing4q")
|
|
1060
|
+
ad_score: Optional[ScreenerRangeFilter] = Field(default=None, alias="adScore")
|
|
1061
|
+
up_volume_ratio: Optional[ScreenerRangeFilter] = Field(default=None, alias="upVolumeRatio")
|
|
1062
|
+
volume_trend: Optional[ScreenerRangeFilter] = Field(default=None, alias="volumeTrend")
|
|
1063
|
+
smr_score: Optional[ScreenerRangeFilter] = Field(default=None, alias="smrScore")
|
|
1064
|
+
sales_growth_2q: Optional[ScreenerRangeFilter] = Field(default=None, alias="salesGrowth2q")
|
|
1065
|
+
gross_margin: Optional[ScreenerRangeFilter] = Field(default=None, alias="grossMargin")
|
|
1066
|
+
net_margin: Optional[ScreenerRangeFilter] = Field(default=None, alias="netMargin")
|
|
1067
|
+
roe: Optional[ScreenerRangeFilter] = None
|
|
1068
|
+
sma20: Optional[ScreenerRangeFilter] = None
|
|
1069
|
+
sma50: Optional[ScreenerRangeFilter] = None
|
|
1070
|
+
sma150: Optional[ScreenerRangeFilter] = None
|
|
1071
|
+
sma200: Optional[ScreenerRangeFilter] = None
|
|
1072
|
+
volume_sma50: Optional[ScreenerRangeFilter] = Field(default=None, alias="volumeSma50")
|
|
1073
|
+
price_vs_sma20: Optional[ScreenerRangeFilter] = Field(default=None, alias="priceVsSma20")
|
|
1074
|
+
price_vs_sma50: Optional[ScreenerRangeFilter] = Field(default=None, alias="priceVsSma50")
|
|
1075
|
+
price_vs_sma150: Optional[ScreenerRangeFilter] = Field(default=None, alias="priceVsSma150")
|
|
1076
|
+
price_vs_sma200: Optional[ScreenerRangeFilter] = Field(default=None, alias="priceVsSma200")
|
|
1077
|
+
high_52w: Optional[ScreenerRangeFilter] = Field(default=None, alias="high52w")
|
|
1078
|
+
low_52w: Optional[ScreenerRangeFilter] = Field(default=None, alias="low52w")
|
|
1079
|
+
off_high_pct: Optional[ScreenerRangeFilter] = Field(default=None, alias="offHighPct")
|
|
1080
|
+
volume_vs_avg50: Optional[ScreenerRangeFilter] = Field(default=None, alias="volumeVsAvg50")
|
|
1081
|
+
price_change_pct: Optional[ScreenerRangeFilter] = Field(default=None, alias="priceChangePct")
|
|
1082
|
+
price_change_amount: Optional[ScreenerRangeFilter] = Field(
|
|
1083
|
+
default=None, alias="priceChangeAmount"
|
|
1084
|
+
)
|
|
1085
|
+
ytd_change_pct: Optional[ScreenerRangeFilter] = Field(default=None, alias="ytdChangePct")
|
|
1086
|
+
|
|
1087
|
+
# Letter-grade list filters
|
|
1088
|
+
smr_rating: Optional[List[ScreenerLetterGrade]] = Field(default=None, alias="smrRating")
|
|
1089
|
+
ad_rating: Optional[List[ScreenerLetterGrade]] = Field(default=None, alias="adRating")
|
|
1090
|
+
|
|
1091
|
+
# Boolean filter
|
|
1092
|
+
eps_acceleration: Optional[bool] = Field(default=None, alias="epsAcceleration")
|
|
1021
1093
|
|
|
1022
1094
|
model_config = {"populate_by_name": True}
|
|
1023
1095
|
|
|
@@ -1038,10 +1110,56 @@ class ScreenerSortBy(str, Enum):
|
|
|
1038
1110
|
THREE_YEAR_RETURN = "threeYearReturn"
|
|
1039
1111
|
FIVE_YEAR_RETURN = "fiveYearReturn"
|
|
1040
1112
|
YTD_RETURN = "ytdReturn"
|
|
1113
|
+
COMPOSITE_RATING = "compositeRating"
|
|
1114
|
+
COMPOSITE_SCORE = "compositeScore"
|
|
1115
|
+
RS_RATING = "rsRating"
|
|
1116
|
+
RS_SCORE = "rsScore"
|
|
1117
|
+
PERF_Q1 = "perfQ1"
|
|
1118
|
+
PERF_Q2 = "perfQ2"
|
|
1119
|
+
PERF_Q3 = "perfQ3"
|
|
1120
|
+
PERF_Q4 = "perfQ4"
|
|
1121
|
+
EPS_RATING = "epsRating"
|
|
1122
|
+
EPS_SCORE = "epsScore"
|
|
1123
|
+
EPS_GROWTH_YOY = "epsGrowthYoy"
|
|
1124
|
+
EPS_GROWTH_QOQ = "epsGrowthQoq"
|
|
1125
|
+
EPS_TRAILING_4Q = "epsTrailing4q"
|
|
1126
|
+
EPS_ACCELERATION = "epsAcceleration"
|
|
1127
|
+
AD_RATING = "adRating"
|
|
1128
|
+
AD_SCORE = "adScore"
|
|
1129
|
+
UP_VOLUME_RATIO = "upVolumeRatio"
|
|
1130
|
+
VOLUME_TREND = "volumeTrend"
|
|
1131
|
+
SMR_RATING = "smrRating"
|
|
1132
|
+
SMR_SCORE = "smrScore"
|
|
1133
|
+
SALES_GROWTH_2Q = "salesGrowth2q"
|
|
1134
|
+
GROSS_MARGIN = "grossMargin"
|
|
1135
|
+
NET_MARGIN = "netMargin"
|
|
1136
|
+
ROE = "roe"
|
|
1137
|
+
SMA20 = "sma20"
|
|
1138
|
+
SMA50 = "sma50"
|
|
1139
|
+
SMA150 = "sma150"
|
|
1140
|
+
SMA200 = "sma200"
|
|
1141
|
+
VOLUME_SMA50 = "volumeSma50"
|
|
1142
|
+
PRICE_VS_SMA20 = "priceVsSma20"
|
|
1143
|
+
PRICE_VS_SMA50 = "priceVsSma50"
|
|
1144
|
+
PRICE_VS_SMA150 = "priceVsSma150"
|
|
1145
|
+
PRICE_VS_SMA200 = "priceVsSma200"
|
|
1146
|
+
HIGH_52W = "high52w"
|
|
1147
|
+
LOW_52W = "low52w"
|
|
1148
|
+
OFF_HIGH_PCT = "offHighPct"
|
|
1149
|
+
VOLUME_VS_AVG50 = "volumeVsAvg50"
|
|
1150
|
+
PRICE_CHANGE_PCT = "priceChangePct"
|
|
1151
|
+
PRICE_CHANGE_AMOUNT = "priceChangeAmount"
|
|
1152
|
+
YTD_CHANGE_PCT = "ytdChangePct"
|
|
1041
1153
|
|
|
1042
1154
|
|
|
1043
1155
|
class ScreenerStock(BaseModel):
|
|
1044
|
-
"""A single stock entry returned by the screener endpoint.
|
|
1156
|
+
"""A single stock entry returned by the screener endpoint.
|
|
1157
|
+
|
|
1158
|
+
Decimal fields return 0 when there is no data. Rating integers
|
|
1159
|
+
(``composite_rating``, ``rs_rating``, ``eps_rating``), letter grades
|
|
1160
|
+
(``ad_rating``, ``smr_rating``) and ``eps_acceleration`` may be ``None``
|
|
1161
|
+
when absent.
|
|
1162
|
+
"""
|
|
1045
1163
|
|
|
1046
1164
|
symbol: str
|
|
1047
1165
|
price: Optional[float] = None
|
|
@@ -1056,6 +1174,46 @@ class ScreenerStock(BaseModel):
|
|
|
1056
1174
|
three_year_return: Optional[float] = Field(default=None, alias="threeYearReturn")
|
|
1057
1175
|
five_year_return: Optional[float] = Field(default=None, alias="fiveYearReturn")
|
|
1058
1176
|
ytd_return: Optional[float] = Field(default=None, alias="ytdReturn")
|
|
1177
|
+
composite_rating: Optional[int] = Field(default=None, alias="compositeRating")
|
|
1178
|
+
composite_score: Optional[float] = Field(default=None, alias="compositeScore")
|
|
1179
|
+
rs_rating: Optional[int] = Field(default=None, alias="rsRating")
|
|
1180
|
+
rs_score: Optional[float] = Field(default=None, alias="rsScore")
|
|
1181
|
+
perf_q1: Optional[float] = Field(default=None, alias="perfQ1")
|
|
1182
|
+
perf_q2: Optional[float] = Field(default=None, alias="perfQ2")
|
|
1183
|
+
perf_q3: Optional[float] = Field(default=None, alias="perfQ3")
|
|
1184
|
+
perf_q4: Optional[float] = Field(default=None, alias="perfQ4")
|
|
1185
|
+
eps_rating: Optional[int] = Field(default=None, alias="epsRating")
|
|
1186
|
+
eps_score: Optional[float] = Field(default=None, alias="epsScore")
|
|
1187
|
+
eps_growth_yoy: Optional[float] = Field(default=None, alias="epsGrowthYoy")
|
|
1188
|
+
eps_growth_qoq: Optional[float] = Field(default=None, alias="epsGrowthQoq")
|
|
1189
|
+
eps_trailing_4q: Optional[float] = Field(default=None, alias="epsTrailing4q")
|
|
1190
|
+
eps_acceleration: Optional[bool] = Field(default=None, alias="epsAcceleration")
|
|
1191
|
+
ad_rating: Optional[str] = Field(default=None, alias="adRating")
|
|
1192
|
+
ad_score: Optional[float] = Field(default=None, alias="adScore")
|
|
1193
|
+
up_volume_ratio: Optional[float] = Field(default=None, alias="upVolumeRatio")
|
|
1194
|
+
volume_trend: Optional[float] = Field(default=None, alias="volumeTrend")
|
|
1195
|
+
smr_rating: Optional[str] = Field(default=None, alias="smrRating")
|
|
1196
|
+
smr_score: Optional[float] = Field(default=None, alias="smrScore")
|
|
1197
|
+
sales_growth_2q: Optional[float] = Field(default=None, alias="salesGrowth2q")
|
|
1198
|
+
gross_margin: Optional[float] = Field(default=None, alias="grossMargin")
|
|
1199
|
+
net_margin: Optional[float] = Field(default=None, alias="netMargin")
|
|
1200
|
+
roe: Optional[float] = None
|
|
1201
|
+
sma20: Optional[float] = None
|
|
1202
|
+
sma50: Optional[float] = None
|
|
1203
|
+
sma150: Optional[float] = None
|
|
1204
|
+
sma200: Optional[float] = None
|
|
1205
|
+
volume_sma50: Optional[float] = Field(default=None, alias="volumeSma50")
|
|
1206
|
+
price_vs_sma20: Optional[float] = Field(default=None, alias="priceVsSma20")
|
|
1207
|
+
price_vs_sma50: Optional[float] = Field(default=None, alias="priceVsSma50")
|
|
1208
|
+
price_vs_sma150: Optional[float] = Field(default=None, alias="priceVsSma150")
|
|
1209
|
+
price_vs_sma200: Optional[float] = Field(default=None, alias="priceVsSma200")
|
|
1210
|
+
high_52w: Optional[float] = Field(default=None, alias="high52w")
|
|
1211
|
+
low_52w: Optional[float] = Field(default=None, alias="low52w")
|
|
1212
|
+
off_high_pct: Optional[float] = Field(default=None, alias="offHighPct")
|
|
1213
|
+
volume_vs_avg50: Optional[float] = Field(default=None, alias="volumeVsAvg50")
|
|
1214
|
+
price_change_pct: Optional[float] = Field(default=None, alias="priceChangePct")
|
|
1215
|
+
price_change_amount: Optional[float] = Field(default=None, alias="priceChangeAmount")
|
|
1216
|
+
ytd_change_pct: Optional[float] = Field(default=None, alias="ytdChangePct")
|
|
1059
1217
|
|
|
1060
1218
|
model_config = {"populate_by_name": True}
|
|
1061
1219
|
|
|
@@ -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.7.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.7.0}/src/laplace_python_sdk.egg-info/requires.txt
RENAMED
|
File without changes
|
{laplace_python_sdk-1.5.1 → laplace_python_sdk-1.7.0}/src/laplace_python_sdk.egg-info/top_level.txt
RENAMED
|
File without changes
|