CatPtain commited on
Commit
f70681e
·
verified ·
1 Parent(s): 1c84707

Upload 2 files

Browse files
Files changed (2) hide show
  1. app.py +13 -0
  2. pyproject.toml +112 -0
app.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from openbb import sdk
3
+
4
+ def query(symbol: str):
5
+ try:
6
+ # 示例:获取股票价格,实际接口请根据 OpenBB SDK 文档调整
7
+ result = sdk.stocks.price(symbol)
8
+ return str(result)
9
+ except Exception as e:
10
+ return f"Error: {e}"
11
+
12
+ iface = gr.Interface(fn=query, inputs="text", outputs="text", title="OpenBB Query")
13
+ iface.launch()
pyproject.toml ADDED
@@ -0,0 +1,112 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [tool.poetry]
2
+ name = "openbb"
3
+ version = "4.4.4"
4
+ description = "Investment research for everyone, anywhere."
5
+ authors = ["OpenBB Team <hello@openbb.co>"]
6
+ license = "AGPL-3.0-only"
7
+ readme = "README.md"
8
+ packages = [{ include = "openbb" }]
9
+
10
+ [tool.poetry.dependencies]
11
+ python = ">=3.9.21,<3.13"
12
+ gradio = "^4.0.0"
13
+ openbb-core = "^1.4.7"
14
+ openbb-platform-api = "^1.1.9"
15
+
16
+ openbb-benzinga = "^1.4.1"
17
+ openbb-bls = "^1.1.2"
18
+ openbb-cftc = "^1.1.1"
19
+ openbb-econdb = "^1.3.1"
20
+ openbb-federal-reserve = "^1.4.2"
21
+ openbb-fmp = "^1.4.2"
22
+ openbb-fred = "^1.4.4"
23
+ openbb-imf = "^1.1.1"
24
+ openbb-intrinio = "^1.4.1"
25
+ openbb-oecd = "^1.4.1"
26
+ openbb-polygon = "^1.4.1"
27
+ openbb-sec = "^1.4.3"
28
+ openbb-tiingo = "^1.4.1"
29
+ openbb-tradingeconomics = "^1.4.1"
30
+ openbb-us-eia = "^1.1.1"
31
+ openbb-yfinance = "^1.4.6"
32
+
33
+ openbb-commodity = "^1.3.1"
34
+ openbb-crypto = "^1.4.1"
35
+ openbb-currency = "^1.4.1"
36
+ openbb-derivatives = "^1.4.1"
37
+ openbb-economy = "^1.4.2"
38
+ openbb-equity = "^1.4.1"
39
+ openbb-etf = "^1.4.1"
40
+ openbb-fixedincome = "^1.4.3"
41
+ openbb-index = "^1.4.1"
42
+ openbb-news = "^1.4.1"
43
+ openbb-regulators = "^1.4.2"
44
+
45
+ # Community dependencies
46
+ openbb-alpha-vantage = { version = "^1.4.1", optional = true }
47
+ openbb-biztoc = { version = "^1.4.2", optional = true }
48
+ openbb-cboe = { version = "^1.4.1", optional = true }
49
+ openbb-deribit = { version = "^1.0.1", optional = true }
50
+ openbb-ecb = { version = "^1.4.2", optional = true }
51
+ openbb-finra = { version = "^1.4.1", optional = true }
52
+ openbb-finviz = { version = "^1.3.1", optional = true }
53
+ openbb-government-us = { version = "^1.4.1", optional = true }
54
+ openbb-multpl = { version = "^1.1.1", optional = true }
55
+ openbb-nasdaq = { version = "^1.4.1", optional = true }
56
+ openbb-seeking-alpha = { version = "^1.4.1", optional = true }
57
+ openbb-stockgrid = { version = "^1.4.1", optional = true }
58
+ openbb-tmx = { version = "^1.3.2", optional = true }
59
+ openbb-tradier = { version = "^1.3.1", optional = true }
60
+ openbb-wsj = { version = "^1.4.1", optional = true }
61
+
62
+ openbb-charting = { version = "^2.3.4", optional = true }
63
+ openbb-econometrics = { version = "^1.5.3", optional = true }
64
+ openbb-quantitative = { version = "^1.4.3", optional = true }
65
+ openbb-technical = { version = "^1.4.3", optional = true }
66
+
67
+ [tool.poetry.extras]
68
+ alpha_vantage = ["openbb-alpha-vantage"]
69
+ biztoc = ["openbb-biztoc"]
70
+ cboe = ["openbb-cboe"]
71
+ charting = ["openbb-charting"]
72
+ ecb = ["openbb-ecb"]
73
+ econometrics = ["openbb-econometrics"]
74
+ finra = ["openbb-finra"]
75
+ finviz = ["openbb-finviz"]
76
+ government_us = ["openbb-government-us"]
77
+ nasdaq = ["openbb-nasdaq"]
78
+ multpl = ["openbb-multpl"]
79
+ quantitative = ["openbb-quantitative"]
80
+ seeking_alpha = ["openbb-seeking-alpha"]
81
+ stockgrid = ["openbb-stockgrid"]
82
+ technical = ["openbb-technical"]
83
+ tmx = ["openbb-tmx"]
84
+ tradier = ["openbb-tradier"]
85
+ wsj = ["openbb-wsj"]
86
+
87
+
88
+ all = [
89
+ "openbb-alpha-vantage",
90
+ "openbb-biztoc",
91
+ "openbb-cboe",
92
+ "openbb-charting",
93
+ "openbb-deribit",
94
+ "openbb-ecb",
95
+ "openbb-econometrics",
96
+ "openbb-finra",
97
+ "openbb-finviz",
98
+ "openbb-government-us",
99
+ "openbb-multpl",
100
+ "openbb-nasdaq",
101
+ "openbb-quantitative",
102
+ "openbb-seeking-alpha",
103
+ "openbb-stockgrid",
104
+ "openbb-technical",
105
+ "openbb-tmx",
106
+ "openbb-tradier",
107
+ "openbb-wsj",
108
+ ]
109
+
110
+ [build-system]
111
+ requires = ["poetry-core"]
112
+ build-backend = "poetry.core.masonry.api"