Name | lucide-fasthtml JSON |
Version |
0.0.9
JSON |
| download |
home_page | None |
Summary | Lucide icons for FastHTML |
upload_time | 2024-09-10 03:56:35 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | None |
keywords |
fasthtml
icons
lucide
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# lucide-fasthtml
*Any use of the code retrieved from lucide.dev is subject to the terms of the Lucide license, found [here](https://lucide.dev/license).*
[![PyPI - Version](https://img.shields.io/pypi/v/lucide-fasthtml.svg)](https://pypi.org/project/lucide-fasthtml)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/lucide-fasthtml.svg)](https://pypi.org/project/lucide-fasthtml)
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 `script` retrieval on cache-miss
- Streamlined attribute handling for full customization (mimics [lucide-react](https://lucide.dev/guide/packages/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](#installation)
- [Usage](#usage)
- [Customization](#customization)
- [License](#license)
## Installation
```console
pip install lucide-fasthtml
```
## Usage
```python
from lucide_fasthtml import Lucide
Lucide("sun") # or Lucide(icon="sun")
```
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-sun"><circle cx="12" cy="12" r="4"/><path d="M12 2v2"/><path d="M12 20v2"/><path d="m4.93 4.93 1.41 1.41"/><path d="m17.66 17.66 1.41 1.41"/><path d="m2 12h2"/><path d="m20 12h2"/><path d="m6.34 17.66-1.41 1.41"/><path d="m19.07 4.93-1.41 1.41"/></svg>
## Customization
Supports all standard svg attributes. Defaults are set to the standard defaults found at [lucide.dev](https://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. |
```python
Lucide("sun", color="red", stroke_width="1.5", absolute_sw=True, size=16)
```
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="red" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="4"/><path d="M12 2v2"/><path d="M12 20v2"/><path d="m4.93 4.93 1.41 1.41"/><path d="m17.66 17.66 1.41 1.41"/><path d="m2 12h2"/><path d="m20 12h2"/><path d="m6.34 17.66-1.41 1.41"/><path d="m19.07 4.93-1.41 1.41"/></svg>
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](https://spdx.org/licenses/MIT.html) license.
Raw data
{
"_id": null,
"home_page": null,
"name": "lucide-fasthtml",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "fasthtml, icons, lucide",
"author": null,
"author_email": "Curtis Allan <curtisjallan98@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/41/28/00e7cf45c953b8c36559225800de2c47204c3f2fb6c756aaef3ed7069d08/lucide_fasthtml-0.0.9.tar.gz",
"platform": null,
"description": "# lucide-fasthtml\n\n*Any use of the code retrieved from lucide.dev is subject to the terms of the Lucide license, found [here](https://lucide.dev/license).*\n\n[![PyPI - Version](https://img.shields.io/pypi/v/lucide-fasthtml.svg)](https://pypi.org/project/lucide-fasthtml)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/lucide-fasthtml.svg)](https://pypi.org/project/lucide-fasthtml)\n\nA 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:\n\n- Full tree-shaking support - only saves the icons you use. \n- Client-side `script` retrieval on cache-miss\n- Streamlined attribute handling for full customization (mimics [lucide-react](https://lucide.dev/guide/packages/lucide-react))\n- On-demand download/save of icons. Downloaded on first call and stored in a dict within the package.\n- Immediate icon retrieval on cache-hit (SSR)\n-----\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [Customization](#customization)\n- [License](#license)\n\n## Installation\n\n```console\npip install lucide-fasthtml\n```\n\n## Usage\n\n```python\nfrom lucide_fasthtml import Lucide\n\nLucide(\"sun\") # or Lucide(icon=\"sun\")\n```\n<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-sun\"><circle cx=\"12\" cy=\"12\" r=\"4\"/><path d=\"M12 2v2\"/><path d=\"M12 20v2\"/><path d=\"m4.93 4.93 1.41 1.41\"/><path d=\"m17.66 17.66 1.41 1.41\"/><path d=\"m2 12h2\"/><path d=\"m20 12h2\"/><path d=\"m6.34 17.66-1.41 1.41\"/><path d=\"m19.07 4.93-1.41 1.41\"/></svg>\n\n## Customization\n\nSupports all standard svg attributes. Defaults are set to the standard defaults found at [lucide.dev](https://lucide.dev). For ease of use, streamlined attributes used by `lucide-react` are also supported in a FastHTML-compatible format.\n\n| lucide-react | lucide-fasthtml | notes |\n| ------------- | --------------- | ----- |\n| `color=\"red\"` | `color=\"red\"` | Can be used instead of `stroke`. Sets the color of the icon stroke. |\n| `strokeWidth=\"2\"` | `stroke_width=\"2\"` | Sets the stroke width of the icon. |\n| `absoluteStrokeWidth=True` | `absolute_sw=True` | Calculates the stroke width based on the icon's size, to standardize the stroke width across different icon sizes. |\n| `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. |\n\n```python\nLucide(\"sun\", color=\"red\", stroke_width=\"1.5\", absolute_sw=True, size=16)\n```\n<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"red\" stroke-width=\"3\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"4\"/><path d=\"M12 2v2\"/><path d=\"M12 20v2\"/><path d=\"m4.93 4.93 1.41 1.41\"/><path d=\"m17.66 17.66 1.41 1.41\"/><path d=\"m2 12h2\"/><path d=\"m20 12h2\"/><path d=\"m6.34 17.66-1.41 1.41\"/><path d=\"m19.07 4.93-1.41 1.41\"/></svg>\n\nAll 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.\n\n## License\n\n`lucide-fasthtml` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.\n",
"bugtrack_url": null,
"license": null,
"summary": "Lucide icons for FastHTML",
"version": "0.0.9",
"project_urls": {
"Documentation": "https://github.com/curtis-allan/lucide-fasthtml#readme",
"Issues": "https://github.com/curtis-allan/lucide-fasthtml/issues",
"Source": "https://github.com/curtis-allan/lucide-fasthtml"
},
"split_keywords": [
"fasthtml",
" icons",
" lucide"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "b870ff9a003fe4dff2127b5d0ee5b8995caa85f9e6b8e9751064d4ddaf2fb53d",
"md5": "ece18003fb7a48696bebb7eb1d14532b",
"sha256": "edbe27a7ac7a3be46aefe8db8319a2afc283ca1f1245f1fb029a3768388ed9bc"
},
"downloads": -1,
"filename": "lucide_fasthtml-0.0.9-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ece18003fb7a48696bebb7eb1d14532b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 5942,
"upload_time": "2024-09-10T03:56:33",
"upload_time_iso_8601": "2024-09-10T03:56:33.476295Z",
"url": "https://files.pythonhosted.org/packages/b8/70/ff9a003fe4dff2127b5d0ee5b8995caa85f9e6b8e9751064d4ddaf2fb53d/lucide_fasthtml-0.0.9-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "412800e7cf45c953b8c36559225800de2c47204c3f2fb6c756aaef3ed7069d08",
"md5": "042b77b64d8cffcde93f540317a9fd30",
"sha256": "60f25c1edd7a298516f762912765f278b0d7a18a51f8893eb40b36b224246caa"
},
"downloads": -1,
"filename": "lucide_fasthtml-0.0.9.tar.gz",
"has_sig": false,
"md5_digest": "042b77b64d8cffcde93f540317a9fd30",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 6204,
"upload_time": "2024-09-10T03:56:35",
"upload_time_iso_8601": "2024-09-10T03:56:35.043961Z",
"url": "https://files.pythonhosted.org/packages/41/28/00e7cf45c953b8c36559225800de2c47204c3f2fb6c756aaef3ed7069d08/lucide_fasthtml-0.0.9.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-10 03:56:35",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "curtis-allan",
"github_project": "lucide-fasthtml#readme",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "lucide-fasthtml"
}