pyinfra automates/provisions/manages/deploys infrastructure super fast at massive scale. It can be used for ad-hoc command execution, service deployment, configuration management and more. Core design features include:
- 🚀 Super fast execution over thousands of targets with predictable performance.
- 🚨 Instant debugging with stdout + stderr output on error, and
-vto print it always. - 💻 Agentless execution by speaking native SSH/Docker/subprocess depending on the target.
- ❗️ Two stage process that enables
--dryruns before making any changes. - 📦 Extendable with any Python package as configured & written in standard Python.
- 🔌 Integrated with Docker, Vagrant/Mech & Ansible out of the box.
When you run pyinfra you'll see something like (non animated version):
Quickstart
pyinfra can be installed via pip:
pip install pyinfra
Now you can execute commands & operations over SSH:
# Execute an abitrary shell command
pyinfra my-server.net exec -- echo "hello world"
# Install iftop apt package if not present
pyinfra my-server.net apt.packages iftop sudo=true update=true
These can then be saved to a deploy file, let's call it deploy.py:
from pyinfra.modules import apt
apt.packages(
{'Install iftop'},
'iftop',
sudo=True,
update=True,
)
And executed with:
pyinfra my-server.net deploy.py
or
pyinfra @docker/ubuntu deploy.py
Documentation
Metadata
Release files for pyinfra 0.14.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pyinfra-0.14.2.tar.gz | 138.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyinfra-0.14.2-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 309.1 kB
Release files / pyinfra-0.14.2.tar.gz
| Download URL | pyinfra-0.14.2.tar.gz |
|---|---|
| Size | 138.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ae73a143029a77fc7df1bf5767c4686a5977acc7c95dfcb470cd87b2d5bec4b0
|
|
BLAKE2b-256 checksum How to use checksums |
73afca08664d27403b5ff1fcf06a5c70afee7f7bef8faa4c6770a34033f70654
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.39.0 CPython/3.8.0
|
Release files / pyinfra-0.14.2-py2.py3-none-any.whl
| Download URL | pyinfra-0.14.2-py2.py3-none-any.whl |
|---|---|
| Size | 170.5 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
9705d905d02d41eaaa099bfc0ce98cde0e0ff706a3965f668fd2c1b0e61ca8bf
|
|
BLAKE2b-256 checksum How to use checksums |
8dc42eb513b740159765841c8f82058cbfae382027615c65c7289a82a673db7f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.39.0 CPython/3.8.0
|
Security for pyinfra 0.14.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.