File size: 1,713 Bytes
51d878c | 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 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | import requests
print('=== AutoSEO Engine - Comprehensive Health Check ===')
print()
# Test health endpoint
try:
health = requests.get('http://127.0.0.1:8000/health')
print(f'β
Health Check: {health.json()}')
except Exception as e:
print(f'β Health Check Failed: {e}')
# Test root endpoint
try:
root = requests.get('http://127.0.0.1:8000/')
print(f'β
Root Endpoint: {root.json()}')
except Exception as e:
print(f'β Root Endpoint Failed: {e}')
# Test stats endpoint
try:
stats = requests.get('http://127.0.0.1:8000/stats')
data = stats.json()
print(f'β
Stats Retrieved: MRR=${data["customer_metrics"]["mrr"]}, Customers={data["customer_metrics"]["total_customers"]}')
except Exception as e:
print(f'β Stats Endpoint Failed: {e}')
# Test revenue dashboard
try:
revenue = requests.get('http://127.0.0.1:8000/revenue/dashboard')
data = revenue.json()
print(f'β
Revenue Dashboard Retrieved: MRR=${data["customer_metrics"]["mrr"]}')
except Exception as e:
print(f'β Revenue Dashboard Failed: {e}')
# Test customers endpoint
try:
customers = requests.get('http://127.0.0.1:8000/customers')
data = customers.json()
print(f'β
Customers Retrieved: {len(data["customers"])} customers')
except Exception as e:
print(f'β Customers Endpoint Failed: {e}')
print()
print('=== Browser Access Instructions ===')
print('Open your browser and navigate to:')
print('- Health: http://127.0.0.1:8000/health')
print('- API Docs: http://127.0.0.1:8000/docs')
print('- Stats: http://127.0.0.1:8000/stats')
print('- Dashboard: http://127.0.0.1:8000/revenue/dashboard')
print()
print('All systems are operational and accessible via browser!') |