Using Fast API
@app.get("/PackfotoTrigger/{auftragsnummer}")
def PackfotoErzeugung(auftragsnummer: str):
ImageGrab()
Image_Path = "//[IP]/Warenausgangsdokumentation/Documents/" + auftragsnummer + ".jpeg"
#Original_Image = Image.open("./RecentPhoto/RawPhoto.jpeg")
#Rotated_Image = Original_Image.rotate(270)
#Rotated_Image.save(Image_Path)
img = cv2.imread("./RecentPhoto/RawPhoto.jpeg")
img_cw_90 = cv2.rotate(img, cv2.ROTATE_90_CLOCKWISE)
cv2.imwrite(Image_Path, img_cw_90)
return {"status":"200","message":"Bild erfolgreich gespeichert","path":"12345.jpg"}```
I hope someone can explain me, how i can add an output like this
```{
"status": "200",
"message": "Bild erfolgreich gespeichert",
"path": "12345.jpg"
}```