-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart_server.py
More file actions
33 lines (28 loc) · 992 Bytes
/
start_server.py
File metadata and controls
33 lines (28 loc) · 992 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/env python3
"""
Start the FinPulse FastAPI server for Power BI integration.
This script starts the API server that Power BI will connect to
for live data feeds.
"""
import uvicorn
import sys
import os
# Add project root to path
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
if __name__ == "__main__":
print("🚀 Starting FinPulse API server...")
print("📊 Power BI can connect to: http://localhost:8000")
print("📖 API Documentation: http://localhost:8000/docs")
print("🔍 Health Check: http://localhost:8000/health")
print("\n🔗 Key Power BI Endpoints:")
print(" - Sentiment Summary: http://localhost:8000/sentiment/summary")
print(" - Articles: http://localhost:8000/articles")
print(" - All Endpoints: http://localhost:8000/")
print("\nPress Ctrl+C to stop the server...")
uvicorn.run(
"main:app",
host="0.0.0.0",
port=8000,
reload=True,
log_level="info"
)