Python Engine

Python Engine

Python Engine is a managed application-server stack for running Python web applications and services. It supports automated deployment, dependency installation, environment variables, logs, scaling, and container lifecycle management.

Python Engine Overview

Python Engine is intended for Python projects that need a flexible runtime without depending on the Apache Python stack. The environment can host web frameworks, APIs, background services, and other Python applications that expose a supported network endpoint.

Managed Python runtimeRuns the application with the Python engine version selected in the topology wizard.
Automated deploymentSupports application archives and remote version-control repositories.
Dependency detectionSupports Poetry, Pipenv, and pip project files.
Custom startupRuns the application according to the project’s startup configuration.
Elastic scalingSupports automatic vertical scaling and manual or automatic horizontal scaling.
i

Dependency-tool priority

During deployment, Python Engine detects one supported dependency method for the project. Poetry is checked first, followed by Pipenv and then pip.

Create a Python Engine Environment

1

Open the environment wizard

Sign in to the platform dashboard and click New Environment.

2

Select Python Engine

Open the Python tab and choose Python Engine as the application-server stack.

3

Configure the topology

Select the required Python version and configure the Cloudlet limit, disk space, node count, public IP addresses, region, environment name, and supporting database or cache nodes.

4

Create the environment

Review the topology and click Create. The platform provisions and starts the Python Engine container.

Select Python Engine in the topology wizard
Select Python Engine, the runtime version, resources, networking, and supporting services.

Deploy an Application

Python Engine supports deployment from a project archive or a remote VCS repository.

1

Prepare the project

Include the application source, dependency files, and the startup configuration required to launch the service.

2

Upload or connect the source

Open Deployment Manager and upload the application archive or connect the required repository and branch.

3

Deploy to Python Engine

Select the Python Engine environment and start deployment. The platform extracts the project, resolves dependencies, and runs the configured startup process.

Dependency Management

Python Engine selects one dependency-management method according to the files available in the project.

PoetryUsed when the project includes the required Poetry configuration and lock files.
PipenvUsed when a Pipfile-based project is detected and Poetry is not selected.
pipUsed with requirements.txt when the preceding dependency formats are not selected.

Only one supported dependency tool is applied during a deployment. Keep the project dependency files consistent to avoid installing packages from an unintended source.

# requirements.txt example
fastapi==0.116.1
uvicorn==0.35.0
sqlalchemy==2.0.43

Application Startup

Configure the application to listen on the platform-provided network interface and port. The exact startup definition depends on the framework and project structure.

uvicorn app:app --host 0.0.0.0 --port ${PORT}
!

Project-specific command

The example above illustrates a common ASGI startup pattern. Use the command and application entry point supported by the deployed project and by the Python Engine startup mechanism available in the environment.

Configuration and Logs

Environment variablesStore runtime configuration outside the source code.
Config managerReview or edit supported server and application files through the dashboard.
Deployment logsReview dependency resolution, build, and startup output.
Runtime logsInspect application errors and service output through the Logs panel.
SSH accessUse Web SSH or regular SSH for command-line diagnostics.

Use environment variables

Keep database hosts, credentials, API endpoints, application modes, and similar environment-specific values outside the project source.

Scaling and Availability

  • Automatic vertical scaling: The container uses RAM and CPU up to the configured Cloudlet limit.
  • Manual horizontal scaling: Change the number of Python Engine nodes in the topology wizard.
  • Automatic horizontal scaling: Add or remove nodes through resource-based triggers.
  • Load balancing: A load balancer is added when the application layer contains multiple nodes.
  • Sequential deployment: Update scaled nodes one at a time to reduce service interruption.

Expected Result

A managed Python Engine environment is created with the selected Python release, resources, networking, and supporting services. The deployed project is prepared with one supported dependency tool and started using its configured application command.

Important Notes

  • Keep only the dependency files required by the intended package-management workflow.
  • Confirm that all packages support the selected Python version.
  • Configure the application to listen on the required interface and port.
  • Do not hardcode passwords, tokens, or database credentials.
  • Use sequential deployment for multi-node environments when reduced downtime is required.
  • Review deployment and runtime logs after every production change.

Common Issues and Solutions

Application does not startCheck the startup command, application entry point, environment variables, port binding, and runtime logs.
Wrong dependency tool is selectedRemove conflicting project dependency files and keep only the intended Poetry, Pipenv, or pip configuration.
Dependency installation failsReview package versions, Python compatibility, system-library requirements, and deployment logs.
Application works locally but not on the platformConfirm that it listens on 0.0.0.0, uses the platform port, and does not depend on local-only files or services.
Scaled nodes have inconsistent dataUse shared storage, an external database, or a deployment design that keeps application state outside individual containers.