import pgsoft
Browse files- app.py +8 -0
- requirements.txt +1 -0
app.py
CHANGED
|
@@ -3,12 +3,20 @@ import time
|
|
| 3 |
from datetime import datetime
|
| 4 |
import asyncio
|
| 5 |
|
|
|
|
|
|
|
| 6 |
app = FastAPI()
|
| 7 |
|
| 8 |
@app.get("/")
|
| 9 |
async def root():
|
| 10 |
return {"message": "PGAI API"}
|
| 11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
@app.get("/info_sync")
|
| 13 |
def info_sync():
|
| 14 |
print(f"[{datetime.now()}] sync")
|
|
|
|
| 3 |
from datetime import datetime
|
| 4 |
import asyncio
|
| 5 |
|
| 6 |
+
from pgsoft.pgconst.const import service_list
|
| 7 |
+
|
| 8 |
app = FastAPI()
|
| 9 |
|
| 10 |
@app.get("/")
|
| 11 |
async def root():
|
| 12 |
return {"message": "PGAI API"}
|
| 13 |
|
| 14 |
+
@app.get("/test")
|
| 15 |
+
def test():
|
| 16 |
+
print(f"[{datetime.now()}] test")
|
| 17 |
+
print(service_list)
|
| 18 |
+
return {"a": 1}
|
| 19 |
+
|
| 20 |
@app.get("/info_sync")
|
| 21 |
def info_sync():
|
| 22 |
print(f"[{datetime.now()}] sync")
|
requirements.txt
CHANGED
|
@@ -1,2 +1,3 @@
|
|
| 1 |
fastapi
|
| 2 |
uvicorn[standard]
|
|
|
|
|
|
| 1 |
fastapi
|
| 2 |
uvicorn[standard]
|
| 3 |
+
git+https://github.com/east-and-west-magic/pgsoft.git@tag-2023-11-25-a
|