packages_pypi

Upload a package

Uploads a PyPI package for a specified project.

post/api/v4/projects/{id}/packages/pypi

Request

  • Base URL
    https://gitlab.com
  • Auth
    none declared

Path parameters

idstring required

The ID or URL-encoded path of the project

Request body

contentstring binary required

The package file to be published (generated by Multipart middleware)

namestring required

Name of the package

versionstring required

Version of the package

requires_pythonstring

PyPI version required for the package

md5_digeststring

MD5 checksum of the package

sha256_digeststring

SHA256 checksum of the package

metadata_versionstring

Metadata version of the package

author_emailstring

Email address for the package author

descriptionstring

Description of the package

description_content_typestring

Type of content for the package description

summarystring

Short summary of the package

keywordsstring

Keywords listed for the package

Example request

{
  "name": "my.pypi.package",
  "version": "1.3.7",
  "requires_python": ">=3.7",
  "md5_digest": "900150983cd24fb0d6963f7d28e17f72",
  "sha256_digest": "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad",
  "metadata_version": "2.3",
  "author_email": "cschultz@example.com, snoopy@peanuts.com",
  "description_content_type": "text/markdown; charset=UTF-8; variant=GFM",
  "summary": "A module for collecting votes from beagles.",
  "keywords": "dog,puppy,voting,election"
}

Response

Upload a package

Changes

No recorded changes to this operation across all 5 revisions of this API.