> ## Documentation Index
> Fetch the complete documentation index at: https://docs.shardcloud.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Python Hosting Guide

> Learn how to deploy Python applications on ShardCloud platform.

# Getting Started with Python Hosting

Deploy your Python applications on ShardCloud with minimal configuration and maximum performance.

<Info>
  ShardCloud supports Python applications with automatic dependency management and virtual environment isolation.
</Info>

## Prerequisites

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

<CardGroup cols={2}>
  <Card title="Required Files" icon="circle">
    Essential files for deployment
  </Card>

  <Card title="Excluded Files" icon="x">
    Files to exclude before upload
  </Card>
</CardGroup>

## 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

<Warning>
  All three files are mandatory. Missing any of these files will prevent successful deployment.
</Warning>

## Files to Exclude

Remove these files/folders before creating your deployment archive:

* `__pycache__/`
* `*.pyc`
* `venv/`

## ShardCloud Configuration

The [.shardcloud](/config) file configures your application deployment settings.

### Configuration Example

```bash theme={null}
DISPLAY_NAME=myfirstpythonproject
DESCRIPTION=a simple python project
MAIN=main.py
MEMORY=799
VERSION=LATEST
```

<Note>
  Choose the minimum required for your application's needs.
</Note>

## Deployment Process

<Steps>
  <Step title="Prepare Application">
    Ensure all required files are present and configured
  </Step>

  <Step title="Exclude Unnecessary Files">
    Remove `__pycache__/`, `venv/`, and `.pyc` files
  </Step>

  <Step title="Create Archive">
    Zip or RAR your project
  </Step>

  <Step title="Upload via Dashboard">
    Use [ShardCloud dashboard](https://shardcloud.app/dash) to upload your archive
  </Step>

  <Step title="Deploy & Monitor">
    Application automatically builds and deploys
  </Step>
</Steps>

## Common Configuration Examples

### Flask Application

```bash theme={null}
DISPLAY_NAME=flask-api
DESCRIPTION=RESTful API with Flask
MAIN=app.py
MEMORY=512
VERSION=LATEST
SUBDOMAIN=flask
```
