Generate nicely formatted barcodes (UPC-A and EAN)
Project description
beautiful_barcode
Generate well-formatted, production-ready Barcodes.
By default, existing Python barcode libraries like python-barcode generate good barcodes, but any and all formatting of the text is left up to the user. beautiful_barcode generates a nicely formatted barcode with interleaved text out of the box:
Depending on your renderer (and true by default), text in the barcode is not an SVG <text>
element, as such an elment may render differently on different machines depending on font availability.
This library is currently limited to UPC-A/EAN and EPS/SVG – that's all we (the original authors) needed. Patches welcome!
Installation
$ pip install beautiful_barcode
Usage
>>> from beautiful_barcode import GTIN
>>> GTIN('123456789012').write('output.svg')
Command line:
$ python -m beautiful_barcode 123456789012 -o output.svg
Quickstart
~$ git clone https://github.com/boxine/beautiful_barcode.git
~$ cd beautiful_barcode
~/beautiful_barcode$ make
help List all commands
install-poetry install or update poetry
install install via poetry
update Update the dependencies as according to the pyproject.toml file
lint Run code formatters and linter
fix-code-style Fix code formatting
tox-listenvs List all tox test environments
tox Run pytest via tox with all environments
tox-py36 Run pytest via tox with *python v3.6*
tox-py37 Run pytest via tox with *python v3.7*
tox-py38 Run pytest via tox with *python v3.8*
tox-py39 Run pytest via tox with *python v3.9*
pytest Run pytest
pytest-ci Run pytest with CI settings
publish Release new version to PyPi
makemessages Make and compile locales message files
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
Built Distribution
File details
Details for the file beautiful_barcode-1.1.2.tar.gz
.
File metadata
- Download URL: beautiful_barcode-1.1.2.tar.gz
- Upload date:
- Size: 9.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.10.5 Linux/5.18.0-1-amd64
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 299f428f84aeeeae26faa21edb241c962d5edbc127c29be720345813fdd7b750 |
|
MD5 | 53ec4923641e0db0a5cbb1a923ba40e7 |
|
BLAKE2b-256 | 7b0258e3b8475d733cd23e8438976632354bf2c71926163c8bd177d541d39031 |
File details
Details for the file beautiful_barcode-1.1.2-py3-none-any.whl
.
File metadata
- Download URL: beautiful_barcode-1.1.2-py3-none-any.whl
- Upload date:
- Size: 10.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.10.5 Linux/5.18.0-1-amd64
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 18f0557f276278ea446e09238edb2b9fb07276c40f021d62454e4071501d8d31 |
|
MD5 | a0730a34743db077f003b3a2beb235b0 |
|
BLAKE2b-256 | d6fe25063da27a018c71fa6ce4f1073db6028946701ee7f946b24afca6ddeff6 |