akshare-one 0.3.1__py3-none-any.whl → 0.3.2__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.
Files changed (39) hide show
  1. akshare_one/__init__.py +31 -31
  2. akshare_one/financial.py +46 -46
  3. akshare_one/indicators.py +395 -395
  4. akshare_one/insider.py +33 -33
  5. akshare_one/modules/cache.py +9 -9
  6. akshare_one/modules/eastmoney/client.py +88 -88
  7. akshare_one/modules/eastmoney/utils.py +104 -104
  8. akshare_one/modules/financial/base.py +22 -22
  9. akshare_one/modules/financial/factory.py +44 -44
  10. akshare_one/modules/financial/sina.py +273 -273
  11. akshare_one/modules/historical/base.py +47 -47
  12. akshare_one/modules/historical/eastmoney.py +241 -241
  13. akshare_one/modules/historical/eastmoney_direct.py +79 -79
  14. akshare_one/modules/historical/factory.py +48 -48
  15. akshare_one/modules/historical/sina.py +254 -254
  16. akshare_one/modules/indicators/base.py +158 -158
  17. akshare_one/modules/indicators/factory.py +33 -33
  18. akshare_one/modules/indicators/simple.py +230 -230
  19. akshare_one/modules/indicators/talib.py +263 -263
  20. akshare_one/modules/insider/base.py +28 -28
  21. akshare_one/modules/insider/factory.py +44 -44
  22. akshare_one/modules/insider/xueqiu.py +115 -115
  23. akshare_one/modules/news/base.py +22 -22
  24. akshare_one/modules/news/eastmoney.py +47 -47
  25. akshare_one/modules/news/factory.py +44 -44
  26. akshare_one/modules/realtime/base.py +27 -27
  27. akshare_one/modules/realtime/eastmoney.py +57 -57
  28. akshare_one/modules/realtime/eastmoney_direct.py +37 -37
  29. akshare_one/modules/realtime/factory.py +48 -48
  30. akshare_one/modules/realtime/xueqiu.py +60 -60
  31. akshare_one/modules/utils.py +10 -10
  32. akshare_one/news.py +27 -27
  33. akshare_one/stock.py +78 -78
  34. {akshare_one-0.3.1.dist-info → akshare_one-0.3.2.dist-info}/METADATA +70 -70
  35. akshare_one-0.3.2.dist-info/RECORD +39 -0
  36. {akshare_one-0.3.1.dist-info → akshare_one-0.3.2.dist-info}/licenses/LICENSE +21 -21
  37. akshare_one-0.3.1.dist-info/RECORD +0 -39
  38. {akshare_one-0.3.1.dist-info → akshare_one-0.3.2.dist-info}/WHEEL +0 -0
  39. {akshare_one-0.3.1.dist-info → akshare_one-0.3.2.dist-info}/top_level.txt +0 -0
akshare_one/__init__.py CHANGED
@@ -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
+ ]
akshare_one/financial.py CHANGED
@@ -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}")