parent
780c499913
commit
a5e0f82771
1 changed files with 0 additions and 8 deletions
8
app.py
8
app.py
|
|
@ -10,7 +10,6 @@ from brother_ql.backends.helpers import send
|
||||||
from brother_ql.conversion import convert
|
from brother_ql.conversion import convert
|
||||||
from brother_ql.raster import BrotherQLRaster
|
from brother_ql.raster import BrotherQLRaster
|
||||||
from fastapi import FastAPI, HTTPException
|
from fastapi import FastAPI, HTTPException
|
||||||
from fastapi.middleware.cors import CORSMiddleware
|
|
||||||
from PIL import Image, ImageOps
|
from PIL import Image, ImageOps
|
||||||
from pydantic import BaseModel, Field
|
from pydantic import BaseModel, Field
|
||||||
from pylibdmtx.pylibdmtx import encode
|
from pylibdmtx.pylibdmtx import encode
|
||||||
|
|
@ -20,13 +19,6 @@ if not hasattr(Image, "ANTIALIAS"):
|
||||||
|
|
||||||
app = FastAPI(title="QL-1060N Stacked Barcode Printer")
|
app = FastAPI(title="QL-1060N Stacked Barcode Printer")
|
||||||
|
|
||||||
app.add_middleware(
|
|
||||||
CORSMiddleware,
|
|
||||||
allow_origins=["https://grocy-zyczliwa.oleszczyk.eu"],
|
|
||||||
allow_methods=["POST"],
|
|
||||||
allow_headers=["*"],
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
@lru_cache(maxsize=256)
|
@lru_cache(maxsize=256)
|
||||||
def make_code128(data: str) -> Image.Image:
|
def make_code128(data: str) -> Image.Image:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue