laplace-python-sdk 1.8.0__py3-none-any.whl → 2.0.0__py3-none-any.whl
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/live_price.py +4 -3
- laplace/models.py +7 -0
- {laplace_python_sdk-1.8.0.dist-info → laplace_python_sdk-2.0.0.dist-info}/METADATA +3 -1
- {laplace_python_sdk-1.8.0.dist-info → laplace_python_sdk-2.0.0.dist-info}/RECORD +7 -7
- {laplace_python_sdk-1.8.0.dist-info → laplace_python_sdk-2.0.0.dist-info}/WHEEL +0 -0
- {laplace_python_sdk-1.8.0.dist-info → laplace_python_sdk-2.0.0.dist-info}/licenses/LICENSE +0 -0
- {laplace_python_sdk-1.8.0.dist-info → laplace_python_sdk-2.0.0.dist-info}/top_level.txt +0 -0
laplace/live_price.py
CHANGED
|
@@ -17,6 +17,7 @@ from laplace.models import (
|
|
|
17
17
|
USStockLiveData,
|
|
18
18
|
BISTBidAskData,
|
|
19
19
|
WebsocketMonthlyUsageDataResponse,
|
|
20
|
+
WebsocketUrlResponse,
|
|
20
21
|
)
|
|
21
22
|
from laplace.base import BaseClient
|
|
22
23
|
BidAskData = BISTBidAskData
|
|
@@ -403,11 +404,11 @@ class LivePriceClient:
|
|
|
403
404
|
self,
|
|
404
405
|
feeds: List[LivePriceFeed],
|
|
405
406
|
external_user_id: str
|
|
406
|
-
) ->
|
|
407
|
+
) -> WebsocketUrlResponse:
|
|
407
408
|
"""Get WebSocket URL from the API.
|
|
408
409
|
|
|
409
410
|
Returns:
|
|
410
|
-
WebSocket URL
|
|
411
|
+
WebsocketUrlResponse with the WebSocket URL and when it expires
|
|
411
412
|
"""
|
|
412
413
|
|
|
413
414
|
feed_values = [feed.value for feed in feeds]
|
|
@@ -420,7 +421,7 @@ class LivePriceClient:
|
|
|
420
421
|
},
|
|
421
422
|
)
|
|
422
423
|
|
|
423
|
-
return response
|
|
424
|
+
return WebsocketUrlResponse(**response)
|
|
424
425
|
|
|
425
426
|
def get_websocket_usage_for_month(
|
|
426
427
|
self,
|
laplace/models.py
CHANGED
|
@@ -1363,6 +1363,13 @@ class ScreenerStock(BaseModel):
|
|
|
1363
1363
|
model_config = {"populate_by_name": True}
|
|
1364
1364
|
|
|
1365
1365
|
|
|
1366
|
+
class WebsocketUrlResponse(BaseModel):
|
|
1367
|
+
url: str
|
|
1368
|
+
expires_at: datetime = Field(alias="expiresAt")
|
|
1369
|
+
|
|
1370
|
+
model_config = {"populate_by_name": True}
|
|
1371
|
+
|
|
1372
|
+
|
|
1366
1373
|
class WebsocketMonthlyUsageDataResponse(BaseModel):
|
|
1367
1374
|
external_user_id: str = Field(alias="externalUserID")
|
|
1368
1375
|
first_connection_time: datetime = Field(alias="firstConnectionTime")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: laplace-python-sdk
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2.0.0
|
|
4
4
|
Summary: Python SDK for Laplace stock data platform
|
|
5
5
|
Author: Laplace SDK Team
|
|
6
6
|
License: MIT
|
|
@@ -60,6 +60,8 @@ The official Python SDK for the Laplace stock data platform. Get easy access to
|
|
|
60
60
|
pip install laplace-python-sdk
|
|
61
61
|
```
|
|
62
62
|
|
|
63
|
+
> **Upgrading from v1?** v2 changes `client.live_price.get_websocket_url` to return a `WebsocketUrlResponse` (with `url` and `expires_at`) instead of a string. Where you used the result as the URL, use `.url` instead, e.g. `websockets.connect(resp.url)`. The link stops working at `expires_at`; request a new one before then.
|
|
64
|
+
|
|
63
65
|
## Quick Start
|
|
64
66
|
|
|
65
67
|
```python
|
|
@@ -7,8 +7,8 @@ laplace/collections.py,sha256=jhIVxTbn9j1Dpi3OCp3S5vG29xYB6aw2BNoI4v0-b7M,10256
|
|
|
7
7
|
laplace/earnings.py,sha256=y1fVgfJUXGl3vOSF9g6ryuoYYygXuxcsfk4VO2SVRjE,2114
|
|
8
8
|
laplace/financials.py,sha256=QJPlOzd5dhhOC2bdtbGmPfnsHx9bCf9nCM34bVtzYag,3132
|
|
9
9
|
laplace/funds.py,sha256=o-lmCtXX60ehaoYOuCRayU7P1n9D6oHaZR6N3OXq5kU,3200
|
|
10
|
-
laplace/live_price.py,sha256=
|
|
11
|
-
laplace/models.py,sha256=
|
|
10
|
+
laplace/live_price.py,sha256=3pbRCVgXaDL8vMIeouRNtcnfObOlN-HaHAtuxgpUWgc,16470
|
|
11
|
+
laplace/models.py,sha256=7cd9rxGvVey404u55IvNxV2K-33XSuuSNacLQg50Iqo,44745
|
|
12
12
|
laplace/news.py,sha256=OClfiVqXKhR1qg8gnX2yJK0ab_lJUb3omQR7ioPGJw0,31267
|
|
13
13
|
laplace/politician.py,sha256=Llez12RDJZWC8AOwRn4vupT7NZ6mZNk_b6JcNSMJGyA,1778
|
|
14
14
|
laplace/screener.py,sha256=p4hz8bs0WqTpV1Y4dELTPw-kXjF9R5fecYQIN3pToRw,1994
|
|
@@ -16,8 +16,8 @@ laplace/search.py,sha256=JYsb8Nr5F-UMS53MGaMHL3d6VxJ7M8V3xHnFK22ORMg,1518
|
|
|
16
16
|
laplace/state.py,sha256=P2Ky0fToDc_VauBFD7bw91dywVkY3TaIN3mhf0Ms5sg,3417
|
|
17
17
|
laplace/stocks.py,sha256=ou4k_Kv9n_Nm_9hayYvLxHub1cX0qnjhgJeCM-6epo0,12552
|
|
18
18
|
laplace/websocket.py,sha256=9VNCA38Y_jznSDDajwybSoRtBz1BoANqcFZMZiUBG88,15603
|
|
19
|
-
laplace_python_sdk-
|
|
20
|
-
laplace_python_sdk-
|
|
21
|
-
laplace_python_sdk-
|
|
22
|
-
laplace_python_sdk-
|
|
23
|
-
laplace_python_sdk-
|
|
19
|
+
laplace_python_sdk-2.0.0.dist-info/licenses/LICENSE,sha256=7q_XpeQPP0BLMADuenSz0wqLxttWJtoOei0sYmqly0g,1063
|
|
20
|
+
laplace_python_sdk-2.0.0.dist-info/METADATA,sha256=8CYQxmD5-vA_ms7fz6nWBLz6gbn69ydJN3IjbVfxoVg,12987
|
|
21
|
+
laplace_python_sdk-2.0.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
22
|
+
laplace_python_sdk-2.0.0.dist-info/top_level.txt,sha256=miT6qTaH7MSLy2iNStZCy478rCt72Hij9KP1bRBTGPA,8
|
|
23
|
+
laplace_python_sdk-2.0.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|