streamlit-kanban 0.1.0__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.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Your Name
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1 @@
1
+ recursive-include streamlit_kanban/frontend/build *
@@ -0,0 +1,142 @@
1
+ Metadata-Version: 2.4
2
+ Name: streamlit-kanban
3
+ Version: 0.1.0
4
+ Summary: A drag-and-drop Kanban board component for Streamlit
5
+ Home-page: https://github.com/RhythrosaLabs/streamlit-kanban
6
+ Author: Your Name
7
+ Author-email: you@example.com
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Operating System :: OS Independent
11
+ Requires-Python: >=3.8
12
+ Description-Content-Type: text/markdown
13
+ License-File: LICENSE
14
+ Requires-Dist: streamlit>=1.28.0
15
+ Dynamic: author
16
+ Dynamic: author-email
17
+ Dynamic: classifier
18
+ Dynamic: description
19
+ Dynamic: description-content-type
20
+ Dynamic: home-page
21
+ Dynamic: license-file
22
+ Dynamic: requires-dist
23
+ Dynamic: requires-python
24
+ Dynamic: summary
25
+
26
+ # streamlit-kanban
27
+
28
+ A drag-and-drop Kanban board component for Streamlit. Move cards between columns, add and edit cards with tags and priority levels, and get the full board state back as JSON.
29
+
30
+ ![Kanban screenshot](https://raw.githubusercontent.com/RhythrosaLabs/streamlit-kanban/main/docs/screenshot.png)
31
+
32
+ ## Features
33
+
34
+ - Drag-and-drop cards between columns (native HTML5, no external DnD lib)
35
+ - Click any card to edit title, tag, and priority
36
+ - Add cards to any column
37
+ - Color-coded tag and priority badges
38
+ - Progress bar tracking Done / Total
39
+ - Export board state as JSON
40
+ - Zero runtime dependencies beyond Streamlit
41
+
42
+ ## Installation
43
+
44
+ ```bash
45
+ pip install streamlit-kanban
46
+ ```
47
+
48
+ ## Quickstart
49
+
50
+ ```python
51
+ import streamlit as st
52
+ from streamlit_kanban import st_kanban
53
+
54
+ columns = [
55
+ {
56
+ "id": "todo",
57
+ "title": "To Do",
58
+ "color": "#6366f1",
59
+ "cards": [
60
+ {"id": "c1", "title": "Write tests", "tag": "Dev", "priority": "high"},
61
+ {"id": "c2", "title": "Update docs", "tag": "Docs", "priority": "low"},
62
+ ],
63
+ },
64
+ {
65
+ "id": "in-progress",
66
+ "title": "In Progress",
67
+ "color": "#f59e0b",
68
+ "cards": [
69
+ {"id": "c3", "title": "Build auth flow", "tag": "Dev", "priority": "high"},
70
+ ],
71
+ },
72
+ {
73
+ "id": "done",
74
+ "title": "Done",
75
+ "color": "#10b981",
76
+ "cards": [],
77
+ },
78
+ ]
79
+
80
+ st.title("My Project Board")
81
+
82
+ if "board" not in st.session_state:
83
+ st.session_state.board = columns
84
+
85
+ result = st_kanban(st.session_state.board, key="kanban")
86
+
87
+ if result:
88
+ st.session_state.board = result
89
+ ```
90
+
91
+ ## API
92
+
93
+ ```python
94
+ st_kanban(columns, key=None)
95
+ ```
96
+
97
+ | Parameter | Type | Description |
98
+ |-----------|------|-------------|
99
+ | `columns` | `list[dict]` | Column definitions (see schema below) |
100
+ | `key` | `str` | Streamlit widget key |
101
+
102
+ **Returns:** Updated `columns` list on any interaction, `None` on first render.
103
+
104
+ ### Column schema
105
+
106
+ ```python
107
+ {
108
+ "id": str, # unique identifier
109
+ "title": str, # display name
110
+ "color": str, # hex accent color for the column dot
111
+ "cards": [
112
+ {
113
+ "id": str, # unique card id
114
+ "title": str, # card text
115
+ "tag": str, # e.g. "Dev", "Design", "Bug"
116
+ "priority": str, # "high" | "medium" | "low"
117
+ }
118
+ ]
119
+ }
120
+ ```
121
+
122
+ ## Development
123
+
124
+ ```bash
125
+ git clone https://github.com/RhythrosaLabs/streamlit-kanban
126
+ cd streamlit-kanban
127
+
128
+ # Frontend
129
+ cd streamlit_kanban/frontend
130
+ npm install
131
+ npm start # dev server on :3001
132
+
133
+ # Python (separate terminal)
134
+ cd ../..
135
+ pip install -e .
136
+ # In streamlit_kanban/__init__.py, set _RELEASE = False
137
+ streamlit run example.py
138
+ ```
139
+
140
+ ## License
141
+
142
+ MIT
@@ -0,0 +1,117 @@
1
+ # streamlit-kanban
2
+
3
+ A drag-and-drop Kanban board component for Streamlit. Move cards between columns, add and edit cards with tags and priority levels, and get the full board state back as JSON.
4
+
5
+ ![Kanban screenshot](https://raw.githubusercontent.com/RhythrosaLabs/streamlit-kanban/main/docs/screenshot.png)
6
+
7
+ ## Features
8
+
9
+ - Drag-and-drop cards between columns (native HTML5, no external DnD lib)
10
+ - Click any card to edit title, tag, and priority
11
+ - Add cards to any column
12
+ - Color-coded tag and priority badges
13
+ - Progress bar tracking Done / Total
14
+ - Export board state as JSON
15
+ - Zero runtime dependencies beyond Streamlit
16
+
17
+ ## Installation
18
+
19
+ ```bash
20
+ pip install streamlit-kanban
21
+ ```
22
+
23
+ ## Quickstart
24
+
25
+ ```python
26
+ import streamlit as st
27
+ from streamlit_kanban import st_kanban
28
+
29
+ columns = [
30
+ {
31
+ "id": "todo",
32
+ "title": "To Do",
33
+ "color": "#6366f1",
34
+ "cards": [
35
+ {"id": "c1", "title": "Write tests", "tag": "Dev", "priority": "high"},
36
+ {"id": "c2", "title": "Update docs", "tag": "Docs", "priority": "low"},
37
+ ],
38
+ },
39
+ {
40
+ "id": "in-progress",
41
+ "title": "In Progress",
42
+ "color": "#f59e0b",
43
+ "cards": [
44
+ {"id": "c3", "title": "Build auth flow", "tag": "Dev", "priority": "high"},
45
+ ],
46
+ },
47
+ {
48
+ "id": "done",
49
+ "title": "Done",
50
+ "color": "#10b981",
51
+ "cards": [],
52
+ },
53
+ ]
54
+
55
+ st.title("My Project Board")
56
+
57
+ if "board" not in st.session_state:
58
+ st.session_state.board = columns
59
+
60
+ result = st_kanban(st.session_state.board, key="kanban")
61
+
62
+ if result:
63
+ st.session_state.board = result
64
+ ```
65
+
66
+ ## API
67
+
68
+ ```python
69
+ st_kanban(columns, key=None)
70
+ ```
71
+
72
+ | Parameter | Type | Description |
73
+ |-----------|------|-------------|
74
+ | `columns` | `list[dict]` | Column definitions (see schema below) |
75
+ | `key` | `str` | Streamlit widget key |
76
+
77
+ **Returns:** Updated `columns` list on any interaction, `None` on first render.
78
+
79
+ ### Column schema
80
+
81
+ ```python
82
+ {
83
+ "id": str, # unique identifier
84
+ "title": str, # display name
85
+ "color": str, # hex accent color for the column dot
86
+ "cards": [
87
+ {
88
+ "id": str, # unique card id
89
+ "title": str, # card text
90
+ "tag": str, # e.g. "Dev", "Design", "Bug"
91
+ "priority": str, # "high" | "medium" | "low"
92
+ }
93
+ ]
94
+ }
95
+ ```
96
+
97
+ ## Development
98
+
99
+ ```bash
100
+ git clone https://github.com/RhythrosaLabs/streamlit-kanban
101
+ cd streamlit-kanban
102
+
103
+ # Frontend
104
+ cd streamlit_kanban/frontend
105
+ npm install
106
+ npm start # dev server on :3001
107
+
108
+ # Python (separate terminal)
109
+ cd ../..
110
+ pip install -e .
111
+ # In streamlit_kanban/__init__.py, set _RELEASE = False
112
+ streamlit run example.py
113
+ ```
114
+
115
+ ## License
116
+
117
+ MIT
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,21 @@
1
+ from setuptools import setup, find_packages
2
+
3
+ setup(
4
+ name="streamlit-kanban",
5
+ version="0.1.0",
6
+ author="Your Name",
7
+ author_email="you@example.com",
8
+ description="A drag-and-drop Kanban board component for Streamlit",
9
+ long_description=open("README.md").read(),
10
+ long_description_content_type="text/markdown",
11
+ url="https://github.com/RhythrosaLabs/streamlit-kanban",
12
+ packages=find_packages(),
13
+ include_package_data=True,
14
+ classifiers=[
15
+ "Programming Language :: Python :: 3",
16
+ "License :: OSI Approved :: MIT License",
17
+ "Operating System :: OS Independent",
18
+ ],
19
+ python_requires=">=3.8",
20
+ install_requires=["streamlit>=1.28.0"],
21
+ )
@@ -0,0 +1,49 @@
1
+ import os
2
+ import streamlit.components.v1 as components
3
+
4
+ _RELEASE = True
5
+
6
+ if _RELEASE:
7
+ _component_func = components.declare_component(
8
+ "streamlit_kanban",
9
+ path=os.path.join(os.path.dirname(__file__), "frontend/build"),
10
+ )
11
+ else:
12
+ _component_func = components.declare_component(
13
+ "streamlit_kanban",
14
+ url="http://localhost:3001",
15
+ )
16
+
17
+
18
+ def st_kanban(columns, key=None):
19
+ """
20
+ Render an interactive Kanban board.
21
+
22
+ Parameters
23
+ ----------
24
+ columns : list[dict]
25
+ List of column definitions. Each dict has:
26
+ - id (str): unique column identifier
27
+ - title (str): display name
28
+ - color (str): hex accent color
29
+ - cards (list[dict]): each card has id, title, tag, priority
30
+ key : str, optional
31
+ Streamlit widget key for state isolation.
32
+
33
+ Returns
34
+ -------
35
+ list[dict] | None
36
+ Updated columns structure after user interaction, or None on first render.
37
+
38
+ Example
39
+ -------
40
+ >>> columns = [
41
+ ... {"id": "todo", "title": "To Do", "color": "#6366f1",
42
+ ... "cards": [{"id": "c1", "title": "Fix bug", "tag": "Dev", "priority": "high"}]},
43
+ ... {"id": "done", "title": "Done", "color": "#10b981", "cards": []},
44
+ ... ]
45
+ >>> result = st_kanban(columns, key="board")
46
+ >>> if result:
47
+ ... st.write(result) # updated board state
48
+ """
49
+ return _component_func(columns=columns, key=key, default=None)
@@ -0,0 +1,10 @@
1
+ {
2
+ "files": {
3
+ "main.js": "./static/js/main.c0d76036.js",
4
+ "index.html": "./index.html",
5
+ "main.c0d76036.js.map": "./static/js/main.c0d76036.js.map"
6
+ },
7
+ "entrypoints": [
8
+ "static/js/main.c0d76036.js"
9
+ ]
10
+ }
@@ -0,0 +1 @@
1
+ <!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><title>Streamlit Kanban</title><script defer="defer" src="./static/js/main.c0d76036.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>