Tyres EU energy label generator
Generator for EU tyre energy labels. Creates a label according to the specification as an SVG file.
Installation
$ pip install tyre-energy-label
Usage
from tyre_label import TyreEnergyLabel
label = TyreEnergyLabel(
supplier='Cool Tyre',
type_identifier='94385300',
size='185/75 R16',
tyre_class='C2',
fuel_efficiency='E',
wet_grip='A',
roll_noise=72,
noise_level='C',
snow_grip=True,
ice_grip=True,
eprel_id=381667,
eprel_link='https://eprel.ec.europa.eu/qr/381667'
)
label.save('example.svg')
# optional: get SVG as a string
svg_data = label.as_svg(embed_fonts=True, include_link=True)
If you don't specify eprel_link, it will be automatically generated from eprel_id.
Command line interface
The package installs tyre-label CLI. Use $ tyre-label --help for the list of available options.
Example usage
$ tyre-label \
--supplier "Cool Tyre" \
--type "94385300" \
--size "185/75 R16" \
--class "C2" \
--fuel C \
--wet A \
--noise 72 \
--level A \
--snow 1 \
--ice 1 \
--eprel-id 381667 \
--url "https://eprel.ec.europa.eu/qr/381667" \
-o example.svg
JSON support
$ tyre-label --json '{
"supplier": "Cool Tyre",
"type_identifier": "94385300",
"size": "185/75 R16",
"tyre_class": "C2",
"fuel_efficiency": "C",
"wet_grip": "A",
"roll_noise": 72,
"noise_level": "A",
"snow_grip": true,
"ice_grip": true,
"eprel_id": 381667,
"eprel_link": "https://eprel.ec.europa.eu/qr/381667"
}' -o example.svg
Support for PNG and PDF formats
You can use librsvg to convert resulting SVG files into PNG (bitmap) or PDF files. It's also possible to specify a zoom factor with -z 2.0 which can be useful for bitmaps. See man rsvg-convert for more details.
rsvg-convert -f png example.svg > example.png
rsvg-convert -f pdf example.svg > example.pdf
License
Distributed under the MIT license. See LICENSE file for more details.
Release files for tyre-energy-label 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 | |
|---|---|---|---|
| tyre-energy-label-1.1.0.tar.gz | 58.0 kB | Details |
Release files / tyre-energy-label-1.1.0.tar.gz
| Download URL | tyre-energy-label-1.1.0.tar.gz |
|---|---|
| Size | 58.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
76d25c2abfd938748b1f9e38f26c079ede49803bf8099c9d4bf31bf815e0aa4a
|
|
BLAKE2b-256 checksum How to use checksums |
2bb2f620f30fbad2c093448cf729a1bc1cb7c187424eb0e7fe8b077e5830cb0b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|