pyheroicons
pyheroicons is a Python library that offers a convenient interface to the Tailwind CSS Heroicons icon set. This library allows developers to easily integrate Heroicons into Python-based web frameworks such as Django, Flask, or FastAPI by generating SVG icon template strings.
Installation
To install pyheroicons, simply use pip:
pip install pyheroicons
Usage
Import heroicon function from pyheroicons and use it to generate icon templates:
from pyheroicons import heroicon
heroicon API
- name The name of the Heroicon (e.g., "academic-cap").
- variant The variant of the icon ("outline", "solid", "mini", or "micro").
- cls Optional. A CSS class to apply to the SVG icon.
- strokewidth Optional. The stroke width of the icon. Only applicable if the original SVG contains a stroke-width attribute. i.e. Only works for the "outline" variant.
Example usage
icon_svg = heroicon(name="academic-cap", variant="outline", cls="icon-class", strokewidth="2")
print(icon_svg)
Keeping Up-to-Date
pyheroicons aims to stay up-to-date with the Heroicons library. When a new version of Heroicons is released, pyheroicons will also release a corresponding version to ensure compatibility.
| pyheroicons Version | Heroicons Version |
|---|---|
| 1.2.0 | 2.1.5 |
Contributing
Contributions to pyheroicons are welcomed!
License
pyheroicons is released under the MIT License.
Metadata
Release files for pyheroicons 1.2.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 |
|---|---|---|---|---|
| pyheroicons-1.2.0.tar.gz | 186.3 kB | Without provenance | Details for pyheroicons-1.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyheroicons-1.2.0-py3-none-any.whl | Python 3 | none | any | Details for pyheroicons-1.2.0-py3-none-any.whl |
Total release size: 810.1 kB
Release files / pyheroicons-1.2.0.tar.gz
| Download URL | pyheroicons-1.2.0.tar.gz |
|---|---|
| Size | 186.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e84be6a40f2f90458dd9e82a49a729724f08a9530d15c208edde867f2659a492
|
|
BLAKE2b-256 checksum How to use checksums |
a5cd9c784cd68fb6668e5d7590211fe8a1850bd698cee4c7fdb4645b1037e3b0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Release files / pyheroicons-1.2.0-py3-none-any.whl
| Download URL | pyheroicons-1.2.0-py3-none-any.whl |
|---|---|
| Size | 623.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d46a9b1ef09fa5504b9524e931804441b77397954fb0aadcfa7cd7b81514fbed
|
|
BLAKE2b-256 checksum How to use checksums |
d6260e4a1e57f5817bc5eb8b2ec3362d6b92d7a39a4918afb10987258f8e1f6e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Security for pyheroicons 1.2.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.