Skip to main content

A library to aid in generating ZPL2 code.

Project description

https://travis-ci.org/kolonialno/zplgen.svg?branch=master

zplgen is a utility library to aid in generating ZPL2 code.

The core idiom is the Command class, which subclasses bytes. Another helper is the Font class.

Example usage

f_default = Font('V', height=30)

label = bytes()

label += Command.label_start()
label += Command.label_home(30, 0)

label += Command.graphic_circle(x=550, y=15, diameter=100, border=6)
label += Command.field('?', x=560, y=50, font=f_default(45))

label += Command.field(name, x=0, y=135, font=f_default)

label += Command.label_end()

send_to_printer(label)

Running tests

In the base directory, run the following:

python -m unittest discover -s tests

License

zplgen is released under the MIT License.

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

zplgen-0.0.6.tar.gz (5.1 kB view details)

Uploaded Source

File details

Details for the file zplgen-0.0.6.tar.gz.

File metadata

  • Download URL: zplgen-0.0.6.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for zplgen-0.0.6.tar.gz
Algorithm Hash digest
SHA256 0965861a842281c823a49c572ffdfc1a47bdcdceb851c5aca652a7c2cff1c51e
MD5 ff916b8ee3c319e84d40d6d6d990c789
BLAKE2b-256 b7d15eb4ecd2e129e0a21547320959d2f4ca7d15f6b9bd9d77a2743d58f4d009

See more details on using hashes here.

Supported by

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