pushsource¶
A library for accessing push items from various sources.
- User Guide
- Source
- Source: staged
- Source: koji
- Source: registry
- Source: errata
- Source: pub
- Push items
- Push items: file
- Push items: cgw
- Push items: directory
- Push items: RPM
- Push items: modulemd
- Push items: errata
- Push items: containers
- Push items: AMI
- Push items: VHD
- Push items: VMI
- Push items: productid
- Push items: comps.xml
- Schema: staged
- Schema: errata
Quick Start¶
Install pushsource from PyPI:
pip install pushsource
In your python code, obtain a Source
instance,
iterate over the source to obtain push items, and perform desired operations
according to their type and attributes:
from pushsource import Source, RpmPushItem
import logging
with Source.get('koji:https://koji.fedoraproject.org/kojihub?rpm=rpm1,rpm2,...') as source:
for item in source:
if isinstance(item, RpmPushItem):
# do something with RPMs
publish_rpm(item)
else:
# don't know what to do
logging.getLogger().warning("Unexpected item: %s", item)
For more information, see the User Guide.