PackageTarget (librepo.PackageTarget)¶
-
class
librepo.
PackageTarget
(relative_url, dest=None, checksum_type=0, checksum=None, expectedsize=0, base_url=None, resume=False, progresscb=None, cbdata=None, handle=None, endcb=None, mirrorfailurecb=None, byterangestart=0, byterangeend=0)¶ Represent a single package that will be downloaded by
download_packages()
.Parameters: - relative_url – Target URL. If handle or base_url specified, the url can be (and logically should be) only a relative part of path.
- dest – Destination filename or directory (file basename will be derived from the relative_url). If None current working directory will be used.
- checksum_type – Checksum (hash) type constants
- checksum – Expected checksum value.
- expectedsize – Expected size of the target. If server reports different size, then download won’t be performed.
- base_url – Base part of URL
- resume – If True then downloader will try to resume download if the destination file already exists. If the file doesn’t exist yet, it will be downloaded.
- progresscb – Progress callback - progresscb
- cbdata – User data for the callback.
- handle –
Handle
- endcb – End callback - endcb
- mirrorfailurecb – See Mirror Failure Callback - mirrorfailurecb
- byterangestart – Start downloading from the specified byte.
- byterangeend – Stop downloading at the specified byte. Note: If the byterangeend is less or equal to byterangestart, then it is ignored!