labelixa
Render, validate and convert Zebra ZPL label code from Python — no printer required. Thin client for the Labelixa API.
pip install labelixa
from labelixa import Client
c = Client() # anonymous: free, rate-limited
# c = Client(api_key="lbx_...") # your quota — https://labelixa.com/panel
zpl = "^XA^FO50,50^A0N,40^FDHello^FS^BY3^FO50,120^BCN,100,Y^FD12345678^FS^XZ"
# See what the label looks like
with open("label.png", "wb") as f:
f.write(c.render_png(zpl, width_in=4, height_in=6))
# Lint before printing
report = c.validate(zpl)
for d in report["diagnostics"]:
print(d["severity"], d["mesaj"], d["url"]) # wire field names are stable
# Multi-label PDF, ZPL -> EPL2 translation
pdf = c.render_pdf(zpl)
epl = c.to_epl(zpl)
# 0.2.0: barcode / language detection / printer compatibility
svg = c.barcode("HELLO-123", type="code128")
lang = c.language_detect(raw_label_code) # confidence TIER, not %
risk = c.compatibility(zpl, "zebra/zd421") # manufacturer/model; risk report, not "it works"
Quota errors are first-class:
from labelixa import QuotaExceeded
try:
c.render_png(zpl)
except QuotaExceeded as e:
print(f"retry in {e.retry_after}s (hint: {e.action})")
Reading a response
Response keys are stable wire names and most of them are Turkish; they
never change inside /v1. The English name of every key is listed at
https://labelixa.com/docs/api#response-fields. A real answer of
c.validate(zpl) (POST /v1/diagnostics) for a label whose ^FD field is not
closed (abridged only where marked):
{
"diagnostics": [
{
"code": "ZPL2001",
"severity": "warning",
"message_key": "diag.zpl2001",
"line": 1, "col": 19, "end_line": 1, "end_col": 27,
"args": { "komut": "^FD" }, // komut: command
"quickfix": { // a one-click fix
"offset": 26, "end_offset": 26,
"yeni": "^FS" // yeni: replacement text to insert at offset
// (abridged: also a short English title and its message key)
},
// mesaj: message (always English)
"mesaj": "^FD field data is not terminated with ^FS; real printers may misread the commands that follow",
"onizleme": { "x": 50, "y": 50 }, // onizleme: preview position, in dots
"url": "https://labelixa.com/zpl/rules/ZPL2001"
}
],
"ozet": { "toplam": 1, "error": 0, "warning": 1, "info": 0 }, // ozet: summary, toplam: total
"alanlar": [{ "line": 1, "x": 50, "y": 50 }], // alanlar: fields (each ^FD / ^FV)
"rfid": []
}
An error is a status code plus a body. Render endpoints answer with one
line of plain text (dpmm must be 6, 8, 12 or 24); JSON endpoints carry
an English sentence and, where one exists, a stable machine-readable name
in kod (code) or hata_tipi (error type). When you read the raw body,
branch on that name, never on the sentence. This client raises LabelixaError with the status code and the sentence only; the status code is the stable signal it exposes.
// 401 Unauthorized
// WWW-Authenticate: ApiKey realm="labelixa"
{
// (abridged: the English sentence "Invalid API key", which the client
// puts in the exception message)
"kod": "gecersiz_anahtar" // kod: code (the key sent belongs to no account)
}
When each error happens and how to fix it: https://labelixa.com/docs/api#errors.
The API key is only sent over https (plain http is accepted for
localhost only; any other http base URL with a key raises
ValueError), and redirects are never followed, so a server cannot
forward the key to another host.
This SDK is a deliberately thin 1:1 wrapper over the documented REST
API — the API reference is the source
of truth. AI assistants can also use Labelixa directly over MCP:
point your client at https://api.labelixa.com/mcp.
Metadata
Release files for labelixa 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| labelixa-0.3.0.tar.gz | 12.6 kB | With provenance | Details for labelixa-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| labelixa-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for labelixa-0.3.0-py3-none-any.whl |
Total release size: 22.1 kB
Release files / labelixa-0.3.0.tar.gz
| Download URL | labelixa-0.3.0.tar.gz |
|---|---|
| Size | 12.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
22f6e1d1b3c2a8c1ab72d68dd9fff5ee19a70d508a7b9c16442445d7c29b8fc2
|
|
BLAKE2b-256 checksum How to use checksums |
c939497d2fa19accde89376c50dcb4f178422de0e57bca1df69d8ae85708cec5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.
Transparency logRelease files / labelixa-0.3.0-py3-none-any.whl
| Download URL | labelixa-0.3.0-py3-none-any.whl |
|---|---|
| Size | 9.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
657b7dc69b1ad395f7f86a5cd9c7a98e23dfaceaf198c6d618750b48f45c5458
|
|
BLAKE2b-256 checksum How to use checksums |
389c696f02110225e8edcec54fd13ae4cf4c1e2b7709ef3b82dfaac409261a63
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.
Transparency logSecurity for labelixa 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for labelixa-0.3.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.