streamlit-kanban 1.0.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.
Potentially problematic release.
This version of streamlit-kanban might be problematic. Click here for more details.
- streamlit_kanban-1.0.0/LICENSE +19 -0
- streamlit_kanban-1.0.0/MANIFEST.in +1 -0
- streamlit_kanban-1.0.0/PKG-INFO +65 -0
- streamlit_kanban-1.0.0/README.md +46 -0
- streamlit_kanban-1.0.0/setup.cfg +4 -0
- streamlit_kanban-1.0.0/setup.py +37 -0
- streamlit_kanban-1.0.0/streamlit_kanban/__init__.py +47 -0
- streamlit_kanban-1.0.0/streamlit_kanban/example.py +30 -0
- streamlit_kanban-1.0.0/streamlit_kanban/frontend/build/asset-manifest.json +10 -0
- streamlit_kanban-1.0.0/streamlit_kanban/frontend/build/bootstrap.min.css +9501 -0
- streamlit_kanban-1.0.0/streamlit_kanban/frontend/build/index.html +1 -0
- streamlit_kanban-1.0.0/streamlit_kanban/frontend/build/static/js/main.aae672ad.js +3 -0
- streamlit_kanban-1.0.0/streamlit_kanban/frontend/build/static/js/main.aae672ad.js.LICENSE.txt +59 -0
- streamlit_kanban-1.0.0/streamlit_kanban/frontend/build/static/js/main.aae672ad.js.map +1 -0
- streamlit_kanban-1.0.0/streamlit_kanban.egg-info/PKG-INFO +65 -0
- streamlit_kanban-1.0.0/streamlit_kanban.egg-info/SOURCES.txt +17 -0
- streamlit_kanban-1.0.0/streamlit_kanban.egg-info/dependency_links.txt +1 -0
- streamlit_kanban-1.0.0/streamlit_kanban.egg-info/requires.txt +9 -0
- streamlit_kanban-1.0.0/streamlit_kanban.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Copyright (c) 2018-2021 Streamlit Inc.
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
5
|
+
in the Software without restriction, including without limitation the rights
|
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
8
|
+
furnished to do so, subject to the following conditions:
|
|
9
|
+
|
|
10
|
+
The above copyright notice and this permission notice shall be included in all
|
|
11
|
+
copies or substantial portions of the Software.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
19
|
+
SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
recursive-include streamlit_kanban/frontend/build *
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: streamlit-kanban
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: This streamlit component uses react beautiful dnd to provide you a kanban structure where you can create dinamically the kanban columns and cards with also dynamic fields
|
|
5
|
+
Home-page:
|
|
6
|
+
Author: Andre Scudiere
|
|
7
|
+
Author-email: andrescudiere@gmail.com
|
|
8
|
+
Requires-Python: >=3.12
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Requires-Dist: streamlit>=1.4
|
|
12
|
+
Provides-Extra: devel
|
|
13
|
+
Requires-Dist: wheel; extra == "devel"
|
|
14
|
+
Requires-Dist: pytest==7.4.0; extra == "devel"
|
|
15
|
+
Requires-Dist: playwright==1.48.0; extra == "devel"
|
|
16
|
+
Requires-Dist: requests==2.31.0; extra == "devel"
|
|
17
|
+
Requires-Dist: pytest-playwright-snapshot==1.0; extra == "devel"
|
|
18
|
+
Requires-Dist: pytest-rerunfailures==12.0; extra == "devel"
|
|
19
|
+
|
|
20
|
+
# streamlit-custom-component
|
|
21
|
+
|
|
22
|
+
Streamlit component that allows you to render a Kanban Board in the Screen and Retrive User Updates
|
|
23
|
+
|
|
24
|
+
## Installation instructions
|
|
25
|
+
|
|
26
|
+
```sh
|
|
27
|
+
pip install streamlit-kanban
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Important!
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
This should be used with session state to hold the current state of the kanban,
|
|
34
|
+
more information you can find in the sample code example.py
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Usage instructions
|
|
38
|
+
|
|
39
|
+
```python
|
|
40
|
+
|
|
41
|
+
#The component should receive a data structure JSON like this sample below:
|
|
42
|
+
|
|
43
|
+
data = {
|
|
44
|
+
"columns": [
|
|
45
|
+
{
|
|
46
|
+
"id": "todo",
|
|
47
|
+
"title": "To Do",
|
|
48
|
+
"cards": [
|
|
49
|
+
{"id": "card-1", "name": "Task 1", "fields": ["Bug"], "color": "#FF5555"},
|
|
50
|
+
{"id": "card-2", "name": "Task 2", "fields": ["Bug"], "color": "#55FF55"},
|
|
51
|
+
],
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"id": "in-progress",
|
|
55
|
+
"title": "In Progress",
|
|
56
|
+
"cards": [
|
|
57
|
+
{"id": "card-3", "name": "Task 3", "fields": ["Bug"], "color": "#5555FF"},
|
|
58
|
+
],
|
|
59
|
+
},
|
|
60
|
+
{"id": "done", "title": "Done", "cards": []},
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
For more example on how to call it please look into example.py file
|
|
65
|
+
```
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# streamlit-custom-component
|
|
2
|
+
|
|
3
|
+
Streamlit component that allows you to render a Kanban Board in the Screen and Retrive User Updates
|
|
4
|
+
|
|
5
|
+
## Installation instructions
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
pip install streamlit-kanban
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Important!
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
This should be used with session state to hold the current state of the kanban,
|
|
15
|
+
more information you can find in the sample code example.py
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Usage instructions
|
|
19
|
+
|
|
20
|
+
```python
|
|
21
|
+
|
|
22
|
+
#The component should receive a data structure JSON like this sample below:
|
|
23
|
+
|
|
24
|
+
data = {
|
|
25
|
+
"columns": [
|
|
26
|
+
{
|
|
27
|
+
"id": "todo",
|
|
28
|
+
"title": "To Do",
|
|
29
|
+
"cards": [
|
|
30
|
+
{"id": "card-1", "name": "Task 1", "fields": ["Bug"], "color": "#FF5555"},
|
|
31
|
+
{"id": "card-2", "name": "Task 2", "fields": ["Bug"], "color": "#55FF55"},
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"id": "in-progress",
|
|
36
|
+
"title": "In Progress",
|
|
37
|
+
"cards": [
|
|
38
|
+
{"id": "card-3", "name": "Task 3", "fields": ["Bug"], "color": "#5555FF"},
|
|
39
|
+
],
|
|
40
|
+
},
|
|
41
|
+
{"id": "done", "title": "Done", "cards": []},
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
For more example on how to call it please look into example.py file
|
|
46
|
+
```
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
|
|
3
|
+
import setuptools
|
|
4
|
+
|
|
5
|
+
this_directory = Path(__file__).parent
|
|
6
|
+
long_description = (this_directory / "README.md").read_text()
|
|
7
|
+
|
|
8
|
+
setuptools.setup(
|
|
9
|
+
name="streamlit-kanban",
|
|
10
|
+
version="1.0.0",
|
|
11
|
+
author="Andre Scudiere",
|
|
12
|
+
author_email="andrescudiere@gmail.com",
|
|
13
|
+
description="This streamlit component uses react beautiful dnd to provide you a kanban structure where you can create dinamically the kanban columns and cards with also dynamic fields",
|
|
14
|
+
long_description=long_description,
|
|
15
|
+
long_description_content_type="text/markdown",
|
|
16
|
+
url="",
|
|
17
|
+
packages=setuptools.find_packages(),
|
|
18
|
+
include_package_data=True,
|
|
19
|
+
classifiers=[],
|
|
20
|
+
python_requires=">=3.12",
|
|
21
|
+
install_requires=[
|
|
22
|
+
# By definition, a Custom Component depends on Streamlit.
|
|
23
|
+
# If your component has other Python dependencies, list
|
|
24
|
+
# them here.
|
|
25
|
+
"streamlit >= 1.4",
|
|
26
|
+
],
|
|
27
|
+
extras_require={
|
|
28
|
+
"devel": [
|
|
29
|
+
"wheel",
|
|
30
|
+
"pytest==7.4.0",
|
|
31
|
+
"playwright==1.48.0",
|
|
32
|
+
"requests==2.31.0",
|
|
33
|
+
"pytest-playwright-snapshot==1.0",
|
|
34
|
+
"pytest-rerunfailures==12.0",
|
|
35
|
+
]
|
|
36
|
+
}
|
|
37
|
+
)
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import streamlit.components.v1 as components
|
|
3
|
+
|
|
4
|
+
# Create a _RELEASE constant. We'll set this to False while we're developing
|
|
5
|
+
# the component, and True when we're ready to package and distribute it.
|
|
6
|
+
# (This is, of course, optional - there are innumerable ways to manage your
|
|
7
|
+
# release process.)
|
|
8
|
+
_RELEASE = True
|
|
9
|
+
|
|
10
|
+
# Declare a Streamlit component. `declare_component` returns a function
|
|
11
|
+
# that is used to create instances of the component. We're naming this
|
|
12
|
+
# function "_component_func", with an underscore prefix, because we don't want
|
|
13
|
+
# to expose it directly to users. Instead, we will create a custom wrapper
|
|
14
|
+
# function, below, that will serve as our component's public API.
|
|
15
|
+
|
|
16
|
+
# It's worth noting that this call to `declare_component` is the
|
|
17
|
+
# *only thing* you need to do to create the binding between Streamlit and
|
|
18
|
+
# your component frontend. Everything else we do in this file is simply a
|
|
19
|
+
# best practice.
|
|
20
|
+
|
|
21
|
+
if not _RELEASE:
|
|
22
|
+
_kanban = components.declare_component(
|
|
23
|
+
# We give the component a simple, descriptive name ("my_component"
|
|
24
|
+
# does not fit this bill, so please choose something better for your
|
|
25
|
+
# own component :)
|
|
26
|
+
"kanban",
|
|
27
|
+
# Pass `url` here to tell Streamlit that the component will be served
|
|
28
|
+
# by the local dev server that you run via `npm run start`.
|
|
29
|
+
# (This is useful while your component is in development.)
|
|
30
|
+
url="http://localhost:3001",
|
|
31
|
+
)
|
|
32
|
+
else:
|
|
33
|
+
# When we're distributing a production version of the component, we'll
|
|
34
|
+
# replace the `url` param with `path`, and point it to the component's
|
|
35
|
+
# build directory:
|
|
36
|
+
parent_dir = os.path.dirname(os.path.abspath(__file__))
|
|
37
|
+
build_dir = os.path.join(parent_dir, "frontend/build")
|
|
38
|
+
_kanban = components.declare_component("kanban", path=build_dir)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
# Create a wrapper function for the component. This is an optional
|
|
42
|
+
# best practice - we could simply expose the component function returned by
|
|
43
|
+
# `declare_component` and call it done. The wrapper allows us to customize
|
|
44
|
+
# our component's API: we can pre-process its input args, post-process its
|
|
45
|
+
# output value, and add a docstring for users.
|
|
46
|
+
def kanban(columns, key=None):
|
|
47
|
+
return _kanban(columns=columns, key=key)
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import streamlit as st
|
|
2
|
+
import streamlit_kanban
|
|
3
|
+
|
|
4
|
+
# Add some test code to play with the component while it's in development.
|
|
5
|
+
# During development, we can run this just as we would any other Streamlit
|
|
6
|
+
# app: `$ streamlit run my_component/example.py`
|
|
7
|
+
|
|
8
|
+
st.subheader("Component with constant args")
|
|
9
|
+
|
|
10
|
+
# Create an instance of our component with a constant `name` arg, and
|
|
11
|
+
# print its output value.
|
|
12
|
+
|
|
13
|
+
# num_clicks = Kanban("World")
|
|
14
|
+
# st.markdown("You've clicked %s times!" % int(num_clicks))
|
|
15
|
+
|
|
16
|
+
# st.markdown("---")
|
|
17
|
+
# st.subheader("Component with variable args")
|
|
18
|
+
|
|
19
|
+
# Create a second instance of our component whose `name` arg will vary
|
|
20
|
+
# based on a text_input widget.
|
|
21
|
+
#
|
|
22
|
+
# We use the special "key" argument to assign a fixed identity to this
|
|
23
|
+
# component instance. By default, when a component's arguments change,
|
|
24
|
+
# it is considered a new instance and will be re-mounted on the frontend
|
|
25
|
+
# and lose its current state. In this case, we want to vary the component's
|
|
26
|
+
# "name" argument without having it get recreated.
|
|
27
|
+
|
|
28
|
+
# name_input = st.text_input("Enter a name", value="Streamlit")
|
|
29
|
+
# num_clicks = Kanban(name_input, key="foo")
|
|
30
|
+
# st.markdown("You've clicked %s times!" % int(num_clicks))
|