Skip to main content

Getting Started with Python Hosting

Deploy your Python applications on ShardCloud with minimal configuration and maximum performance.
ShardCloud supports Python applications with automatic dependency management and virtual environment isolation.

Prerequisites

Before uploading your Python application, ensure you have the following project structure ready.

Required Files

Essential files for deployment

Excluded Files

Files to exclude before upload

Required Files

Your Python application must include these three essential files:

1. Entry Point File

  • File: main.py or app.py
  • Purpose: Main application entry point
  • Requirements: Must contain your application’s main execution code

2. Dependencies Configuration

  • File: requirements.txt
  • Purpose: Defines Python dependencies and versions
  • Requirements: Valid pip requirements format with all dependencies listed

3. ShardCloud Configuration

  • File: .shardcloud
  • Purpose: Platform-specific deployment settings
  • Requirements: Plain text configuration file in root directory
All three files are mandatory. Missing any of these files will prevent successful deployment.

Files to Exclude

Remove these files/folders before creating your deployment archive:
  • __pycache__/
  • *.pyc
  • venv/

ShardCloud Configuration

The .shardcloud file configures your application deployment settings.

Configuration Example

DISPLAY_NAME=myfirstpythonproject
DESCRIPTION=a simple python project
MAIN=main.py
MEMORY=799
VERSION=LATEST
Choose the minimum required for your application’s needs.

Deployment Process

1

Prepare Application

Ensure all required files are present and configured
2

Exclude Unnecessary Files

Remove __pycache__/, venv/, and .pyc files
3

Create Archive

Zip or RAR your project
4

Upload via Dashboard

Use ShardCloud dashboard to upload your archive
5

Deploy & Monitor

Application automatically builds and deploys

Common Configuration Examples

Flask Application

DISPLAY_NAME=flask-api
DESCRIPTION=RESTful API with Flask
MAIN=app.py
MEMORY=512
VERSION=LATEST
SUBDOMAIN=flask
I