Skip to main content

Trigger builds of snaps and ubuntu imagesthrough the launchpad API.

Project description


Classes for triggering builds of snaps and Ubuntu images through the Launchpad API.



from canonicalwebteam.launchpad import SnapBuilder

snap_builder = SnapBuilder(

snap_name = "new-test-snap"
git_repo = ""
snap_builder.create_snap(snap_name, git_repo)

new_snap = snap_builder.get_snap_by_store_name("new-test-snap")


from canonicalwebteam.launchpad import ImageBuilder

image_builder = ImageBuilder(

    board="cm3", system="core16", snaps=["code", "toto"]

Test fixtures

Tests check calls against fixtures representing the Launchpad API. These fixtures are generated using vcrpy, based on real calls to the API when the test was first run.

To new tests that rely on new API responses, or if we need to regenerate existing fixtures because the API has changed, the secrets need to be provided to authenticate with the API as follows:

export SNAP_BUILDER_TOKEN={token}
export SNAP_BUILDER_SECRET={secret}
export IMAGE_BUILDER_TOKEN={token}
export IMAGE_BUILDER_SECRET={secret}

rm tests/cassettes/...  # Remove any fixtures you need to regenerate

./ test  # Run tests again to regenerate fixtures

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for canonicalwebteam.launchpad, version 0.8.2
Filename, size File type Python version Upload date Hashes
Filename, size canonicalwebteam.launchpad-0.8.2.tar.gz (6.2 kB) File type Source Python version None Upload date Hashes View
Filename, size canonicalwebteam.launchpad-0.8.2-py3-none-any.whl (10.5 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page