streepjescode
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. streepjescode 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
You should use something like pipx to install this, so it doesn't interfere with any of your existing libraries.
$ pipx install streepjescode
Usage
In Python
>>> from streepjescode import GTIN
>>> GTIN('123456789012').write('output.svg')
Via the Command Line
$ streepjescode 123456789012 -o output.svg
# the streepjescode command is also available as barcode
$ barcode 123456789012 -o output.svg
Quickstart from source
~$ git clone https://codeberg.org/jessebot/streepjescode.git
~$ cd streepjescode
~/streepjescode$ 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_barcode in 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
Fun Facts
streepjescode means barcode in Dutch :)
Release files for streepjescode 1.1.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.1.0.tar.gz | 8.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| streepjescode-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.4 kB
Release files / streepjescode-1.1.0.tar.gz
| Download URL | streepjescode-1.1.0.tar.gz |
|---|---|
| Size | 8.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
17ef1a4b55b2e971ebe9d92375b25f8d5280797c33102d9c6f869b1ec8b6ff0f
|
|
BLAKE2b-256 checksum How to use checksums |
54ee431fd884bf40976ffad5d27f47b25b8c2c1e7da847a8ac1015ff232152ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.1 CPython/3.11.2 Linux/6.1.0-53-amd64
|
Release files / streepjescode-1.1.0-py3-none-any.whl
| Download URL | streepjescode-1.1.0-py3-none-any.whl |
|---|---|
| Size | 11.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5f2e1c845717be9fad68e9219352a5db49f9caab33365f0ae97d401c381fda0b
|
|
BLAKE2b-256 checksum How to use checksums |
ab9436b2953be628d1cc1cb150cf69a3bb997e829ee573671b500adeab89b9b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.1 CPython/3.11.2 Linux/6.1.0-53-amd64
|