Soumik Bose commited on
Commit ·
502406a
1
Parent(s): e3b5cfa
added libs
Browse files- README.md +1 -1
- controller.py +11 -0
- requirements.txt +21 -0
README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
---
|
| 2 |
-
title: My
|
| 3 |
emoji: 🚀
|
| 4 |
colorFrom: blue
|
| 5 |
colorTo: purple
|
|
|
|
| 1 |
---
|
| 2 |
+
title: My Code Executor APIs
|
| 3 |
emoji: 🚀
|
| 4 |
colorFrom: blue
|
| 5 |
colorTo: purple
|
controller.py
CHANGED
|
@@ -301,6 +301,17 @@ def _run_postgres_synchronously(db_url: str, sql_query: str, max_rows: int = 20,
|
|
| 301 |
finally:
|
| 302 |
if cursor: cursor.close()
|
| 303 |
if connection: connection.close()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 304 |
|
| 305 |
|
| 306 |
# ==============================================================================
|
|
|
|
| 301 |
finally:
|
| 302 |
if cursor: cursor.close()
|
| 303 |
if connection: connection.close()
|
| 304 |
+
|
| 305 |
+
# ==============================================================================
|
| 306 |
+
# KEEP-ALIVE ROUTE
|
| 307 |
+
# ==============================================================================
|
| 308 |
+
@app.get("/")
|
| 309 |
+
async def root():
|
| 310 |
+
return {"message": "Python Code Execution Server is running"}
|
| 311 |
+
|
| 312 |
+
@app.get("/ping")
|
| 313 |
+
async def ping():
|
| 314 |
+
return {"message": "I am alive!"}
|
| 315 |
|
| 316 |
|
| 317 |
# ==============================================================================
|
requirements.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pandas==1.5.3
|
| 2 |
+
numpy==1.26.4
|
| 3 |
+
fastapi==0.115.5
|
| 4 |
+
pyyaml==6.0.2
|
| 5 |
+
uvicorn==0.34.0
|
| 6 |
+
seaborn==0.13.2
|
| 7 |
+
matplotlib==3.9.2
|
| 8 |
+
scikit-learn==1.6.1
|
| 9 |
+
supabase==2.13.0
|
| 10 |
+
python-dotenv==1.0.1
|
| 11 |
+
pymysql==1.1.1
|
| 12 |
+
sqlalchemy==2.0.36
|
| 13 |
+
psycopg2-binary>=2.9.0
|
| 14 |
+
pymongo==4.11.1
|
| 15 |
+
mysql-connector-python==9.1.0
|
| 16 |
+
certifi==2024.8.30
|
| 17 |
+
cryptography>=3.0
|
| 18 |
+
asyncpg==0.30.0
|
| 19 |
+
aiomysql==0.2.0
|
| 20 |
+
|
| 21 |
+
|