added initial py analytics / rust core / ts orchestrator services
This commit is contained in:
parent
680b5fd2ae
commit
c862ed496b
62 changed files with 13459 additions and 0 deletions
38
apps/stock/analytics/main.py
Normal file
38
apps/stock/analytics/main.py
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
#!/usr/bin/env python3
|
||||
"""
|
||||
Trading Analytics Service - Main entry point
|
||||
"""
|
||||
|
||||
import uvicorn
|
||||
import logging
|
||||
import os
|
||||
from dotenv import load_dotenv
|
||||
|
||||
# Load environment variables
|
||||
load_dotenv()
|
||||
|
||||
# Configure logging
|
||||
logging.basicConfig(
|
||||
level=logging.INFO,
|
||||
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s'
|
||||
)
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
def main():
|
||||
"""Start the analytics service"""
|
||||
host = os.getenv('ANALYTICS_HOST', '0.0.0.0')
|
||||
port = int(os.getenv('ANALYTICS_PORT', '3003'))
|
||||
|
||||
logger.info(f"Starting Trading Analytics Service on {host}:{port}")
|
||||
|
||||
uvicorn.run(
|
||||
"src.api.app:app",
|
||||
host=host,
|
||||
port=port,
|
||||
reload=os.getenv('ENV') == 'development',
|
||||
log_level="info"
|
||||
)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Loading…
Add table
Add a link
Reference in a new issue