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
Attribution
This project was forked from boxine/beautiful_barcodein order to add a no AI policy, build for the latest version of Python (and poetry), and maybe also add a proper CLI for convenience.
License
Release files for streepjescode 1.0.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 | |
|---|---|---|---|
| streepjescode-1.0.0.tar.gz | 8.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| streepjescode-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.0 kB
Release files / streepjescode-1.0.0.tar.gz
| Download URL | streepjescode-1.0.0.tar.gz |
|---|---|
| Size | 8.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
31492945c85e3104ebbe69059a52336375b1e7d483fd168c5f2574fd74db4c06
|
|
BLAKE2b-256 checksum How to use checksums |
922ad79501ed01a71a82709cc849390d3b068f472c2f354f0f78c15d55e9773d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.1 CPython/3.13.15 Linux/7.1.10+deb14-asahi
|
Release files / streepjescode-1.0.0-py3-none-any.whl
| Download URL | streepjescode-1.0.0-py3-none-any.whl |
|---|---|
| Size | 11.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f6dab43c741d84e6f1457d1eb9e9f1c0ade20fa96bb1cc642d145cc1c0fe665a
|
|
BLAKE2b-256 checksum How to use checksums |
b475f4bb00ee940bf2131fc8b0decce132ba9e709be403e1960fdd4116371ae9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.1 CPython/3.13.15 Linux/7.1.10+deb14-asahi
|