Skip to content

CleverCloud/demo-python-hello-world-uv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Hello World Flask Application

A simple Flask web application that displays a "Hello by Clever Cloud" page.

Description

This is a basic Python Flask application configured to run on Clever Cloud. It serves a single route that renders an HTML template with the Clever Cloud branding.

Requirements

  • Python >= 3.12
  • Flask >= 3.0.0

Installation

Install dependencies using uv:

uv sync

Running Locally

Run the Flask application:

python main.py

The application will be available at http://localhost:9000

Deployment on Clever Cloud

Environment Configuration

For uv projects on Clever Cloud, the application must listens on port 9000 with 0.0.0.0 as host.

  • Run Command: Set the environment variable:
CC_RUN_COMMAND="uv run main.py"

Deploy with Clever CLI (clever-tools)

  1. Login (if not already logged in):
clever login
  1. Create a Python application:
clever create hello_world --type python --region par --org [ORGANISATION ID]
  1. Set up environment variable:
clever env set CC_PYTHON_VERSION "3.13"
clever env set CC_RUN_COMMAND "uv run main.py"
  1. Deploy:
clever deploy

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published