chore: init pomix camera simulator

This commit is contained in:
2025-08-17 19:50:32 +03:30
commit 705c610e9b
6 changed files with 277 additions and 0 deletions

25
main.py Normal file
View File

@@ -0,0 +1,25 @@
from fastapi import FastAPI
from pydantic import BaseModel
import httpx
class InputGate(BaseModel):
cameraCode: str
plateNumber: str
plateType: str
gateName: str
gateType: str
gateLine: str
app = FastAPI()
@app.post("/api/v1/pomix-camera/")
async def input_gate(data: InputGate):
POMIX_CAMERA_URL: str = "http://localhost:3030/sendplateNumber"
payload = data.model_dump()
async with httpx.AsyncClient() as client:
response = await client.post(url=POMIX_CAMERA_URL, json=payload)
# Return the JSON response from the other service
return response.json()