Skip to main content

zpllibrary is a python package to create zpl simply.

Project description

zpllibrary

A python library helping to generate ZPL. This is ongoing and is currently in Beta with basic zpl types included

You can test generated code at http://labelary.com/viewer.html

Usage:

Single element

options = Options() #Sets Default options for rendering
simple_text_field = TextField("Content", 100, 100, Font(), True, False, NewLineConversion.Space)
zpl = Engine(simple_text_field).to_zpl_string(options)
print(zpl)
#Output
#^XA^A0N,30.0,30.0^FO100.0,100.0^FH^FDContent^FS^XZ

Barcode

options = Options()
simple_barcode = Barcode39("Content", 100, 100, 200)
zpl = Engine(simple_barcode).to_zpl_string(options)
print(zpl)
#Output
#^XA^FO100.0,100.0^B3N,N,200.0,Y,N^FDContent^FS^XZ

Whole label using all available elements

options = Options()

zpl_list = []
zpl_list.append(RawZpl('Check here'))
zpl_list.append(TextField("Some\nText", 10, 10, Font(), True, True, NewLineConversion.Space))
zpl_list.append(FieldBlock("more text is here", 10, 200, 300, Font(), 2))
zpl_list.append(TextBlock("more text is here than before", 10, 300, 400, 200, Font()))

zpl_list.append(Barcode128("123ABC", 100, 100))
zpl_list.append(Barcode39("123ABC", 100, 200))
zpl_list.append(BarcodeAnsi("123ABC", 100, 300, 100, "A", "D"))
zpl_list.append(QrCode("QR content", 100, 400, magnification_factor=12))
zpl_list.append(GraphicBox(100, 500, 100, 100))
zpl_list.append(GraphicDiagonalLine(100, 600, 100, 100))
zpl_list.append(GraphicEllipse(100, 700, 100, 100))
zpl_list.append(GraphicCircle(100, 800, 20))
zpl_list.append(GraphicHorizontalLine(100, 900, 20))
zpl_list.append(GraphicVerticalLine(100, 1000, 20))
zpl_list.append(GraphicSymbol(SpecialCharacter.canadian_standards_association_approval, 100, 100, 100, 100))
zpl_list.append(DownloadGraphic(500, 100, "C:\\Users\\scott\\Pictures\\download.png"))
zpl = Engine(zpl_list).render(options)
print(zpl)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zpllibrary-1.0.3.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zpllibrary-1.0.3-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file zpllibrary-1.0.3.tar.gz.

File metadata

  • Download URL: zpllibrary-1.0.3.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.4

File hashes

Hashes for zpllibrary-1.0.3.tar.gz
Algorithm Hash digest
SHA256 021c4ec82734f4b2bc5b28a5080519c3795cb83290f8eb72d45ff7fbff52faea
MD5 77b6fa6f9cec135a9df9b093fc9dc696
BLAKE2b-256 0a901aaac5557321b5212272bbe9c96d0cdde188fa972d62a9372c09846a32e8

See more details on using hashes here.

File details

Details for the file zpllibrary-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: zpllibrary-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.4

File hashes

Hashes for zpllibrary-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 72a3769fadc61bd06b1c789a6082fb0cab8678aede51627fb0951424ae7eef30
MD5 57c9cfc2afd6b11674111bbe43b4d63d
BLAKE2b-256 1a8f49b466b065a9707a37dcbeffdf594fbdcb39cdeb1f7b3e2ce53e4868ac68

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page