ebanutsya

This commit is contained in:
2023-10-28 08:07:53 +03:00
parent 1d2ee676ff
commit 4d98d631f7
6 changed files with 63 additions and 6 deletions

16
sipro/api/printing.py Normal file
View File

@@ -0,0 +1,16 @@
from io import BytesIO
from flask import send_file
from requests import Response
from sipro.api.client import get_client
client = get_client()
router = '/printing'
def get_label(order_product_id: str) -> BytesIO:
method = f'{router}/getLabel?orderId={order_product_id}'
response: Response = client.method('GET', method, raw=True)
data = BytesIO(response.content)
return data