rquote 0.5.0__tar.gz → 0.5.1__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.
Files changed (49) hide show
  1. {rquote-0.5.0 → rquote-0.5.1}/PKG-INFO +2 -2
  2. {rquote-0.5.0 → rquote-0.5.1}/README.md +1 -1
  3. {rquote-0.5.0 → rquote-0.5.1}/pyproject.toml +1 -1
  4. {rquote-0.5.0 → rquote-0.5.1}/rquote/api/price.py +4 -16
  5. {rquote-0.5.0 → rquote-0.5.1}/rquote.egg-info/PKG-INFO +2 -2
  6. {rquote-0.5.0 → rquote-0.5.1}/rquote/__init__.py +0 -0
  7. {rquote-0.5.0 → rquote-0.5.1}/rquote/api/__init__.py +0 -0
  8. {rquote-0.5.0 → rquote-0.5.1}/rquote/api/lists.py +0 -0
  9. {rquote-0.5.0 → rquote-0.5.1}/rquote/api/stock_info.py +0 -0
  10. {rquote-0.5.0 → rquote-0.5.1}/rquote/api/tick.py +0 -0
  11. {rquote-0.5.0 → rquote-0.5.1}/rquote/cache/__init__.py +0 -0
  12. {rquote-0.5.0 → rquote-0.5.1}/rquote/cache/base.py +0 -0
  13. {rquote-0.5.0 → rquote-0.5.1}/rquote/cache/memory.py +0 -0
  14. {rquote-0.5.0 → rquote-0.5.1}/rquote/cache/persistent.py +0 -0
  15. {rquote-0.5.0 → rquote-0.5.1}/rquote/config.py +0 -0
  16. {rquote-0.5.0 → rquote-0.5.1}/rquote/data_sources/__init__.py +0 -0
  17. {rquote-0.5.0 → rquote-0.5.1}/rquote/data_sources/base.py +0 -0
  18. {rquote-0.5.0 → rquote-0.5.1}/rquote/data_sources/sina.py +0 -0
  19. {rquote-0.5.0 → rquote-0.5.1}/rquote/data_sources/tencent.py +0 -0
  20. {rquote-0.5.0 → rquote-0.5.1}/rquote/exceptions.py +0 -0
  21. {rquote-0.5.0 → rquote-0.5.1}/rquote/factors/__init__.py +0 -0
  22. {rquote-0.5.0 → rquote-0.5.1}/rquote/factors/technical.py +0 -0
  23. {rquote-0.5.0 → rquote-0.5.1}/rquote/markets/__init__.py +0 -0
  24. {rquote-0.5.0 → rquote-0.5.1}/rquote/markets/base.py +0 -0
  25. {rquote-0.5.0 → rquote-0.5.1}/rquote/markets/cn_stock.py +0 -0
  26. {rquote-0.5.0 → rquote-0.5.1}/rquote/markets/factory.py +0 -0
  27. {rquote-0.5.0 → rquote-0.5.1}/rquote/markets/future.py +0 -0
  28. {rquote-0.5.0 → rquote-0.5.1}/rquote/markets/hk_stock.py +0 -0
  29. {rquote-0.5.0 → rquote-0.5.1}/rquote/markets/us_stock.py +0 -0
  30. {rquote-0.5.0 → rquote-0.5.1}/rquote/parsers/__init__.py +0 -0
  31. {rquote-0.5.0 → rquote-0.5.1}/rquote/parsers/kline.py +0 -0
  32. {rquote-0.5.0 → rquote-0.5.1}/rquote/plots.py +0 -0
  33. {rquote-0.5.0 → rquote-0.5.1}/rquote/utils/__init__.py +0 -0
  34. {rquote-0.5.0 → rquote-0.5.1}/rquote/utils/date.py +0 -0
  35. {rquote-0.5.0 → rquote-0.5.1}/rquote/utils/helpers.py +0 -0
  36. {rquote-0.5.0 → rquote-0.5.1}/rquote/utils/http.py +0 -0
  37. {rquote-0.5.0 → rquote-0.5.1}/rquote/utils/logging.py +0 -0
  38. {rquote-0.5.0 → rquote-0.5.1}/rquote/utils/web.py +0 -0
  39. {rquote-0.5.0 → rquote-0.5.1}/rquote/utils.py +0 -0
  40. {rquote-0.5.0 → rquote-0.5.1}/rquote.egg-info/SOURCES.txt +0 -0
  41. {rquote-0.5.0 → rquote-0.5.1}/rquote.egg-info/dependency_links.txt +0 -0
  42. {rquote-0.5.0 → rquote-0.5.1}/rquote.egg-info/requires.txt +0 -0
  43. {rquote-0.5.0 → rquote-0.5.1}/rquote.egg-info/top_level.txt +0 -0
  44. {rquote-0.5.0 → rquote-0.5.1}/setup.cfg +0 -0
  45. {rquote-0.5.0 → rquote-0.5.1}/tests/test_api.py +0 -0
  46. {rquote-0.5.0 → rquote-0.5.1}/tests/test_cache.py +0 -0
  47. {rquote-0.5.0 → rquote-0.5.1}/tests/test_config.py +0 -0
  48. {rquote-0.5.0 → rquote-0.5.1}/tests/test_exceptions.py +0 -0
  49. {rquote-0.5.0 → rquote-0.5.1}/tests/test_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rquote
3
- Version: 0.5.0
3
+ Version: 0.5.1
4
4
  Summary: Mostly day quotes of cn/hk/us/fund/future markets, side with quote list fetch
5
5
  Requires-Python: >=3.9.0
6
6
  Description-Content-Type: text/markdown
@@ -18,7 +18,7 @@ Requires-Dist: duckdb>=0.9.0; extra == "persistent"
18
18
 
19
19
  ## 版本信息
20
20
 
21
- 当前版本:**0.5.0**
21
+ 当前版本:**0.5.1**
22
22
 
23
23
  ## 主要特性
24
24
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  ## 版本信息
6
6
 
7
- 当前版本:**0.5.0**
7
+ 当前版本:**0.5.1**
8
8
 
9
9
  ## 主要特性
10
10
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "rquote"
7
- version = "0.5.0"
7
+ version = "0.5.1"
8
8
  description = "Mostly day quotes of cn/hk/us/fund/future markets, side with quote list fetch"
9
9
  readme = "README.md"
10
10
  # requires-python = ">=3.6.1" # duckdb requires higher python version
@@ -102,24 +102,12 @@ def get_price_longer(i: str, l: int = 2, edate: str = '', freq: str = 'day',
102
102
  """
103
103
  # 首段数据直接复用 get_price,透传 edate/freq/fq 参数
104
104
  _, name, a = get_price(i, edate=edate, freq=freq, fq=fq, dd=dd)
105
- # 使用 DatetimeIndex 的格式化方法(get_price 已统一转换为 DatetimeIndex)
106
- if isinstance(a.index, pd.DatetimeIndex) and len(a.index) > 0:
107
- d1 = a.index[0].strftime('%Y%m%d')
108
- else:
109
- # 降级处理:如果索引不是 DatetimeIndex(理论上不应该发生),尝试格式化
110
- try:
111
- d1 = str(a.index[0])[:8] if len(str(a.index[0])) >= 8 else str(a.index[0])
112
- except Exception:
113
- d1 = a.index.format()[0] if hasattr(a.index, 'format') else str(a.index[0])
114
-
105
+
115
106
  for y in range(1, l):
116
- d0 = str(int(d1[:4]) - 1) + d1[4:]
107
+ d1 = a.index[0].strftime('%Y%m%d')
108
+ b = get_price(i, edate=d1, freq=freq, fq=fq, dd=dd)[2]
117
109
  # 逐年向前补数据,保持与 get_price 相同的 freq/fq 配置
118
- a = pd.concat(
119
- (get_price(i, d0, d1, freq=freq, fq=fq, dd=dd)[2], a),
120
- 0
121
- ).drop_duplicates()
122
- d1 = d0
110
+ a = pd.concat((b, a), axis=0).drop_duplicates()
123
111
  return i, name, a
124
112
 
125
113
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rquote
3
- Version: 0.5.0
3
+ Version: 0.5.1
4
4
  Summary: Mostly day quotes of cn/hk/us/fund/future markets, side with quote list fetch
5
5
  Requires-Python: >=3.9.0
6
6
  Description-Content-Type: text/markdown
@@ -18,7 +18,7 @@ Requires-Dist: duckdb>=0.9.0; extra == "persistent"
18
18
 
19
19
  ## 版本信息
20
20
 
21
- 当前版本:**0.5.0**
21
+ 当前版本:**0.5.1**
22
22
 
23
23
  ## 主要特性
24
24
 
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
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes