Update api.txt
Browse files
api.txt
CHANGED
|
@@ -1,22 +1,4 @@
|
|
| 1 |
-
|
| 2 |
-
import httpx
|
| 3 |
-
import uvicorn
|
| 4 |
-
import asyncio
|
| 5 |
-
import websockets
|
| 6 |
-
import json
|
| 7 |
-
import subprocess
|
| 8 |
-
import threading
|
| 9 |
-
import time
|
| 10 |
-
import os
|
| 11 |
-
import random
|
| 12 |
-
from typing import Dict
|
| 13 |
-
from loguru import logger
|
| 14 |
-
from starlette.responses import StreamingResponse
|
| 15 |
-
import socket
|
| 16 |
-
import base64
|
| 17 |
-
from cryptography.fernet import Fernet
|
| 18 |
-
from cryptography.hazmat.primitives import hashes
|
| 19 |
-
from cryptography.hazmat.primitives.kdf.pbkdf2 import PBKDF2HMAC
|
| 20 |
|
| 21 |
|
| 22 |
|
|
@@ -63,7 +45,25 @@ for package_name, module_name in required_packages.items():
|
|
| 63 |
print("--- 所有依赖库均已准备就绪 ---")
|
| 64 |
print("\n" * 2)
|
| 65 |
|
| 66 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
|
| 68 |
app = FastAPI()
|
| 69 |
|
|
|
|
| 1 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
|
| 4 |
|
|
|
|
| 45 |
print("--- 所有依赖库均已准备就绪 ---")
|
| 46 |
print("\n" * 2)
|
| 47 |
|
| 48 |
+
from fastapi import FastAPI, Request, Response, WebSocket, WebSocketDisconnect, Query
|
| 49 |
+
import httpx
|
| 50 |
+
import uvicorn
|
| 51 |
+
import asyncio
|
| 52 |
+
import websockets
|
| 53 |
+
import json
|
| 54 |
+
import subprocess
|
| 55 |
+
import threading
|
| 56 |
+
import time
|
| 57 |
+
import os
|
| 58 |
+
import random
|
| 59 |
+
from typing import Dict
|
| 60 |
+
from loguru import logger
|
| 61 |
+
from starlette.responses import StreamingResponse
|
| 62 |
+
import socket
|
| 63 |
+
import base64
|
| 64 |
+
from cryptography.fernet import Fernet
|
| 65 |
+
from cryptography.hazmat.primitives import hashes
|
| 66 |
+
from cryptography.hazmat.primitives.kdf.pbkdf2 import PBKDF2HMAC
|
| 67 |
|
| 68 |
app = FastAPI()
|
| 69 |
|