Skip to content

Latest commit

 

History

History
33 lines (19 loc) · 953 Bytes

File metadata and controls

33 lines (19 loc) · 953 Bytes

pyinfra Examples

A set of documented & tested pyinfra deploys.

Getting started

This repository is self-hosted with uv — no global pyinfra install required. After installing uv:

# Create the virtualenv and install the pinned pyinfra version from uv.lock
uv sync

# Run pyinfra via uv (picks up the locked pyinfra automatically)
uv run pyinfra --version

All example commands below can be prefixed with uv run — e.g. uv run pyinfra inventories/docker.py deploy.py.

Complete Deploys

Simple: deploys two servers: one database and one web running a Python app fetched using Git.

Specific Features

Shows how to execute Python functions as operations directly from the CLI.

Look at using Python functions, and external packages, to generate inventory.