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 :)
Metadata
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 | Provenance | Actions |
|---|---|---|---|---|
| streepjescode-1.1.0.tar.gz | 8.9 kB | Without provenance | Details for streepjescode-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| streepjescode-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for streepjescode-1.1.0-py3-none-any.whl |
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
|
Security for streepjescode 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.