solara 1.45.0__py3-none-any.whl

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.
LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2022 Maarten A. Breddels
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
13
+ all 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
21
+ THE SOFTWARE.
@@ -0,0 +1,226 @@
1
+ Metadata-Version: 2.3
2
+ Name: solara
3
+ Version: 1.45.0
4
+ Dynamic: Summary
5
+ Project-URL: Home, https://www.github.com/widgetti/solara
6
+ Project-URL: Documentation, https://solara.dev
7
+ Author-email: "Maarten A. Breddels" <maartenbreddels@gmail.com>
8
+ License: The MIT License (MIT)
9
+
10
+ Copyright (c) 2022 Maarten A. Breddels
11
+
12
+ Permission is hereby granted, free of charge, to any person obtaining a copy
13
+ of this software and associated documentation files (the "Software"), to deal
14
+ in the Software without restriction, including without limitation the rights
15
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
+ copies of the Software, and to permit persons to whom the Software is
17
+ furnished to do so, subject to the following conditions:
18
+
19
+ The above copyright notice and this permission notice shall be included in
20
+ all copies or substantial portions of the Software.
21
+
22
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
28
+ THE SOFTWARE.
29
+ Classifier: License :: OSI Approved :: MIT License
30
+ Requires-Python: >=3.7
31
+ Requires-Dist: solara-server[dev,starlette]==1.45.0
32
+ Requires-Dist: solara-ui[all]==1.45.0
33
+ Provides-Extra: all
34
+ Requires-Dist: altair; extra == 'all'
35
+ Requires-Dist: bqplot; extra == 'all'
36
+ Requires-Dist: bqplot-image-gl; extra == 'all'
37
+ Requires-Dist: bump2version; extra == 'all'
38
+ Requires-Dist: codespell; extra == 'all'
39
+ Requires-Dist: folium; extra == 'all'
40
+ Requires-Dist: ipyaggrid; extra == 'all'
41
+ Requires-Dist: ipycanvas; extra == 'all'
42
+ Requires-Dist: ipyleaflet; extra == 'all'
43
+ Requires-Dist: ipyreact; extra == 'all'
44
+ Requires-Dist: matplotlib; extra == 'all'
45
+ Requires-Dist: mdit-py-plugins; extra == 'all'
46
+ Requires-Dist: mkdocs-pycafe; extra == 'all'
47
+ Requires-Dist: mypy; extra == 'all'
48
+ Requires-Dist: numpy<2; extra == 'all'
49
+ Requires-Dist: objgraph; extra == 'all'
50
+ Requires-Dist: openai; extra == 'all'
51
+ Requires-Dist: playwright; extra == 'all'
52
+ Requires-Dist: plotly; extra == 'all'
53
+ Requires-Dist: polars; extra == 'all'
54
+ Requires-Dist: pre-commit; extra == 'all'
55
+ Requires-Dist: pytest; extra == 'all'
56
+ Requires-Dist: pytest-cov; extra == 'all'
57
+ Requires-Dist: pytest-ipywidgets[all]==1.45.0; extra == 'all'
58
+ Requires-Dist: pytest-mock; extra == 'all'
59
+ Requires-Dist: pytest-playwright; extra == 'all'
60
+ Requires-Dist: pytest-timeout; extra == 'all'
61
+ Requires-Dist: python-dotenv; extra == 'all'
62
+ Requires-Dist: ruff; extra == 'all'
63
+ Requires-Dist: solara-assets==1.45.0; extra == 'all'
64
+ Requires-Dist: tiktoken; (python_version >= '3.9') and extra == 'all'
65
+ Requires-Dist: types-markdown; extra == 'all'
66
+ Requires-Dist: types-pyyaml; extra == 'all'
67
+ Requires-Dist: types-requests; extra == 'all'
68
+ Requires-Dist: vaex-core; (python_version < '3.11') and extra == 'all'
69
+ Requires-Dist: vaex-hdf5; (python_version < '3.11') and extra == 'all'
70
+ Requires-Dist: vaex-jupyter; (python_version < '3.11') and extra == 'all'
71
+ Requires-Dist: vega-datasets; extra == 'all'
72
+ Provides-Extra: assets
73
+ Requires-Dist: solara-assets==1.45.0; extra == 'assets'
74
+ Provides-Extra: dev
75
+ Requires-Dist: bqplot; extra == 'dev'
76
+ Requires-Dist: bqplot-image-gl; extra == 'dev'
77
+ Requires-Dist: bump2version; extra == 'dev'
78
+ Requires-Dist: codespell; extra == 'dev'
79
+ Requires-Dist: ipyaggrid; extra == 'dev'
80
+ Requires-Dist: ipyreact; extra == 'dev'
81
+ Requires-Dist: mdit-py-plugins; extra == 'dev'
82
+ Requires-Dist: mypy; extra == 'dev'
83
+ Requires-Dist: numpy<2; extra == 'dev'
84
+ Requires-Dist: objgraph; extra == 'dev'
85
+ Requires-Dist: playwright; extra == 'dev'
86
+ Requires-Dist: plotly; extra == 'dev'
87
+ Requires-Dist: polars; extra == 'dev'
88
+ Requires-Dist: pre-commit; extra == 'dev'
89
+ Requires-Dist: pytest; extra == 'dev'
90
+ Requires-Dist: pytest-cov; extra == 'dev'
91
+ Requires-Dist: pytest-mock; extra == 'dev'
92
+ Requires-Dist: pytest-playwright; extra == 'dev'
93
+ Requires-Dist: pytest-timeout; extra == 'dev'
94
+ Requires-Dist: python-dotenv; extra == 'dev'
95
+ Requires-Dist: ruff; extra == 'dev'
96
+ Requires-Dist: types-markdown; extra == 'dev'
97
+ Requires-Dist: types-pyyaml; extra == 'dev'
98
+ Requires-Dist: types-requests; extra == 'dev'
99
+ Requires-Dist: vaex-core; (python_version < '3.11') and extra == 'dev'
100
+ Requires-Dist: vaex-hdf5; (python_version < '3.11') and extra == 'dev'
101
+ Requires-Dist: vaex-jupyter; (python_version < '3.11') and extra == 'dev'
102
+ Provides-Extra: documentation
103
+ Requires-Dist: altair; extra == 'documentation'
104
+ Requires-Dist: bqplot; extra == 'documentation'
105
+ Requires-Dist: folium; extra == 'documentation'
106
+ Requires-Dist: ipycanvas; extra == 'documentation'
107
+ Requires-Dist: ipyleaflet; extra == 'documentation'
108
+ Requires-Dist: matplotlib; extra == 'documentation'
109
+ Requires-Dist: mkdocs-pycafe; extra == 'documentation'
110
+ Requires-Dist: numpy<2; extra == 'documentation'
111
+ Requires-Dist: openai; extra == 'documentation'
112
+ Requires-Dist: plotly; extra == 'documentation'
113
+ Requires-Dist: tiktoken; (python_version >= '3.9') and extra == 'documentation'
114
+ Requires-Dist: vaex-core; (python_version < '3.11') and extra == 'documentation'
115
+ Requires-Dist: vaex-hdf5; (python_version < '3.11') and extra == 'documentation'
116
+ Requires-Dist: vega-datasets; extra == 'documentation'
117
+ Provides-Extra: pytest
118
+ Requires-Dist: pytest-ipywidgets[all]==1.45.0; extra == 'pytest'
119
+ Description-Content-Type: text/markdown
120
+
121
+ **A Pure Python, React-style Framework for Scaling Your Jupyter and Web Apps**
122
+
123
+ [![solara logo](https://solara.dev/static/assets/images/logo.svg)](https://solara.dev)
124
+
125
+ Come chat with us on [Discord](https://discord.solara.dev) to ask questions or share your thoughts or creations!
126
+
127
+ [![Discord Shield](https://discordapp.com/api/guilds/1106593685241614489/widget.png?style=banner2)](https://discord.solara.dev)
128
+
129
+
130
+
131
+ ## Introducing Solara
132
+
133
+ While there are many Python web frameworks out there, most are designed for small data apps or use paradigms unproven for larger scale. Code organization, reusability, and state tend to suffer as apps grow in complexity, resulting in either spaghetti code or offloading to a React application.
134
+
135
+ Solara addresses this gap. Using a React-like API, we don't need to worry about scalability. React has already proven its ability to support the world's largest web apps.
136
+
137
+ Solara uses a pure Python implementation of React (Reacton), creating ipywidget-based applications. These apps work both inside the Jupyter Notebook and as standalone web apps with frameworks like FastAPI. This paradigm enables component-based code and incredibly simple state management.
138
+
139
+ By building on top of ipywidgets, we automatically leverage an existing ecosystem of widgets and run on many platforms, including JupyterLab, Jupyter Notebook, Voilà, Google Colab, DataBricks, JetBrains Datalore, and more.
140
+
141
+ We care about developer experience. Solara will give your hot code reloading and type hints for faster development.
142
+
143
+ ## Installation
144
+
145
+ Run:
146
+ ```
147
+ pip install solara
148
+ ```
149
+
150
+ Or follow the [Installation instructions](https://solara.dev/documentation/getting_started/installing) for more detailed instructions.
151
+
152
+ ## First script
153
+
154
+ Put the following Python snippet in a file (we suggest `sol.py`), or put it in a Jupyter notebook cell:
155
+
156
+ ```python
157
+ import solara
158
+
159
+ # Declare reactive variables at the top level. Components using these variables
160
+ # will be re-executed when their values change.
161
+ sentence = solara.reactive("Solara makes our team more productive.")
162
+ word_limit = solara.reactive(10)
163
+
164
+
165
+ @solara.component
166
+ def Page():
167
+ # Calculate word_count within the component to ensure re-execution when reactive variables change.
168
+ word_count = len(sentence.value.split())
169
+
170
+ solara.SliderInt("Word limit", value=word_limit, min=2, max=20)
171
+ solara.InputText(label="Your sentence", value=sentence, continuous_update=True)
172
+
173
+ # Display messages based on the current word count and word limit.
174
+ if word_count >= int(word_limit.value):
175
+ solara.Error(f"With {word_count} words, you passed the word limit of {word_limit.value}.")
176
+ elif word_count >= int(0.8 * word_limit.value):
177
+ solara.Warning(f"With {word_count} words, you are close to the word limit of {word_limit.value}.")
178
+ else:
179
+ solara.Success("Great short writing!")
180
+
181
+
182
+ # The following line is required only when running the code in a Jupyter notebook:
183
+ Page()
184
+ ```
185
+
186
+ Run from the command line in the same directory where you put your file (`sol.py`):
187
+
188
+ ```bash
189
+ $ solara run sol.py
190
+ Solara server is starting at http://localhost:8765
191
+ ```
192
+
193
+ Or copy-paste this to a Jupyter notebook cell and execute it (the `Page()` expression at the end
194
+ will cause it to automatically render the component in the notebook).
195
+
196
+ See this snippet run live at https://solara.dev/documentation/getting_started
197
+
198
+ ## Demo
199
+
200
+ The following demo app can be used to explore a dataset (build in or upload yourself) using
201
+ a scatter plot. The plot can be interacted with to filter the dataset, and the filtered dataset can
202
+ be downloaded.
203
+
204
+ * [Source code](https://github.com/widgetti/solara/blob/master/solara/website/pages/apps/scatter.py)
205
+
206
+ ### Running in solara-server
207
+
208
+ The solara server is build on top of Starlette/FastAPI and runs standalone. Ideal for production use.
209
+
210
+ ![fastapi](https://global.discourse-cdn.com/standard11/uploads/jupyter/original/2X/9/9442fc70e2a1fcd201f4f900fa073698a1f8c937.gif)
211
+
212
+
213
+ ### Running in Jupyter
214
+
215
+ By building on top of ipywidgets, we automatically leverage an existing ecosystem of widgets and run on many platforms, including JupyterLab, Jupyter Notebook, Voilà, Google Colab, DataBricks, JetBrains Datalore, and more. This means our app can also run in Jupyter:
216
+
217
+ ![jupyter](https://global.discourse-cdn.com/standard11/uploads/jupyter/original/2X/8/8bc875c0c3845ae077168575a4f8a49cf1b35bc6.gif)
218
+
219
+ ## Resources
220
+
221
+ Visit our main website or jump directly to the introduction
222
+
223
+ [![Introduction](https://dabuttonfactory.com/button.png?t=Introduction&f=Open+Sans-Bold&ts=20&tc=fff&hp=45&vp=12&c=8&bgt=unicolored&bgc=f19f41)](https://solara.dev/documentation)
224
+ [![Quickstart](https://dabuttonfactory.com/button.png?t=Quickstart&f=Open+Sans-Bold&ts=20&tc=fff&hp=45&vp=12&c=8&bgt=unicolored&bgc=f19f41)](https://solara.dev/documentation/getting_started)
225
+
226
+ *Note that the solara.dev website is created using Solara*
@@ -0,0 +1,5 @@
1
+ LICENSE,sha256=fFJUz-CWzZ9nEc4QZKu44jMEoDr5fEW-SiqljKpD82E,1086
2
+ solara-1.45.0.dist-info/METADATA,sha256=3x52bwamBom1wMcq3M-XW_93abIb0YJUZueeZ3hGCkA,10583
3
+ solara-1.45.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
4
+ solara-1.45.0.dist-info/licenses/LICENSE,sha256=fFJUz-CWzZ9nEc4QZKu44jMEoDr5fEW-SiqljKpD82E,1086
5
+ solara-1.45.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.26.3
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2022 Maarten A. Breddels
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
13
+ all 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
21
+ THE SOFTWARE.