Module containing the logic for
- twine.commands.upload.skip_upload(response: requests.models.Response, skip_existing: bool, package: twine.package.PackageFile) bool ¶
Determine if a failed upload is an error or can be safely ignored.
response – The response from attempting to upload
packageto a repository.
skip_existing – If
True, use the status and content of
responseto determine if the package already exists on the repository. If so, then a failed upload is safe to ignore.
package – The package that was being uploaded.
Trueif a failed upload can be safely ignored, otherwise
- twine.commands.upload._make_package(filename: str, signatures: Dict[str, str], upload_settings: twine.settings.Settings) twine.package.PackageFile ¶
Create and sign a package, based off of filename, signatures and settings.
- twine.commands.upload.upload(upload_settings: twine.settings.Settings, dists: List[str]) None ¶
Upload one or more distributions to a repository, and display the progress.
If a package already exists on the repository, most repositories will return an error response. However, if
True, a message will be displayed and any remaining distributions will be uploaded.
For known repositories (like PyPI), the web URLs of successfully uploaded packages will be displayed.
upload_settings – The configured options related to uploading to a repository.
dists – The distribution files to upload to the repository. This can also include
.ascfiles; the GPG signatures will be added to the corresponding uploads.