Skip to main content

Lucide Icons integration for the Asok framework.

Project description

Asok Logo + Lucide Logo

asok-lucide

PyPI version

Lucide Icons integration for the Asok Framework.

Render beautiful Lucide Icons server-side with zero client-side JavaScript overhead.

Resources

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):

  1. Run the update script to fetch and resolve all icon definitions & aliases from Iconify:
    python scripts/fetch_icons.py
    
  2. Run the test suite to verify everything still renders correctly:
    python -m pytest tests
    
  3. Commit the updated lucide-icons.json to Git.

Releases & GitHub Actions

A GitHub Actions workflow is configured in .github/workflows/release.yml. When you publish a release on GitHub:

  1. The workflow checks out the repository (which contains the committed lucide-icons.json data).
  2. It builds the wheel and source distributions.
  3. It automatically publishes the package to PyPI using PyPI's Trusted Publishing OIDC integration.

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

asok_lucide-1.0.1.tar.gz (90.6 kB view details)

Uploaded Source

Built Distribution

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

asok_lucide-1.0.1-py3-none-any.whl (89.2 kB view details)

Uploaded Python 3

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

Hashes for asok_lucide-1.0.1.tar.gz
Algorithm Hash digest
SHA256 f22b70fdb1dd8e35ea3e52976e4a05cbe396606acc295bc72ff92c3762ae1a0f
MD5 5f32e9515c858268b5409f8300305cbb
BLAKE2b-256 9f43a98488e3fcfa4b37d0ec3c03a240a9af6ccaeb84261936318b5c6fb33714

See more details on using hashes here.

Provenance

The following attestation bundles were made for asok_lucide-1.0.1.tar.gz:

Publisher: release.yml on codewithmpia/asok-lucide

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for asok_lucide-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 77c7415db5227580e0d2605a5627758c2821c6deaaf6d8c060e2596c0fc3db4e
MD5 9482bc823086bcb36c1740b7878439da
BLAKE2b-256 e2514af3c09df2a6c6418c71ae861e589fce3e180c5a2b4ec48fb09ce9828bd7

See more details on using hashes here.

Provenance

The following attestation bundles were made for asok_lucide-1.0.1-py3-none-any.whl:

Publisher: release.yml on codewithmpia/asok-lucide

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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