Lucide Icons integration for the Asok framework.
Project description
asok-lucide
Lucide Icons integration for the Asok Framework.
Render beautiful Lucide Icons server-side with zero client-side JavaScript overhead.
Resources
- PyPI Project: pypi.org/project/asok-lucide
- Asok Framework: asok-framework.com
- Asok Repository: github.com/asok-framework/asok
- Lucide Icons: lucide.dev
Installation
pip install asok-lucide
For development or contributing, install in editable mode:
pip install -e .
Setup
Register the extension in your app.py:
from asok import Asok
from asok_lucide import AsokLucideExtension
app = Asok()
app.register_extension(AsokLucideExtension)
You can optionally configure a custom alias (e.g. icon) to shorten the template helper name:
app.register_extension(AsokLucideExtension(alias="icon"))
Usage
Direct template helper
<button>
{{ lucide("shopping-cart", class_="w-5 h-5 text-white") }}
<span>Add to Cart</span>
</button>
Or using the custom alias (if registered):
{{ icon("user", class_="w-6 h-6") }}
Template filter
{{ "home" | lucide(class_="w-6 h-6", stroke_width="1.5") }}
All standard attributes (such as class, stroke-width, stroke, fill, style) can be customized dynamically. Use class_ or snake_case stroke_width in template helpers.
Development & Publishing
Updating the Icon Dataset
The icons are pre-compiled and bundled inside the package (asok_lucide/data/lucide-icons.json) to guarantee fast, deterministic server-side rendering without runtime network dependencies.
To update the bundled Lucide Icons (e.g., when a new Lucide version releases):
- Run the update script to fetch and resolve all icon definitions & aliases from Iconify:
python scripts/fetch_icons.py - Run the test suite to verify everything still renders correctly:
python -m pytest tests
- Commit the updated
lucide-icons.jsonto Git.
Releases & GitHub Actions
A GitHub Actions workflow is configured in .github/workflows/release.yml. When you publish a release on GitHub:
- The workflow checks out the repository (which contains the committed
lucide-icons.jsondata). - It builds the wheel and source distributions.
- It automatically publishes the package to PyPI using PyPI's Trusted Publishing OIDC integration.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file asok_lucide-1.0.1.tar.gz.
File metadata
- Download URL: asok_lucide-1.0.1.tar.gz
- Upload date:
- Size: 90.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f22b70fdb1dd8e35ea3e52976e4a05cbe396606acc295bc72ff92c3762ae1a0f
|
|
| MD5 |
5f32e9515c858268b5409f8300305cbb
|
|
| BLAKE2b-256 |
9f43a98488e3fcfa4b37d0ec3c03a240a9af6ccaeb84261936318b5c6fb33714
|
Provenance
The following attestation bundles were made for asok_lucide-1.0.1.tar.gz:
Publisher:
release.yml on codewithmpia/asok-lucide
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
asok_lucide-1.0.1.tar.gz -
Subject digest:
f22b70fdb1dd8e35ea3e52976e4a05cbe396606acc295bc72ff92c3762ae1a0f - Sigstore transparency entry: 1749139620
- Sigstore integration time:
-
Permalink:
codewithmpia/asok-lucide@8dd716eddee05b82ffb8c0984e0f30ce266a1782 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/codewithmpia
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8dd716eddee05b82ffb8c0984e0f30ce266a1782 -
Trigger Event:
release
-
Statement type:
File details
Details for the file asok_lucide-1.0.1-py3-none-any.whl.
File metadata
- Download URL: asok_lucide-1.0.1-py3-none-any.whl
- Upload date:
- Size: 89.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
77c7415db5227580e0d2605a5627758c2821c6deaaf6d8c060e2596c0fc3db4e
|
|
| MD5 |
9482bc823086bcb36c1740b7878439da
|
|
| BLAKE2b-256 |
e2514af3c09df2a6c6418c71ae861e589fce3e180c5a2b4ec48fb09ce9828bd7
|
Provenance
The following attestation bundles were made for asok_lucide-1.0.1-py3-none-any.whl:
Publisher:
release.yml on codewithmpia/asok-lucide
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
asok_lucide-1.0.1-py3-none-any.whl -
Subject digest:
77c7415db5227580e0d2605a5627758c2821c6deaaf6d8c060e2596c0fc3db4e - Sigstore transparency entry: 1749139723
- Sigstore integration time:
-
Permalink:
codewithmpia/asok-lucide@8dd716eddee05b82ffb8c0984e0f30ce266a1782 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/codewithmpia
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8dd716eddee05b82ffb8c0984e0f30ce266a1782 -
Trigger Event:
release
-
Statement type: