Skip to content

devpi-plumber helps to automate and test large devpi installations

License

Notifications You must be signed in to change notification settings

blue-yonder/devpi-plumber

Folders and files

NameName
Last commit message
Last commit date
Nov 4, 2024
Nov 20, 2023
Nov 20, 2023
Jul 23, 2018
Mar 14, 2016
Nov 4, 2024
Mar 25, 2022
Nov 4, 2024
Oct 27, 2014
Dec 9, 2022
Sep 10, 2021
Dec 9, 2022
Nov 20, 2023
Dec 9, 2022
Jan 6, 2025
Nov 14, 2017
Nov 4, 2024

Repository files navigation

Mario the Devpi Plumber

Coverage Status Latest Version

Mario, the devpi-plumber, helps to automate and test large devpi installations. It offers a simple python commandline wrapper around the devpi client binary and utilities for using devpi in a test harness. To get access to the latter, install Mario with the extra test requirement:

pip install devpi-plumber[test]

Mario by Example:

Among others, it can be used to automate the upload of packages:

with DevpiClient('https://devpi.company.com', 'user', 'secret') as devpi:
    devpi.use('user/testindex')
    devpi.upload('path/to/package-1.0.tar.gz')

To make it easier to perform modifications on non-volatile indices, there is a context manager that temporarily toggles the volatile flag.

with volatile_index(devpi, 'user/prodindex'):
    devpi.remove('broken_package==0.1.0')

In order to simplify the testing of such plumbing scripts, it ships with a simple context manager for starting and stopping devpi servers in tests.

def do_maintenance(devpi):
    """ My plumbing script """
    devpi.use('user/testindex')
    # ...

users = {
    'user': {'password': 'secret'},
}
indices = {
    'user/prodindex': {},
    'user/testindex': {'bases': 'user/prodindex'},
}
with TestServer(users, indices) as devpi:
    do_maintenance(devpi)

License

New BSD