--- id: python-vagrant version: "1.0.0" license: MIT license_treatment: permissive maintenance: active --- # python-vagrant — Python bindings for interacting with Vagrant virtual machines. License: permissive · Maintenance: active · Downloads: 3.9M/mo ## What it is and what it does Python-vagrant is a thin wrapper around the Vagrant command-line tool that lets you control virtual machines programmatically from Python code. Instead of running vagrant commands manually in a shell, you instantiate a Vagrant object and call methods like up(), destroy(), halt(), and status() to manage VMs. It also provides access to SSH configuration details and supports multi-VM environments, box management, and provisioning options. The package requires Vagrant 2.2 or greater and a supported hypervisor to be installed separately; it does not bundle or replace Vagrant itself. It has no Python runtime dependencies, making installation straightforward. The module is useful for automation workflows—such as spinning up test environments, integrating VM management into deployment pipelines, or controlling Vagrant from Fabric tasks—where you need programmatic rather than manual control. Use it for: - Automate VM startup and teardown in CI/CD pipelines or test suites that need isolated environments - Integrate Vagrant box control into Fabric deployment tasks to run remote commands on provisioned VMs - Query and manage multiple VMs in a multi-VM Vagrantfile from a single Python script - Log and monitor Vagrant subprocess output for debugging or auditing infrastructure changes - Programmatically initialize VMs from base boxes and manage box lifecycle (add, remove, list) ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Programmatic control of Vagrant virtual machines through Python, wrapping the vagrant command-line tool to start, stop, query status, and manage VMs from code. Yes, if you need to automate Vagrant VM management from Python and already have Vagrant and a hypervisor installed. The package is actively maintained, has no external Python dependencies, and carries a permissive license. The beta status and 2022 release date mean you should verify compatibility with your Vagrant version, but the straightforward API and low install friction make it a practical choice for automation workflows. ## Install pip install python-vagrant uv add python-vagrant poetry add python-vagrant ## Installing python-vagrant Before you install: Low friction installation with no runtime dependencies. Maintenance is active with recent commits, though the latest release was in 2022 and the package is marked beta, so API stability is not guaranteed. License in practice: MIT license is permissive, allowing commercial and private use with minimal restrictions. Quickstart: pip install python-vagrant import vagrant v = vagrant.Vagrant() v.up() print(v.status()) v.halt() Vagrant 2.2 or greater and a supported hypervisor (VirtualBox, VMWare, etc.) must be installed and configured on the system before python-vagrant can control VMs. Verify before relying: - Whether Vagrant 2.2+ and a supported hypervisor (VirtualBox, VMWare, etc.) are already installed on the target system - Performance characteristics when managing large numbers of VMs or complex multi-VM environments - Compatibility with recent Vagrant versions beyond what the description states ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 3.9M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags vagrant python bindings, programmatic vm control, vagrant automation, python vagrant wrapper, virtual machine management python, vagrant box control, infrastructure as code python, infrastructure-automation, vagrant-wrapper, devops [View on SkillFed](https://skillfed.io/packages/python-vagrant) · [View on PyPI](https://pypi.org/project/python-vagrant/)