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.1.0 2.1.1

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.1.0.tar.gz (186.2 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pyheroicons-1.1.0.tar.gz
Algorithm Hash digest
SHA256 09fefb531e4571a3e3e185d62662ecb204bd8b6b25cbd1deb6009232d292a02d
MD5 78c232788a3cebedd45f91ad24cfa1bb
BLAKE2b-256 4bb55721cd34ac56a1f0c8c45b95148b66c1494bb50bab3ebb0f7451865d738d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyheroicons-1.1.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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 75e26e0c6bf6111b0f296502a56f43173655d0f0457c8a20cc7671c9b56a7540
MD5 eb92e4e7c328842c0cf6a1c1bb79d3f6
BLAKE2b-256 bd654ec68162e4c6a85c33d30ae50159dc2604112a5dcbd82fccff44c56a9341

See more details on using hashes here.

Supported by

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