File tree Expand file tree Collapse file tree
cookiecutter/v2/{{ cookiecutter.package_name }}
{{ cookiecutter.import_name }} Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,9 +39,9 @@ To package this component for distribution:
3939 npm run build
4040 ```
4141
42- 2 . Build the Python wheel using UV (from the project root with ` pyproject.toml ` ):
42+ 2 . Build the Python wheel using UV (from the project root):
4343 ``` sh
44- uv run --with build python -m build --wheel
44+ uv build
4545 ```
4646
4747This will create a ` dist/ ` directory containing your wheel. The wheel includes the compiled frontend from ` {{ cookiecutter.import_name }}/frontend/build ` .
Original file line number Diff line number Diff line change @@ -9,8 +9,7 @@ description = "{{ cookiecutter.description }}"
99readme = " README.md"
1010requires-python = " >=3.10"
1111authors = [{ name = " {{ cookiecutter.author_name }}" , email = " {{ cookiecutter.author_email }}" }]
12- # TODO: Restore this
13- # dependencies = ["streamlit >= 1.51"]
12+ dependencies = [" streamlit >= 1.51" ]
1413
1514[project .optional-dependencies ]
1615devel = [
@@ -33,7 +32,3 @@ include-package-data = true
3332
3433[tool .setuptools .package-data ]
3534{{ cookiecutter.import_name }} = ["frontend/build/**/*", "pyproject.toml"]
36-
37- [[tool .streamlit .component .components ]]
38- name = " {{ cookiecutter.import_name }}"
39- asset_dir = " {{ cookiecutter.import_name }}/frontend/build"
Original file line number Diff line number Diff line change 1+ # Ship a minimal metadata file that can be picked up by Streamlit at runtime.
2+ [project ]
3+ name = " {{ cookiecutter.package_name }}"
4+ version = " 0.0.1"
5+
6+ [[tool .streamlit .component .components ]]
7+ name = " {{ cookiecutter.import_name }}"
8+ asset_dir = " frontend/build"
Original file line number Diff line number Diff line change @@ -39,9 +39,9 @@ To package this component for distribution:
3939 npm run build
4040 ```
4141
42- 2 . Build the Python wheel using UV (from the project root with ` pyproject.toml ` ):
42+ 2 . Build the Python wheel using UV (from the project root):
4343 ``` sh
44- uv run --with build python -m build --wheel
44+ uv build
4545 ```
4646
4747This will create a ` dist/ ` directory containing your wheel. The wheel includes the compiled frontend from ` my_component/frontend/build ` .
Original file line number Diff line number Diff line change 1+ # Ship a minimal metadata file that can be picked up by Streamlit at runtime.
2+ [project ]
3+ name = " streamlit-custom-component"
4+ version = " 0.0.1"
5+
6+ [[tool .streamlit .component .components ]]
7+ name = " my_component"
8+ asset_dir = " frontend/build"
Original file line number Diff line number Diff line change @@ -9,8 +9,7 @@ description = "Streamlit component that allows you to do X"
99readme = " README.md"
1010requires-python = " >=3.10"
1111authors = [{ name = " John Smith" , email = " john@example.com" }]
12- # TODO: Restore this
13- # dependencies = ["streamlit >= 1.51"]
12+ dependencies = [" streamlit >= 1.51" ]
1413
1514[project .optional-dependencies ]
1615devel = [
@@ -33,7 +32,3 @@ include-package-data = true
3332
3433[tool .setuptools .package-data ]
3534my_component = [" frontend/build/**/*" , " pyproject.toml" ]
36-
37- [[tool .streamlit .component .components ]]
38- name = " my_component"
39- asset_dir = " my_component/frontend/build"
Original file line number Diff line number Diff line change @@ -39,9 +39,9 @@ To package this component for distribution:
3939 npm run build
4040 ```
4141
42- 2 . Build the Python wheel using UV (from the project root with ` pyproject.toml ` ):
42+ 2 . Build the Python wheel using UV (from the project root):
4343 ``` sh
44- uv run --with build python -m build --wheel
44+ uv build
4545 ```
4646
4747This will create a ` dist/ ` directory containing your wheel. The wheel includes the compiled frontend from ` my_component/frontend/build ` .
Original file line number Diff line number Diff line change 1+ # Ship a minimal metadata file that can be picked up by Streamlit at runtime.
2+ [project ]
3+ name = " streamlit-custom-component"
4+ version = " 0.0.1"
5+
6+ [[tool .streamlit .component .components ]]
7+ name = " my_component"
8+ asset_dir = " frontend/build"
Original file line number Diff line number Diff line change @@ -9,8 +9,7 @@ description = "Streamlit component that allows you to do X"
99readme = " README.md"
1010requires-python = " >=3.10"
1111authors = [{ name = " John Smith" , email = " john@example.com" }]
12- # TODO: Restore this
13- # dependencies = ["streamlit >= 1.51"]
12+ dependencies = [" streamlit >= 1.51" ]
1413
1514[project .optional-dependencies ]
1615devel = [
@@ -33,7 +32,3 @@ include-package-data = true
3332
3433[tool .setuptools .package-data ]
3534my_component = [" frontend/build/**/*" , " pyproject.toml" ]
36-
37- [[tool .streamlit .component .components ]]
38- name = " my_component"
39- asset_dir = " my_component/frontend/build"
You can’t perform that action at this time.
0 commit comments