Skip to main content

Lucide Icons integration for the Asok framework.

Project description

Asok Logo + Lucide Logo

asok-lucide

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.0.tar.gz (90.5 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.0-py3-none-any.whl (89.2 kB view details)

Uploaded Python 3

File details

Details for the file asok_lucide-1.0.0.tar.gz.

File metadata

  • Download URL: asok_lucide-1.0.0.tar.gz
  • Upload date:
  • Size: 90.5 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.0.tar.gz
Algorithm Hash digest
SHA256 d3ff2e862555c64f615ffcb07fcd30cb47ad592a09e3edbab5f490061a372a94
MD5 13e0c5bb4ddec2d6068720f05e29461b
BLAKE2b-256 b87dbfbfd7237f8d2798d8609ecbff9d448d92a6668f043fa1629101d862c2fc

See more details on using hashes here.

Provenance

The following attestation bundles were made for asok_lucide-1.0.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: asok_lucide-1.0.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 91db6e995bfe97d14f4df86cd257b971f4381f3a40e8375538662f2f2c7ce22e
MD5 49edad12de73648879b5d23999e4c20d
BLAKE2b-256 22d76a09e8f3b4ce70ba143c91ad5b4ec98d1f2487c3a7a3a3288ae109c53c16

See more details on using hashes here.

Provenance

The following attestation bundles were made for asok_lucide-1.0.0-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