Setting up PyPI
Written by
Updated at September 19, 2025
-
Depending on the authentication method:
IAM tokenOAuth tokenGet 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. -
In the user’s root directory, create a file named
~/.pypircwith the following content and specify the token in it:IAM tokenOAuth 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>