Yandex Cloud
Documentation
PresentationContact UsTry it for free
© 2026 Direct Cursus Technology L.L.C.
Yandex Cloud Registry
  • Getting started
    • All guides
        • Setting up PyPI
        • Creating a Python package
        • Pushing a Python package to a registry
        • Pulling a Python package from a registry
        • Examples of working with PyPI registries
      • Deleting an artifact from a registry
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  1. Step-by-step guides
  2. Managing artifacts
  3. Python artifact
  4. Setting up PyPI

Setting up PyPI

Written by
Yandex Cloud
Updated at November 17, 2026
View in Markdown
  1. Select the authentication method:

    IAM token
    API key

    Get an IAM token for the Yandex account or service account you are going to use for authentication.

    Note

    The IAM token's lifetime is limited to 12 hours.

    Create an API key for the service account you are going to use for authentication.

    When creating a key, specify its scope:

    • yc.cloud-registry.artifacts.pull: To pull artifacts from the registry.
    • yc.cloud-registry.artifacts.push: To push artifacts to the registry.

    Note

    The API key maximum lifetime is set manually when you create the key.

  2. In the user’s root directory, create a file named ~/.pypirc with the following content:

    IAM token
    API key
    [distutils]
    index-servers =
        cloud-registry
    
    [cloud-registry]
    repository = https://registry.yandexcloud.net/pypi/<registry_ID>/legacy/
    username = iam
    password = <IAM_token>
    
    [distutils]
    index-servers =
        cloud-registry
    
    [cloud-registry]
    repository = https://registry.yandexcloud.net/pypi/<registry_ID>/legacy/
    username = api_key
    password = <API_key>
    

Scope is an API key parameter that restricts the key's use to specific operations in addition to the service account's access permissions. For details, see API keys with scope and validity limits.

Was the article helpful?

Previous
Setting up NuGet
Next
Creating a Python package
© 2026 Direct Cursus Technology L.L.C.