moexapi 1.7.5__tar.gz → 1.7.7__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: moexapi
3
- Version: 1.7.5
3
+ Version: 1.7.7
4
4
  Summary: Python API for MOEX ISS
5
5
  Author-email: Aliaksei Rak <kventinel@gmail.com>
6
6
  License: MIT License
@@ -28,7 +28,7 @@ class Amortization:
28
28
  @dataclasses.dataclass
29
29
  class Coupon:
30
30
  date: datetime.date
31
- start_date: datetime.date
31
+ start_date: T.Optional[datetime.date]
32
32
  value: float
33
33
  initialfacevalue: float
34
34
 
@@ -108,7 +108,8 @@ class Bond:
108
108
  self.coupons.append(
109
109
  Coupon(
110
110
  date=date,
111
- start_date=datetime.date.fromisoformat(line["startdate"]),
111
+ start_date=datetime.date.fromisoformat(line["startdate"])
112
+ if line.get("startdate") else None,
112
113
  value=line["value"],
113
114
  initialfacevalue=line["initialfacevalue"],
114
115
  )
@@ -3,6 +3,7 @@ import typing as T
3
3
  import collections
4
4
  import dataclasses
5
5
  import datetime
6
+ import functools
6
7
 
7
8
  from . import exchange
8
9
  from . import markets
@@ -279,6 +280,7 @@ class Ticker:
279
280
  return tickers[0]
280
281
 
281
282
 
283
+ @functools.lru_cache(maxsize=None)
282
284
  def _parse_tickers(market: markets.Market = markets.Markets.ALL) -> list[Listing]:
283
285
  tickers: dict[str, Listing] = {}
284
286
  for child_market in market.childs():
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: moexapi
3
- Version: 1.7.5
3
+ Version: 1.7.7
4
4
  Summary: Python API for MOEX ISS
5
5
  Author-email: Aliaksei Rak <kventinel@gmail.com>
6
6
  License: MIT License
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "moexapi"
7
- version = "1.7.5"
7
+ version = "1.7.7"
8
8
  description = "Python API for MOEX ISS"
9
9
  readme = "README.md"
10
10
  authors = [{ name = "Aliaksei Rak", email = "kventinel@gmail.com" }]
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