iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
🐍

How to Get a PyPI API Token

に公開

Introduction

To publish a library on PyPI, you need to obtain a PyPI API token.

In this article, I will show you how to obtain the API token.


Created by NekoAllergy

Steps

step 1: Account Registration

First, access test.pypi or pypi.

pypi
Something like this

Complete the account registration.

step 2: Obtaining Recovery Codes

Click "Account settings" from the top-right menu.

pypi
Top-right menu

Click "Generate recovery code" in the Two-Factor Authentication section, enter your password, and continue.

pypi
Two-Factor Authentication section

pypi
Password entry

Recovery codes will be generated, so make sure to save them.

Proceed to the next screen, where you will be asked to enter a recovery code. Enter one of the recovery codes you just obtained.

pypi
Something like this

Click "Verify," and a message will appear at the top of the screen indicating that the recovery code has been successfully accepted.

pypi
Acceptance complete

step 3: Two-Factor Authentication

Next, click "Add 2FA with authentication application."

Scan the displayed QR code with a two-factor authentication app on your smartphone (I use Google Authenticator).

Then, a 6-digit code will be displayed as shown below.

pypi

Enter the displayed code into the input field on PyPI and continue.

Then, a message will appear at the top of the screen indicating that the authentication was successful.

pypi
Acceptance complete

step 4: Obtaining the API token

Finally, click "Add API token."

pypi
Add API token

Enter a token name and click "Create token."

pypi
Enter token name

You will then obtain the token.

pypi
API token acquisition complete!


Created by NekoAllergy

Conclusion

You have now successfully obtained your PyPI API token.
By using this token, you can publish libraries on PyPI.

I would be happy if this article helped your understanding in any way.

Please follow ♻️, like 👍, and support 🐱. It would make me very happy.

More Details on Machine Learning

I have summarized the basics of Python in a book. I would be very happy if you could take a look at it as well ↓
https://zenn.dev/nekoallergy/books/python-basic
I have also summarized the basics of Deep Learning in a book. I would be delighted if you picked it up ↓
https://zenn.dev/nekoallergy/books/904df952389317


NekoAllergy AI

NekoAllergy AI
I share information about machine learning on YouTube. I would be glad if you could take a look when you have time.





Created by NekoAllergy

Discussion