Skip to main content

CLI for the Plash hosting service

Project description

Plash

[!WARNING]

Plash is in Beta and we have released it in its semi-stable state to gather early feedback to improve. We do not recommend hosting critical applications yet.

What is Plash

Plash is a next-generation deployment platform for fast, hassle-free Python application hosting. It’s designed to be:

  • Simple and streamlined - deploy your applications with minimal configuration
  • Developer-focused - built for coders, not cloud engineers
  • Fast and efficient - get your app online in seconds, not days

Plash handles all the deployment complexities so you can focus on what matters: building great applications. With Plash, you can deploy any Python app using straightforward commands and configurations, letting you ship your work quickly and reliably.

Whether you’re building web services, APIs, data applications, or tools, Plash provides the infrastructure backbone so you can concentrate on creating a splash with your code.

Tutorial: deploy your first app

In this tutorial you will learn how to deploy your first app. This tutorial will explore the basics of using Plash and help you get familiar with it at a high level.

Prerequisites:

  • A registered account at https://pla.sh
  • Basic terminal / command line skills

1. Installation

Install Plash comandline interface (CLI) with pip:

pip install plash-cli

The CLI lets you manage your whole app’s lifecycle

2. CLI Login

Authenticate with your Plash account:

plash_login

This command opens your browser to authenticate with your Plash account. After completing the login process, you’ll see a “complete” confirmation page in your browser.

Return to your terminal where you’ll find the confirmation message:

Authentication successful! Config saved to /plash_config.json

3. Create your first app

Create a new directory for your first app:

mkdir -p plash-tutorial
cd plash-tutorial

Next, create the main.py file:

from fasthtml.common import *

app, rt = fast_app()

@rt
def index():
    return H1("Hello, world!")

serve()

This is a basic FastHTML app. Plash also supports other popular python frameworks.

[!WARNING]

Your app must use port 5001, as this is the port exposed by Plash’s Docker container. It also happens to be the default for FastHTML apps.

And create the requirements.txt file:

python-fasthtml

4. Deploy your app

Now that you’ve created your app files, you’re ready to deploy! From your plash-tutorial directory, run: plash_deploy

This command will:

  1. Package your application files
  2. Upload them to Plash’s servers
  3. Build and deploy your application
plash_deploy
Initializing deployment...
✅ Upload complete! Your app is currently being built.
It will be live at https://example-app.pla.sh

Note: You’ll see a different url that has been randomly generated for your app.

5. View your app

Your app should be ready a couple of seconds after running the deploy command.

Once your app is ready, you can:

  1. Open the provided URL in your browser, or
  2. Use the convenient plash_view command to open it automatically:
plash_view

When you visit that page you should see “Hello, World!”

🎉 Congratulations! You deployed your first app on Plash!

Where to go from here

Learn more about what Plash has to offer in the rest of the docs at: https://docs.pla.sh

To learn more about creating web apps with FastHTML, we recommend looking at the official docs at: https://fastht.ml/docs/. In particular, we recommend the following:

  1. OAuth - Setup authentication for your Plash App with Google Sign-In or other OAuth Providers.
  2. Stripe - Accept payments for your products hosted on Plash with Stripe.

Would you like to use a different python web framework? Then check out the examples section of the repo, it has examples for many popular python web frameworks like FastAPI, Gradio, and Streamlit.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

plash_cli-0.3.6.tar.gz (17.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

plash_cli-0.3.6-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file plash_cli-0.3.6.tar.gz.

File metadata

  • Download URL: plash_cli-0.3.6.tar.gz
  • Upload date:
  • Size: 17.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for plash_cli-0.3.6.tar.gz
Algorithm Hash digest
SHA256 fab21720cca7d3b86a38a44d54c357db1592efabfde839fbe6aa7f848d04f37c
MD5 5765d5ba14d0c4321edbde0eb58e5a4b
BLAKE2b-256 ab90ea6a22956636ddbe2b6c270fe731caa7c14239f2ab9ebe6b84417f21c800

See more details on using hashes here.

File details

Details for the file plash_cli-0.3.6-py3-none-any.whl.

File metadata

  • Download URL: plash_cli-0.3.6-py3-none-any.whl
  • Upload date:
  • Size: 15.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for plash_cli-0.3.6-py3-none-any.whl
Algorithm Hash digest
SHA256 e949bab58a8f50f163f61e00f7ebc473fade7abd3e67e50fc3ab6535a7d4759c
MD5 f398bcfdd99a4b733c2c5a341772726f
BLAKE2b-256 392b7695ef233449bb8c9f19d1071ea0e5e6ec11dd1e22a11add8df49f492901

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page