45 |
46 |
47 |
48 |
49 | A Cookiecutter Streamlit Template
50 | Welcome to my first cookiecutter template.
51 |
52 |
53 | Project Template Structure
54 | streamlit_app/
55 | ├── assets/
56 | │ ├── css/
57 | │ │ └── custom_style.css
58 | │ └── images/
59 | │ ├── logo.png
60 | │ └── header.png
61 | ├── data/
62 | │ ├── data1.csv
63 | │ └── random_data_file.csv
64 | ├── output/
65 | │ └── output.csv
66 | ├── pages/
67 | │ ├── Page_1.py
68 | │ └── Page_2.py
69 | ├── src/
70 | │ ├── components/
71 | │ │ ├── sidebar.py
72 | │ │ └── special_graph_widget.py
73 | │ └── calculations/
74 | │ ├── simple_maths.py
75 | │ └── trig_functions.py
76 | ├── tests/
77 | │ ├── test_simple_maths.py
78 | │ └── test_trig_functions
79 | └── app.py
80 |
81 |
82 | Using the Template with cookiecutter
83 | To use this template you can use the following command in your terminal:
84 | cookiecutter https://github.com/andymcdgeo/cookiecutter-streamlit.git
85 | You will then be presented with a series of prompts to choose which components to include in your application.
86 | [1/9] project_name (streamlit_app): andy_test
87 | [2/9] author_name (Andy McDonald):
88 | [3/9] project_slug (andy_test):
89 | [4/9] project_description (This is my awesome streamlit app.):
90 | [5/9] include_streamlit_config (y): y
91 | [6/9] include_streamlit_secrets (y): y
92 | [7/9] include_pages_folder_for_multi_page_app (y): n
93 | [8/9] include_tests (y): n
94 | [9/9] include_src_directory (y): n
95 |
96 |
97 | Running the Streamlit App
98 |
99 |
100 |