Skip to main content
Unlisted page
This page is unlisted. Search engines will not index it, and only users having a direct link can access it.

Python Development Environment

Last updated on May 26, 2026

Overview

This guide provides a simple and consistent way to start a new Python project. It covers installing Python, choosing a package manager, and running code locally or in Docker.

Setup

1. Install Python

sudo apt update
sudo apt install python3

2. Choose a package manager

uv is a modern, fast alternative to pip + venv that manages both Python packages and virtual environments with a single tool. pip + venv is the long-standing standard Python toolchain included with most Python installations. Both are fully supported — pick whichever you prefer.

uv manages Python packages and virtual environments with a single fast command.

Install uv:

curl -LsSf https://astral.sh/uv/install.sh | sh

Create a project directory

mkdir my_project && cd my_project

Add a pyproject.toml file

Create a pyproject.toml to declare your project and dependencies:

[project]
name = "my-project"
version = "0.1.0"
requires-python = ">=3.10"
dependencies = [
"accelbyte-py-sdk",
"bitarray",
"httpx[http2]",
"mmh3",
"PyJWT[crypto]",
"PyYAML",
"requests",
"websockets",
]

Install dependencies (uv creates and manages .venv automatically):

uv sync

Write and run code

mkdir src
cat <<EOF > src/app.py
import accelbyte_py_sdk

print(accelbyte_py_sdk.get_version(latest=True, full=True))
EOF
uv run python src/app.py

Run with Docker (Optional)

FROM python:3.10-slim

WORKDIR /app

COPY pyproject.toml uv.lock ./
RUN --mount=from=ghcr.io/astral-sh/uv:latest,source=/uv,target=/uv \
UV_PROJECT_ENVIRONMENT=/usr/local /uv sync --frozen --no-dev --no-install-project
COPY src/ .

CMD ["python", "app.py"]
docker build -t my-app . && docker run --rm my-app