Skip to main content

Requirements

  • Python 3.x installed locally
  • Account on Vertra Cloud
  • requirements.txt file at project root

Project Structure

my-project/
├── main.py
├── requirements.txt
└── vertracloud.config  (optional)

Configuration

requirements.txt

List all project dependencies:
flask==3.0.0
gunicorn==21.2.0
requests==2.31.0
The platform automatically runs pip install -r requirements.txt. Do not include venv or __pycache__ in the upload.

vertracloud.config (Optional)

MAIN=main.py
VERSION=recommended

Example: Discord Bot (discord.py)

import discord
import os

intents = discord.Intents.default()
intents.message_content = True

client = discord.Client(intents=intents)

@client.event
async def on_ready():
    print(f'{client.user} is online!')

@client.event
async def on_message(message):
    if message.author == client.user:
        return
    if message.content == '!ping':
        await message.send('Pong!')

client.run(os.environ['DISCORD_TOKEN'])

Example: Flask API

from flask import Flask, jsonify
import os

app = Flask(__name__)

@app.route('/')
def index():
    return jsonify({'message': 'Hello from Vertra Cloud!'})

@app.route('/health')
def health():
    return jsonify({'status': 'ok'})

if __name__ == '__main__':
    port = int(os.environ.get('PORT', 80))
    app.run(host='0.0.0.0', port=port)

Deploy

  1. Exclude venv, .cache and __pycache__ from the project
  2. Compress into a ZIP file
  3. Access Dashboard → New Project → Application
  4. Select Python language and upload
  5. Configure memory and Python version
  6. Click “Create Application”

Available Versions

VersionStatusDescription
3.13RecommendedPython 3.13 LTS (recommended for production)
3.13LatestPython 3.13 (latest version)
3.12StablePython 3.12 with extended support
3.11LegacyPython 3.11 with limited support

Notes

  • Dependencies are automatically installed via pip install -r requirements.txt
  • For Discord bots, set the token as environment variable DISCORD_TOKEN in the dashboard
  • For web APIs, listen on port PORT and host 0.0.0.0
  • Poetry and pipenv are not natively supported; use requirements.txt

Common Issues

Check if the module is listed in requirements.txt with the correct version.
Make sure you are using the correct Python version. Python 3.10+ code may not work on earlier versions.
Check if environment variable DISCORD_TOKEN is configured in the application’s environment variables.