lucide-fasthtml
Any use of the code retrieved from lucide.dev is subject to the terms of the Lucide license, found here.
A small package for FastHTML that allows you to use Lucide icons efficiently with fasthtml projects, avoiding cdn's and downloading entire static bundles. Features include:
- Full tree-shaking support - only saves the icons you use.
- Client-side
scriptretrieval on cache-miss - Streamlined attribute handling for full customization (mimics lucide-react)
- On-demand download/save of icons. Downloaded on first call and stored in a dict within the package.
- Immediate icon retrieval on cache-hit (SSR)
Table of Contents
Installation
pip install lucide-fasthtml
Usage
from lucide_fasthtml import Lucide
Lucide("sun") # or Lucide(icon="sun")
Customization
Supports all standard svg attributes. Defaults are set to the standard defaults found at lucide.dev. For ease of use, streamlined attributes used by lucide-react are also supported in a FastHTML-compatible format.
| lucide-react | lucide-fasthtml | notes |
|---|---|---|
color="red" |
color="red" |
Can be used instead of stroke. Sets the color of the icon stroke. |
strokeWidth="2" |
stroke_width="2" |
Sets the stroke width of the icon. |
absoluteStrokeWidth=True |
absolute_sw=True |
Calculates the stroke width based on the icon's size, to standardize the stroke width across different icon sizes. |
size=16 |
size=16 |
Can be used instead of width and height properties. Sets the size (width and height) of the icon to the specified value. |
Lucide("sun", color="red", stroke_width="1.5", absolute_sw=True, size=16)
All icon data can be found in the generated icons.py file within the package. You can manually add/remove icons as needed, or delete the entire file to re-download all used icons when started next.
License
lucide-fasthtml is distributed under the terms of the MIT license.
Metadata
Release files for lucide-fasthtml 0.0.9
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 |
|---|---|---|---|---|
| lucide_fasthtml-0.0.9.tar.gz | 6.2 kB | Without provenance | Details for lucide_fasthtml-0.0.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lucide_fasthtml-0.0.9-py3-none-any.whl | Python 3 | none | any | Details for lucide_fasthtml-0.0.9-py3-none-any.whl |
Total release size: 12.1 kB
Release files / lucide_fasthtml-0.0.9.tar.gz
| Download URL | lucide_fasthtml-0.0.9.tar.gz |
|---|---|
| Size | 6.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
60f25c1edd7a298516f762912765f278b0d7a18a51f8893eb40b36b224246caa
|
|
BLAKE2b-256 checksum How to use checksums |
412800e7cf45c953b8c36559225800de2c47204c3f2fb6c756aaef3ed7069d08
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.27.0
|
Release files / lucide_fasthtml-0.0.9-py3-none-any.whl
| Download URL | lucide_fasthtml-0.0.9-py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
edbe27a7ac7a3be46aefe8db8319a2afc283ca1f1245f1fb029a3768388ed9bc
|
|
BLAKE2b-256 checksum How to use checksums |
b870ff9a003fe4dff2127b5d0ee5b8995caa85f9e6b8e9751064d4ddaf2fb53d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.27.0
|
Security for lucide-fasthtml 0.0.9
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.