Catalog PyPI
PACKAGE EXPLORERView in registry

6cons

PyPI

Lucide icons as native PyReact SVG components

componentsiconslucideprpmpyreactsvg
Versions collected1
Direct dependencies5From release 0.1.0
Last observed20 Oct, 16:07 UTC

README

Version 0.1.0 documentation

6cons

Lucide icons as native PyReact SVG components.

PyPI Python PyReact Lucide License: ISC

6cons adapts the complete Lucide icon catalog to PyReact. Every icon is a Python function that returns an SVG VNode, so it works with composition, events, SSR, accessibility attributes, and UIKitPR utility classes without a JavaScript runtime.

This project is an independent community port. It is not affiliated with or endorsed by the Lucide maintainers.

Installation with PRPM

prpm add 6cons

Installation with pip is also supported:

python -m pip install 6cons

The distribution is named 6cons; the Python import package is sixcons because Python identifiers cannot start with a digit.

Quick start

from sixcons.icons import CircleCheck, Search


def Toolbar(props):
    return Search(
        size=20,
        color="currentColor",
        stroke_width=1.75,
        class_name="text-primary",
        label="Search",
    )


status = CircleCheck(size=24, color="#16a34a")

Use any icon by its Lucide name when a dynamic lookup is more convenient:

from sixcons import icon

settings_icon = icon("settings", size=18)

Named components also work through PyReact's h():

from pyreact import h
from sixcons.icons import Bell

node = h(Bell, {"size": 20, "label": "Notifications"})

API

icon(name, props=None, **attributes)

Creates an SVG VNode for a kebab-case Lucide icon name.

Common options:

OptionDefaultDescription
size24SVG width and height
color"currentColor"Stroke color
stroke_width2Stroke width
absolute_stroke_widthFalseKeep the visual stroke constant when resizing
class_name / className—Additional CSS classes
label—Accessible label; otherwise the icon is decorative

All other attributes, including events, data-*, aria-*, and style, are forwarded to the root SVG VNode.

Catalog helpers

from sixcons import get_icon_data, icon_names, search_icons

all_names = icon_names()
matches = search_icons("arrow")
nodes = get_icon_data("search")

Server-side rendering

from pyreact import render_to_static_markup
from sixcons.icons import Heart

html = render_to_static_markup(Heart(size=32, color="red", label="Favorite"))

Updating from Lucide

The generated catalog is pinned to Lucide 1.27.0 at commit 4aec3f892fd6c23063bc2fead83c899b5d412b1c.

To regenerate from a local Lucide checkout:

python scripts/sync_lucide.py \
  --source ../lucide/icons \
  --version 1.27.0 \
  --commit 4aec3f892fd6c23063bc2fead83c899b5d412b1c

The generator validates every SVG and produces deterministic catalog and component modules.

Development

python -m pip install -e ".[dev]"
python -m pytest
python -m build
python -m twine check dist/*

License and attribution

The icon data is derived from Lucide, released under the ISC License. Icons inherited from Feather are covered by the MIT License. The complete upstream notices are preserved in LICENSE.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.1.027 Jul 20265

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
wanbnn/6cons

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 16:07 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:ea45674caa65674fb57956af7e87c890b07e9a657a9c557b2579bc551be47af3