Skip to main content

Ready to use Tailwindcss Heroicons components for Python

Project description

pyheroicons

PyPI version License: MIT Python Versions Package Status CI Build

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyheroicons-1.2.0.tar.gz (186.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyheroicons-1.2.0-py3-none-any.whl (623.8 kB view details)

Uploaded Python 3

File details

Details for the file pyheroicons-1.2.0.tar.gz.

File metadata

  • Download URL: pyheroicons-1.2.0.tar.gz
  • Upload date:
  • Size: 186.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for pyheroicons-1.2.0.tar.gz
Algorithm Hash digest
SHA256 e84be6a40f2f90458dd9e82a49a729724f08a9530d15c208edde867f2659a492
MD5 6b1b82eb46b95b2da1850ff63d6e13d1
BLAKE2b-256 a5cd9c784cd68fb6668e5d7590211fe8a1850bd698cee4c7fdb4645b1037e3b0

See more details on using hashes here.

File details

Details for the file pyheroicons-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: pyheroicons-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 623.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for pyheroicons-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d46a9b1ef09fa5504b9524e931804441b77397954fb0aadcfa7cd7b81514fbed
MD5 d22a28d0d2d3cb2ea7ed83542324fd06
BLAKE2b-256 d6260e4a1e57f5817bc5eb8b2ec3362d6b92d7a39a4918afb10987258f8e1f6e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page