python-lucide 0.2.23__tar.gz → 0.2.28__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: python-lucide
3
- Version: 0.2.23
3
+ Version: 0.2.28
4
4
  Summary: A Python package for working with Lucide icons
5
5
  Keywords: lucide,icons,svg,sqlite
6
6
  Author: Mike Macpherson
@@ -83,6 +83,35 @@ lucide_icon("user", stroke="#ff6b6b") # Hex colors work too
83
83
 
84
84
  ## Framework Integration Examples
85
85
 
86
+ ### Starlette
87
+ ```python
88
+ from starlette.applications import Starlette
89
+ from starlette.responses import Response
90
+ from starlette.routing import Route
91
+ from lucide import lucide_icon
92
+
93
+ def icon(request):
94
+ icon_name = request.path_params["icon_name"]
95
+ svg = lucide_icon(icon_name, cls="icon", stroke="currentColor")
96
+ return Response(svg, media_type="image/svg+xml")
97
+
98
+ app = Starlette(routes=[Route("/icons/{icon_name}", icon)])
99
+ ```
100
+
101
+ ### FastAPI
102
+ ```python
103
+ from fastapi import FastAPI
104
+ from fastapi.responses import Response
105
+ from lucide import lucide_icon
106
+
107
+ app = FastAPI()
108
+
109
+ @app.get("/icons/{icon_name}")
110
+ def get_icon(icon_name: str, size: int = 24, color: str = "currentColor"):
111
+ svg = lucide_icon(icon_name, width=size, height=size, stroke=color)
112
+ return Response(content=svg, media_type="image/svg+xml")
113
+ ```
114
+
86
115
  ### FastHTML
87
116
  ```python
88
117
  from fasthtml.common import *
@@ -137,20 +166,6 @@ def icon(name, **kwargs):
137
166
  return mark_safe(lucide_icon(name, **kwargs))
138
167
  ```
139
168
 
140
- ### FastAPI
141
- ```python
142
- from fastapi import FastAPI
143
- from fastapi.responses import Response
144
- from lucide import lucide_icon
145
-
146
- app = FastAPI()
147
-
148
- @app.get("/icons/{icon_name}")
149
- def get_icon(icon_name: str, size: int = 24, color: str = "currentColor"):
150
- svg = lucide_icon(icon_name, width=size, height=size, stroke=color)
151
- return Response(content=svg, media_type="image/svg+xml")
152
- ```
153
-
154
169
  ## API Reference
155
170
 
156
171
  ### `lucide_icon()`
@@ -60,6 +60,35 @@ lucide_icon("user", stroke="#ff6b6b") # Hex colors work too
60
60
 
61
61
  ## Framework Integration Examples
62
62
 
63
+ ### Starlette
64
+ ```python
65
+ from starlette.applications import Starlette
66
+ from starlette.responses import Response
67
+ from starlette.routing import Route
68
+ from lucide import lucide_icon
69
+
70
+ def icon(request):
71
+ icon_name = request.path_params["icon_name"]
72
+ svg = lucide_icon(icon_name, cls="icon", stroke="currentColor")
73
+ return Response(svg, media_type="image/svg+xml")
74
+
75
+ app = Starlette(routes=[Route("/icons/{icon_name}", icon)])
76
+ ```
77
+
78
+ ### FastAPI
79
+ ```python
80
+ from fastapi import FastAPI
81
+ from fastapi.responses import Response
82
+ from lucide import lucide_icon
83
+
84
+ app = FastAPI()
85
+
86
+ @app.get("/icons/{icon_name}")
87
+ def get_icon(icon_name: str, size: int = 24, color: str = "currentColor"):
88
+ svg = lucide_icon(icon_name, width=size, height=size, stroke=color)
89
+ return Response(content=svg, media_type="image/svg+xml")
90
+ ```
91
+
63
92
  ### FastHTML
64
93
  ```python
65
94
  from fasthtml.common import *
@@ -114,20 +143,6 @@ def icon(name, **kwargs):
114
143
  return mark_safe(lucide_icon(name, **kwargs))
115
144
  ```
116
145
 
117
- ### FastAPI
118
- ```python
119
- from fastapi import FastAPI
120
- from fastapi.responses import Response
121
- from lucide import lucide_icon
122
-
123
- app = FastAPI()
124
-
125
- @app.get("/icons/{icon_name}")
126
- def get_icon(icon_name: str, size: int = 24, color: str = "currentColor"):
127
- svg = lucide_icon(icon_name, width=size, height=size, stroke=color)
128
- return Response(content=svg, media_type="image/svg+xml")
129
- ```
130
-
131
146
  ## API Reference
132
147
 
133
148
  ### `lucide_icon()`
@@ -1,6 +1,6 @@
1
1
  [build-system]
2
2
  build-backend = "uv_build"
3
- requires = ["uv_build>=0.8.3,<0.11.0"]
3
+ requires = ["uv_build>=0.8.3,<0.12.0"]
4
4
 
5
5
  [dependency-groups]
6
6
  dev = [
@@ -35,7 +35,7 @@ license = {text = "MIT"}
35
35
  name = "python-lucide"
36
36
  readme = "README.md"
37
37
  requires-python = ">=3.10"
38
- version = "0.2.23"
38
+ version = "0.2.28"
39
39
 
40
40
  [project.scripts]
41
41
  check-lucide-version = "lucide.dev_utils:print_version_status"
@@ -4,7 +4,7 @@ This module contains default configuration values used throughout the package.
4
4
  """
5
5
 
6
6
  # Default Lucide tag to use when building the icon database
7
- DEFAULT_LUCIDE_TAG = "0.577.0"
7
+ DEFAULT_LUCIDE_TAG = "1.17.0"
8
8
 
9
9
  # Default size for the LRU cache used by lucide_icon function
10
10
  DEFAULT_ICON_CACHE_SIZE = 128
index e5959a1..5328969 100644
Binary file