Koji is a powerful, distributed system for building and tracking RPM packages, primarily used within the Fedora and Red Hat ecosystems. The `koji` Python package provides the official client library, allowing programmatic interaction with a Koji Hub, including querying build information, submitting tasks, and managing users. It is actively maintained and currently at version 1.36.0, with releases typically tied to major Koji system updates.
pip install kojiVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates connecting to a public Koji Hub and querying its version. For anonymous access, no special configuration is needed. For tasks requiring authentication (e.g., submitting builds, modifying tags), Koji typically uses configuration files like `~/.koji/config` or environment variables for certificates.
Ensure your Koji configuration file is correctly set up for the target Koji Hub, including appropriate certificate paths and permissions, if you encounter `koji.AuthError`.
Develop new Koji client scripts using Python 3. Ensure your Python environment is consistent.
Use `.get()` with a default value (e.g., `obj.get('key', None)`) or check for key existence (e.g., `if 'key' in obj:`) when accessing dictionary values returned by Koji API calls to prevent `KeyError`.Verify the Koji configuration file (e.g., `~/.koji/config` or `/etc/koji.conf`) specifies the correct `server`, `cert`, `serverca`, and `topdir` paths. Ensure certificate files exist and are readable by the user running the script.
Examine the specific 'Server message' for clues. Check the parameters passed to the Koji API function (e.g., `getBuild`, `listBuilds`) to ensure they are valid and refer to existing entities on the Koji Hub.
Double-check the `KOJI_HUB_URL` (or `server` setting in your config). Ensure the hostname is correct and that your machine can resolve and connect to it (e.g., using `ping` or `curl`).
No dependency data recorded yet.