GitLab API

GitlabTool

Actions1095

Pypi_packages → getApiV4ProjectsIdPackagesPypiFilesSha256*fileIdentifier

AI-generated

Summary

Retrieve a specific PyPi package file from a GitLab project by its SHA256 checksum and file identifier using the GitLab API.

Inputs

  • id (required) — The ID or URL-encoded path of the GitLab project that contains the PyPi package.
  • sha256 (required) — The SHA256 checksum of the PyPi package file to retrieve.
  • file_identifier (required) — The identifier (filename) of the PyPi package file to get.
  • skipAuthentication — Whether to skip authentication for this request, default is false (use authentication).
  • baseUrl — Base URL of the GitLab instance, defaults to https://gitlab.com.
  • method — HTTP method to use; defaults to GET.

Output shape

binary file stream representing the PyPi package file data.

The operation sends an HTTP request to the path /api/v4/projects/{id}/packages/pypi/files/{sha256}/*file_identifier and returns the raw file content. Authentication via the gitlabApi credential is used unless skipped. No pagination or envelope is involved; the response is the file binary.

Examples

Example 1: Download a PyPi package file with a known sha256 checksum from a GitLab project

Set 'id' to the project ID or URL-encoded path, 'sha256' to the file's checksum, and 'file_identifier' to the package filename. Use default GET method and base URL unless targeting a custom GitLab instance.

Links

Discussion