Yandex Cloud
Search
Contact UsGet started
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • AI for business
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
© 2025 Direct Cursus Technology L.L.C.
Yandex Cloud Registry
  • Getting started
    • All guides
    • Creating a registry
        • Setting up PyPI
  • Access management
  • Pricing policy
  • 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 September 19, 2025
  1. Depending on the authentication method:

    IAM token
    OAuth token

    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.

    Get an OAuth token for the Yandex account you are going to use for authentication.

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

    IAM token
    OAuth token
    [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 = oauth
    password = <OAuth_token>
    

Was the article helpful?

Previous
Setting up NuGet
Next
Pushing a binary artifact to a registry
© 2025 Direct Cursus Technology L.L.C.