akshare-one 0.2.3__tar.gz → 0.3.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.
Files changed (50) hide show
  1. {akshare_one-0.2.3 → akshare_one-0.3.0}/LICENSE +21 -21
  2. {akshare_one-0.2.3 → akshare_one-0.3.0}/PKG-INFO +70 -66
  3. {akshare_one-0.2.3 → akshare_one-0.3.0}/README.md +53 -51
  4. {akshare_one-0.2.3 → akshare_one-0.3.0}/akshare_one/__init__.py +31 -31
  5. {akshare_one-0.2.3 → akshare_one-0.3.0}/akshare_one/financial.py +46 -46
  6. akshare_one-0.3.0/akshare_one/indicators.py +395 -0
  7. {akshare_one-0.2.3 → akshare_one-0.3.0}/akshare_one/insider.py +33 -33
  8. {akshare_one-0.2.3 → akshare_one-0.3.0}/akshare_one/modules/cache.py +9 -9
  9. {akshare_one-0.2.3 → akshare_one-0.3.0}/akshare_one/modules/eastmoney/client.py +88 -88
  10. {akshare_one-0.2.3 → akshare_one-0.3.0}/akshare_one/modules/eastmoney/utils.py +104 -104
  11. {akshare_one-0.2.3 → akshare_one-0.3.0}/akshare_one/modules/financial/base.py +22 -22
  12. {akshare_one-0.2.3 → akshare_one-0.3.0}/akshare_one/modules/financial/factory.py +44 -44
  13. {akshare_one-0.2.3 → akshare_one-0.3.0}/akshare_one/modules/financial/sina.py +273 -273
  14. {akshare_one-0.2.3 → akshare_one-0.3.0}/akshare_one/modules/historical/base.py +47 -39
  15. {akshare_one-0.2.3 → akshare_one-0.3.0}/akshare_one/modules/historical/eastmoney.py +241 -241
  16. {akshare_one-0.2.3 → akshare_one-0.3.0}/akshare_one/modules/historical/eastmoney_direct.py +79 -79
  17. {akshare_one-0.2.3 → akshare_one-0.3.0}/akshare_one/modules/historical/factory.py +48 -48
  18. {akshare_one-0.2.3 → akshare_one-0.3.0}/akshare_one/modules/historical/sina.py +218 -218
  19. akshare_one-0.3.0/akshare_one/modules/indicators/__init__.py +0 -0
  20. akshare_one-0.3.0/akshare_one/modules/indicators/base.py +158 -0
  21. akshare_one-0.3.0/akshare_one/modules/indicators/factory.py +33 -0
  22. akshare_one-0.3.0/akshare_one/modules/indicators/simple.py +230 -0
  23. akshare_one-0.3.0/akshare_one/modules/indicators/talib.py +263 -0
  24. {akshare_one-0.2.3 → akshare_one-0.3.0}/akshare_one/modules/insider/base.py +28 -28
  25. {akshare_one-0.2.3 → akshare_one-0.3.0}/akshare_one/modules/insider/factory.py +44 -44
  26. {akshare_one-0.2.3 → akshare_one-0.3.0}/akshare_one/modules/insider/xueqiu.py +115 -115
  27. {akshare_one-0.2.3 → akshare_one-0.3.0}/akshare_one/modules/news/base.py +22 -22
  28. {akshare_one-0.2.3 → akshare_one-0.3.0}/akshare_one/modules/news/eastmoney.py +47 -47
  29. {akshare_one-0.2.3 → akshare_one-0.3.0}/akshare_one/modules/news/factory.py +44 -44
  30. {akshare_one-0.2.3 → akshare_one-0.3.0}/akshare_one/modules/realtime/base.py +27 -27
  31. {akshare_one-0.2.3 → akshare_one-0.3.0}/akshare_one/modules/realtime/eastmoney.py +57 -57
  32. {akshare_one-0.2.3 → akshare_one-0.3.0}/akshare_one/modules/realtime/eastmoney_direct.py +37 -37
  33. {akshare_one-0.2.3 → akshare_one-0.3.0}/akshare_one/modules/realtime/factory.py +48 -48
  34. {akshare_one-0.2.3 → akshare_one-0.3.0}/akshare_one/modules/realtime/xueqiu.py +60 -60
  35. {akshare_one-0.2.3 → akshare_one-0.3.0}/akshare_one/modules/utils.py +10 -10
  36. {akshare_one-0.2.3 → akshare_one-0.3.0}/akshare_one/news.py +27 -27
  37. {akshare_one-0.2.3 → akshare_one-0.3.0}/akshare_one/stock.py +78 -78
  38. {akshare_one-0.2.3 → akshare_one-0.3.0}/akshare_one.egg-info/PKG-INFO +70 -66
  39. {akshare_one-0.2.3 → akshare_one-0.3.0}/akshare_one.egg-info/SOURCES.txt +7 -0
  40. akshare_one-0.3.0/akshare_one.egg-info/requires.txt +5 -0
  41. {akshare_one-0.2.3 → akshare_one-0.3.0}/pyproject.toml +35 -30
  42. {akshare_one-0.2.3 → akshare_one-0.3.0}/setup.cfg +4 -4
  43. {akshare_one-0.2.3 → akshare_one-0.3.0}/tests/test_financial.py +73 -64
  44. akshare_one-0.3.0/tests/test_indicators.py +331 -0
  45. {akshare_one-0.2.3 → akshare_one-0.3.0}/tests/test_insider.py +66 -47
  46. {akshare_one-0.2.3 → akshare_one-0.3.0}/tests/test_news.py +74 -50
  47. {akshare_one-0.2.3 → akshare_one-0.3.0}/tests/test_stock.py +167 -133
  48. akshare_one-0.2.3/akshare_one.egg-info/requires.txt +0 -2
  49. {akshare_one-0.2.3 → akshare_one-0.3.0}/akshare_one.egg-info/dependency_links.txt +0 -0
  50. {akshare_one-0.2.3 → akshare_one-0.3.0}/akshare_one.egg-info/top_level.txt +0 -0
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 zwldarren
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2025 zwldarren
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1,66 +1,70 @@
1
- Metadata-Version: 2.4
2
- Name: akshare-one
3
- Version: 0.2.3
4
- Summary: Standardized interface for Chinese financial market data, built on AKShare with unified data formats and simplified APIs
5
- License-Expression: MIT
6
- Project-URL: Homepage, https://github.com/zwldarren/akshare-one
7
- Project-URL: Repository, https://github.com/zwldarren/akshare-one.git
8
- Keywords: akshare,financial-data,stock-data,quant
9
- Requires-Python: >=3.12
10
- Description-Content-Type: text/markdown
11
- License-File: LICENSE
12
- Requires-Dist: akshare>=1.17.5
13
- Requires-Dist: cachetools>=6.1.0
14
- Dynamic: license-file
15
-
16
- <div align="center">
17
- <h1>AKShare One</h1>
18
- <div>
19
- <a href="README_zh.md">中文</a> | <strong>English</strong>
20
- </div>
21
- </div>
22
-
23
- **AKShare One** is a data interface for obtaining Chinese A-shares, based on [AKShare](https://github.com/akfamily/akshare). It aims to simplify AKShare's usage and unify input/output formats from different data sources, making it easier to pass data to LLM.
24
-
25
- ## Features
26
-
27
- - 📊 Unified stock code formats across data sources
28
- - 🏗️ Standardized return data structures
29
- - 🛠️ Simplified API parameter design
30
- - ⏱️ Automatic timestamp and adjustment handling
31
-
32
- ## 🚀 Core Features
33
-
34
- | Function | Interface |
35
- |------|------|
36
- | Historical data | `get_hist_data` |
37
- | Real-time quotes | `get_realtime_data` |
38
- | Stock news | `get_news_data` |
39
- | Financial data | `get_balance_sheet`/`get_income_statement`/`get_cash_flow` |
40
- | Internal transactions | `get_inner_trade_data` |
41
-
42
- ## 📦 Quick Installation
43
-
44
- ```bash
45
- pip install akshare-one
46
- ```
47
-
48
- ## 💻 Usage Example
49
-
50
- ```python
51
- from akshare_one import get_hist_data, get_realtime_data
52
-
53
- # Get historical data
54
- df_hist = get_hist_data(
55
- symbol="600000",
56
- interval="day",
57
- adjust="hfq"
58
- )
59
-
60
- # Get real-time data
61
- df_realtime = get_realtime_data(symbol="600000")
62
- ```
63
-
64
- ## 📚 Documentation
65
-
66
- Detailed API reference: [docs/api.md](docs/api.md)
1
+ Metadata-Version: 2.4
2
+ Name: akshare-one
3
+ Version: 0.3.0
4
+ Summary: Standardized interface for Chinese financial market data, built on AKShare with unified data formats and simplified APIs
5
+ License-Expression: MIT
6
+ Project-URL: Homepage, https://github.com/zwldarren/akshare-one
7
+ Project-URL: Repository, https://github.com/zwldarren/akshare-one.git
8
+ Keywords: akshare,financial-data,stock-data,quant
9
+ Requires-Python: >=3.12
10
+ Description-Content-Type: text/markdown
11
+ License-File: LICENSE
12
+ Requires-Dist: akshare>=1.17.8
13
+ Requires-Dist: cachetools>=6.1.0
14
+ Provides-Extra: talib
15
+ Requires-Dist: ta-lib>=0.6.4; extra == "talib"
16
+ Dynamic: license-file
17
+
18
+ <div align="center">
19
+ <h1>AKShare One</h1>
20
+ <div>
21
+ <a href="README_zh.md">中文</a> | <strong>English</strong>
22
+ </div>
23
+ </div>
24
+
25
+ **AKShare One** is a data interface for obtaining Chinese A-shares, based on [AKShare](https://github.com/akfamily/akshare). It aims to simplify AKShare's usage and unify input/output formats from different data sources, making it easier to pass data to LLM.
26
+
27
+ ## Features
28
+
29
+ - 📊 Unified stock code formats across data sources
30
+ - 🏗️ Standardized return data structures
31
+ - 🛠️ Simplified API parameter design
32
+ - ⏱️ Automatic timestamp and adjustment handling
33
+
34
+ ## 🚀 Core Features
35
+
36
+ | Function | Interface |
37
+ |------|------|
38
+ | Historical data | `get_hist_data` |
39
+ | Real-time quotes | `get_realtime_data` |
40
+ | Stock news | `get_news_data` |
41
+ | Financial data | `get_balance_sheet`/`get_income_statement`/`get_cash_flow` |
42
+ | Internal transactions | `get_inner_trade_data` |
43
+ | Technical indicators | See [indicators.py](akshare_one/indicators.py) |
44
+
45
+ ## 📦 Quick Installation
46
+
47
+ ```bash
48
+ pip install akshare-one
49
+ ```
50
+
51
+ ## 💻 Usage Example
52
+
53
+ ```python
54
+ from akshare_one import get_hist_data
55
+ from akshare_one.indicators import get_sma
56
+
57
+ # Get historical data
58
+ df = get_hist_data(
59
+ symbol="600000",
60
+ interval="day",
61
+ adjust="hfq"
62
+ )
63
+
64
+ # Calculate 20-day Simple Moving Average
65
+ df_sma = get_sma(df, window=20)
66
+ ```
67
+
68
+ ## 📚 Documentation
69
+
70
+ Detailed API reference: [docs/api.md](docs/api.md)
@@ -1,51 +1,53 @@
1
- <div align="center">
2
- <h1>AKShare One</h1>
3
- <div>
4
- <a href="README_zh.md">中文</a> | <strong>English</strong>
5
- </div>
6
- </div>
7
-
8
- **AKShare One** is a data interface for obtaining Chinese A-shares, based on [AKShare](https://github.com/akfamily/akshare). It aims to simplify AKShare's usage and unify input/output formats from different data sources, making it easier to pass data to LLM.
9
-
10
- ## ✨ Features
11
-
12
- - 📊 Unified stock code formats across data sources
13
- - 🏗️ Standardized return data structures
14
- - 🛠️ Simplified API parameter design
15
- - ⏱️ Automatic timestamp and adjustment handling
16
-
17
- ## 🚀 Core Features
18
-
19
- | Function | Interface |
20
- |------|------|
21
- | Historical data | `get_hist_data` |
22
- | Real-time quotes | `get_realtime_data` |
23
- | Stock news | `get_news_data` |
24
- | Financial data | `get_balance_sheet`/`get_income_statement`/`get_cash_flow` |
25
- | Internal transactions | `get_inner_trade_data` |
26
-
27
- ## 📦 Quick Installation
28
-
29
- ```bash
30
- pip install akshare-one
31
- ```
32
-
33
- ## 💻 Usage Example
34
-
35
- ```python
36
- from akshare_one import get_hist_data, get_realtime_data
37
-
38
- # Get historical data
39
- df_hist = get_hist_data(
40
- symbol="600000",
41
- interval="day",
42
- adjust="hfq"
43
- )
44
-
45
- # Get real-time data
46
- df_realtime = get_realtime_data(symbol="600000")
47
- ```
48
-
49
- ## 📚 Documentation
50
-
51
- Detailed API reference: [docs/api.md](docs/api.md)
1
+ <div align="center">
2
+ <h1>AKShare One</h1>
3
+ <div>
4
+ <a href="README_zh.md">中文</a> | <strong>English</strong>
5
+ </div>
6
+ </div>
7
+
8
+ **AKShare One** is a data interface for obtaining Chinese A-shares, based on [AKShare](https://github.com/akfamily/akshare). It aims to simplify AKShare's usage and unify input/output formats from different data sources, making it easier to pass data to LLM.
9
+
10
+ ## ✨ Features
11
+
12
+ - 📊 Unified stock code formats across data sources
13
+ - 🏗️ Standardized return data structures
14
+ - 🛠️ Simplified API parameter design
15
+ - ⏱️ Automatic timestamp and adjustment handling
16
+
17
+ ## 🚀 Core Features
18
+
19
+ | Function | Interface |
20
+ |------|------|
21
+ | Historical data | `get_hist_data` |
22
+ | Real-time quotes | `get_realtime_data` |
23
+ | Stock news | `get_news_data` |
24
+ | Financial data | `get_balance_sheet`/`get_income_statement`/`get_cash_flow` |
25
+ | Internal transactions | `get_inner_trade_data` |
26
+ | Technical indicators | See [indicators.py](akshare_one/indicators.py) |
27
+
28
+ ## 📦 Quick Installation
29
+
30
+ ```bash
31
+ pip install akshare-one
32
+ ```
33
+
34
+ ## 💻 Usage Example
35
+
36
+ ```python
37
+ from akshare_one import get_hist_data
38
+ from akshare_one.indicators import get_sma
39
+
40
+ # Get historical data
41
+ df = get_hist_data(
42
+ symbol="600000",
43
+ interval="day",
44
+ adjust="hfq"
45
+ )
46
+
47
+ # Calculate 20-day Simple Moving Average
48
+ df_sma = get_sma(df, window=20)
49
+ ```
50
+
51
+ ## 📚 Documentation
52
+
53
+ Detailed API reference: [docs/api.md](docs/api.md)
@@ -1,31 +1,31 @@
1
- """Akshare One - Unified interface for Chinese market data
2
-
3
- Provides standardized access to various financial data sources with:
4
- - Consistent symbol formats
5
- - Unified data schemas
6
- - Cleaned and normalized outputs
7
-
8
- Example:
9
- >>> from akshare_one import get_hist_data, get_realtime_data
10
- >>> # 获取股票历史数据
11
- >>> df = get_hist_data("600000", interval="day")
12
- >>> print(df.head())
13
- >>> # 获取股票实时数据
14
- >>> df = get_realtime_data(symbol="600000")
15
- """
16
-
17
- from .stock import get_hist_data, get_realtime_data
18
- from .news import get_news_data
19
- from .insider import get_inner_trade_data
20
- from .financial import get_balance_sheet, get_income_statement, get_cash_flow
21
-
22
-
23
- __all__ = [
24
- "get_hist_data",
25
- "get_realtime_data",
26
- "get_news_data",
27
- "get_inner_trade_data",
28
- "get_balance_sheet",
29
- "get_income_statement",
30
- "get_cash_flow",
31
- ]
1
+ """Akshare One - Unified interface for Chinese market data
2
+
3
+ Provides standardized access to various financial data sources with:
4
+ - Consistent symbol formats
5
+ - Unified data schemas
6
+ - Cleaned and normalized outputs
7
+
8
+ Example:
9
+ >>> from akshare_one import get_hist_data, get_realtime_data
10
+ >>> # 获取股票历史数据
11
+ >>> df = get_hist_data("600000", interval="day")
12
+ >>> print(df.head())
13
+ >>> # 获取股票实时数据
14
+ >>> df = get_realtime_data(symbol="600000")
15
+ """
16
+
17
+ from .stock import get_hist_data, get_realtime_data
18
+ from .news import get_news_data
19
+ from .insider import get_inner_trade_data
20
+ from .financial import get_balance_sheet, get_income_statement, get_cash_flow
21
+
22
+
23
+ __all__ = [
24
+ "get_hist_data",
25
+ "get_realtime_data",
26
+ "get_news_data",
27
+ "get_inner_trade_data",
28
+ "get_balance_sheet",
29
+ "get_income_statement",
30
+ "get_cash_flow",
31
+ ]
@@ -1,46 +1,46 @@
1
- """财务报表数据模块
2
-
3
- 包含资产负债表、利润表和现金流量表相关功能
4
- """
5
-
6
- import pandas as pd
7
- from akshare_one.modules.financial.factory import FinancialDataFactory
8
-
9
-
10
- def get_balance_sheet(symbol: str, source: str = "sina") -> "pd.DataFrame":
11
- """获取资产负债表数据
12
-
13
- Args:
14
- symbol: 股票代码 (如 "600600")
15
- source: 数据源 ("sina")
16
- """
17
- if source == "sina":
18
- provider = FinancialDataFactory.get_provider(source, symbol=symbol)
19
- return provider.get_balance_sheet()
20
- raise ValueError(f"Unsupported data source: {source}")
21
-
22
-
23
- def get_income_statement(symbol: str, source: str = "sina") -> "pd.DataFrame":
24
- """获取利润表数据
25
-
26
- Args:
27
- symbol: 股票代码 (如 "600600")
28
- source: 数据源 ("sina")
29
- """
30
- if source == "sina":
31
- provider = FinancialDataFactory.get_provider(source, symbol=symbol)
32
- return provider.get_income_statement()
33
- raise ValueError(f"Unsupported data source: {source}")
34
-
35
-
36
- def get_cash_flow(symbol: str, source: str = "sina") -> "pd.DataFrame":
37
- """获取现金流量表数据
38
-
39
- Args:
40
- symbol: 股票代码 (如 "600600")
41
- source: 数据源 ("sina")
42
- """
43
- if source == "sina":
44
- provider = FinancialDataFactory.get_provider(source, symbol=symbol)
45
- return provider.get_cash_flow()
46
- raise ValueError(f"Unsupported data source: {source}")
1
+ """财务报表数据模块
2
+
3
+ 包含资产负债表、利润表和现金流量表相关功能
4
+ """
5
+
6
+ import pandas as pd
7
+ from akshare_one.modules.financial.factory import FinancialDataFactory
8
+
9
+
10
+ def get_balance_sheet(symbol: str, source: str = "sina") -> "pd.DataFrame":
11
+ """获取资产负债表数据
12
+
13
+ Args:
14
+ symbol: 股票代码 (如 "600600")
15
+ source: 数据源 ("sina")
16
+ """
17
+ if source == "sina":
18
+ provider = FinancialDataFactory.get_provider(source, symbol=symbol)
19
+ return provider.get_balance_sheet()
20
+ raise ValueError(f"Unsupported data source: {source}")
21
+
22
+
23
+ def get_income_statement(symbol: str, source: str = "sina") -> "pd.DataFrame":
24
+ """获取利润表数据
25
+
26
+ Args:
27
+ symbol: 股票代码 (如 "600600")
28
+ source: 数据源 ("sina")
29
+ """
30
+ if source == "sina":
31
+ provider = FinancialDataFactory.get_provider(source, symbol=symbol)
32
+ return provider.get_income_statement()
33
+ raise ValueError(f"Unsupported data source: {source}")
34
+
35
+
36
+ def get_cash_flow(symbol: str, source: str = "sina") -> "pd.DataFrame":
37
+ """获取现金流量表数据
38
+
39
+ Args:
40
+ symbol: 股票代码 (如 "600600")
41
+ source: 数据源 ("sina")
42
+ """
43
+ if source == "sina":
44
+ provider = FinancialDataFactory.get_provider(source, symbol=symbol)
45
+ return provider.get_cash_flow()
46
+ raise ValueError(f"Unsupported data source: {source}")