Skip to main content

A Pure Python, React-style Framework for Scaling Your Jupyter and Web Apps

solara logo

Come chat with us on Discord to ask questions or share your thoughts or creations!

Discord Shield

Introducing Solara

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.

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.

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.

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.

We care about developer experience. Solara will give your hot code reloading and type hints for faster development.

Installation

Run:

pip install solara

Or follow the Installation instructions for more detailed instructions.

First script

Put the following Python snippet in a file (we suggest sol.py), or put it in a Jupyter notebook cell:

import solara

# Declare reactive variables at the top level. Components using these variables
# will be re-executed when their values change.
sentence = solara.reactive("Solara makes our team more productive.")
word_limit = solara.reactive(10)


@solara.component
def Page():
    # Calculate word_count within the component to ensure re-execution when reactive variables change.
    word_count = len(sentence.value.split())

    solara.SliderInt("Word limit", value=word_limit, min=2, max=20)
    solara.InputText(label="Your sentence", value=sentence, continuous_update=True)

    # Display messages based on the current word count and word limit.
    if word_count >= int(word_limit.value):
        solara.Error(f"With {word_count} words, you passed the word limit of {word_limit.value}.")
    elif word_count >= int(0.8 * word_limit.value):
        solara.Warning(f"With {word_count} words, you are close to the word limit of {word_limit.value}.")
    else:
        solara.Success("Great short writing!")


# The following line is required only when running the code in a Jupyter notebook:
Page()

Run from the command line in the same directory where you put your file (sol.py):

$ solara run sol.py
Solara server is starting at http://localhost:8765

Or copy-paste this to a Jupyter notebook cell and execute it (the Page() expression at the end will cause it to automatically render the component in the notebook).

See this snippet run live at https://solara.dev/documentation/getting_started

Demo

The following demo app can be used to explore a dataset (build in or upload yourself) using a scatter plot. The plot can be interacted with to filter the dataset, and the filtered dataset can be downloaded.

Running in solara-server

The solara server is build on top of Starlette/FastAPI and runs standalone. Ideal for production use.

fastapi

Running in Jupyter

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:

jupyter

Resources

Visit our main website or jump directly to the introduction

Introduction Quickstart

Note that the solara.dev website is created using Solara

Release files for solara 1.62.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for solara 1.62.0
File Size Uploaded
solara-1.62.0.tar.gz 5.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for solara 1.62.0
File Interpreter ABI Platform
solara-1.62.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.2 kB

Release files / solara-1.62.0.tar.gz

Download URL solara-1.62.0.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
4a9cf8145522cc35902f319b0658a5051c10b060db4e601cfbccdd9094130067
BLAKE2b-256 checksum
How to use checksums
52cafd4092a3dc6cb481d2cc013cbc7224859af314d687d941841f301f5b6c12
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Hatch/1.18.1 {"ci":true,"cpu":"x86_64","distro":{"id":"noble","libc":{"lib":"glibc","version":"2.39"},"name":"Ubuntu","version":"24.04"},"implementation":{"name":"CPython","version":"3.10.21"},"installer":{"name":"hatch","version":"1.18.1"},"openssl_version":"OpenSSL 3.0.13 30 Jan 2024","python":"3.10.21","system":{"name":"Linux","release":"6.17.0-1022-azure"}} HTTPX2/2.13.0

Release files / solara-1.62.0-py3-none-any.whl

Download URL solara-1.62.0-py3-none-any.whl
Size 5.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3d05d5c1d5bd05f36d8b895e3bea2b38159ed450f6b848f2ef3705e9009426d7
BLAKE2b-256 checksum
How to use checksums
b8b1a0014106dc45965f38a00b49b24244efec52a33580c7685b03844b1b4a94
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Hatch/1.18.1 {"ci":true,"cpu":"x86_64","distro":{"id":"noble","libc":{"lib":"glibc","version":"2.39"},"name":"Ubuntu","version":"24.04"},"implementation":{"name":"CPython","version":"3.10.21"},"installer":{"name":"hatch","version":"1.18.1"},"openssl_version":"OpenSSL 3.0.13 30 Jan 2024","python":"3.10.21","system":{"name":"Linux","release":"6.17.0-1022-azure"}} HTTPX2/2.13.0

Release history Release notifications | RSS feed

This release

1.62.0 This release

2 release files

1.60.3

2 release files

1.57.6

2 release files

1.57.5

2 release files

1.57.4

2 release files

1.57.3

2 release files

1.57.1

2 release files

1.57.0

2 release files

1.56.0

2 release files

1.54.0

2 release files

1.53.0

2 release files

1.52.0

2 release files

1.51.1

2 release files

1.50.1

2 release files

1.49.0

2 release files

1.48.0

2 release files

1.47.0

2 release files

1.46.0

2 release files

1.45.0

2 release files

1.44.1

2 release files

1.44.0

2 release files

1.43.0

2 release files

1.41.0

2 release files

1.40.0

2 release files

1.39.0

2 release files

1.38.0

2 release files

1.37.2

2 release files

1.36.0

2 release files

1.35.1

2 release files

1.35.0

2 release files

1.32.2

2 release files

1.32.0

2 release files

1.30.0

2 release files

1.29.1

2 release files

1.29.0

2 release files

1.28.0

2 release files

1.27.0

2 release files

1.26.1

2 release files

1.24.0

2 release files

1.23.0

2 release files

1.22.0

2 release files

1.21.0

2 release files

1.19.0

2 release files

1.18.0

2 release files

1.17.5

2 release files

1.17.4

2 release files

1.17.3

2 release files

1.17.2

2 release files

1.17.1

2 release files

1.17.0

2 release files

1.16.3

2 release files

1.15.0

2 release files

1.14.0

2 release files

1.13.0

2 release files

1.12.0

2 release files

1.11.0

2 release files

1.10.0

2 release files

1.9.0

2 release files

1.8.2

2 release files

1.8.1

2 release files

1.8.0

2 release files

1.7.1

2 release files

1.7.0

2 release files

1.6.1

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.18.3

2 release files

0.18.2

2 release files

0.18.1

2 release files

0.18.0

2 release files

0.17.0

2 release files

0.16.0

2 release files

0.15.0

2 release files

0.14.0

2 release files

0.13.0

2 release files

0.12.1

2 release files

0.12.0

2 release files

0.11.0

2 release files

0.10.4

2 release files

0.10.3

2 release files

0.10.2

2 release files

0.10.1

2 release files

0.10.0

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page