Solara apps

PyCafe supports creating, running, editing, and sharing Solara applications directly in your browser. There’s no need for any installation; it works with just a single click.

Your first app

Go to our homepage at https://py.cafe/ and click the Solara tile:

solara-tile

Once the page is loaded, you should see an Editor and File Browser on the left, and Preview Browser on the right with the the Solara app in it:

solara-preview

You can see the Terminal on the bottom right where you print statements go.

Editing the app

You can edit app.py in the Editor, and work as your normally would with Solara.

Uploading an app.py

You may want to upload a local file from your computer if you already developed a solara app locally.

From the file browser, you can choose New fileUpload files to upload an existing app.py or other Python scripts or modules. You can even upload images, csv files or any file you need for your Solara application.

solara-upload

Sharing your solara app

Share app with code

If you are ready with your Solara app, you might want to share it with other people.

You can share the screen you are seeing, with the Editor and Preview Browser open, by going to the Share dialog. Click the Share button on the left, and you will see a dialog like this: solara-share

Click the “copy to clipboard” button , and paste the link in an email or document to share it with others.

Share as an app

If you want visitors to only see the app, and not the Editor or File Browser, select the “APP” tab in the Share dialog, and use that link instead.

solara-share

People who visit this link, will see just the Solara app, as shown below:

solara-share

Note: Visitors can still read your sourcecode, read more about how PyCafe works.

Embed in an iframe

It is also possible to embed you app into an existing web page using an iframe. Choose the “EMBED” tab in the Share dialog and copy the HTML snippet into your clipboard:

solara-share

You can now insert the HTML snippet into your website or blog post. The result should look like this:


Wrap up

Congratulations, you have successfully created your first Solara app on PyCafe. You can now share it with your friends, colleagues, or embed it on your website.