A library to aid in generating ZPL2 code.
Project description
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.5.tar.gz
(5.0 kB
view hashes)
Built Distribution
Close
Hashes for zplgen-0.0.5-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97b47f3e4130638a0080ce505475ae9136b6996497fe7d922ce7934ada02d13e |
|
MD5 | f8c2df4f60d226c77ff1ba4efded8c58 |
|
BLAKE2b-256 | 86f2b520a4bbcbe0bad003893de5bb380748836a222ddabff4e419b2d88389a6 |