Install & Compatibility
Where this runs
tested against v0.5.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 33.3MB
glibcpy 3.10–3.920 runs
installs and imports cleanly · install 4.0s · import 0.000s · 33MB
30MB installed
● package 30MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
PulpConnection
✓ from pulp_glue import PulpConnection
✗ from pulp_glue.connection import PulpConnection
This quickstart demonstrates how to establish a connection to a Pulpcore server and create a new Debian repository using `pulp-glue-deb`. It uses environment variables for Pulp API credentials and gracefully handles pre-existing repositories.
import os
from pulp_glue_core.connection import PulpConnection
from pulp_glue_deb.app.deb import api as deb_api
# Get Pulp API URL and credentials from environment variables
PULP_API_URL = os.environ.get('PULP_API_URL', 'http://localhost:8080/pulp/api/v3/')
PULP_USERNAME = os.environ.get('PULP_USERNAME', 'admin')
PULP_PASSWORD = os.environ.get('PULP_PASSWORD', 'password')
try:
# 1. Establish connection to Pulp
# Set verify_ssl=True in production and ensure valid certificates
connection = PulpConnection(
PULP_API_URL,
username=PULP_USERNAME,
password=PULP_PASSWORD,
verify_ssl=False # WARNING: Do not use False in production with untrusted CAs
)
print(f"Connected to Pulp at {PULP_API_URL}")
# 2. Get the DEB API client
deb_client = deb_api.DebClient(connection)
# 3. Create a DEB repository
repo_name = "my-test-deb-repo"
repo_description = "A test Debian repository created via pulp-glue-deb."
# Check if repository already exists to avoid creation error
existing_repos = deb_client.list_repositories(name=repo_name)
if existing_repos:
repo = existing_repos[0]
print(f"Repository '{repo_name}' already exists (Pulp Href: {repo['pulp_href']}).")
else:
repo = deb_client.create_repository(
name=repo_name,
description=repo_description
)
print(f"Successfully created DEB repository: {repo['name']} (Pulp Href: {repo['pulp_href']})")
# Optional: Delete the created repository
# deb_client.delete_repository(repo['pulp_href'])
# print(f"Deleted repository '{repo_name}'.")
except Exception as e:
print(f"An error occurred: {e}")
print("Ensure Pulpcore with the 'deb' plugin is running and accessible. Also verify environment variables PULP_API_URL, PULP_USERNAME, PULP_PASSWORD are set correctly.")
Upgrade
Version history
0.5.0latest on PyPI · released Jun 12, 2026
Audit
Dependencies
pulp-glue-corerequiredProvides the foundational PulpConnection and core API interaction logic for all pulp-glue libraries. pulp-glue-deb depends directly on it.