iTranslated by AI
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.

Something like this
Complete the account registration.
step 2: Obtaining Recovery Codes
Click "Account settings" from the top-right menu.

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

Two-Factor Authentication section

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.

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.

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.

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.

Acceptance complete
step 4: Obtaining the API token
Finally, click "Add API token."

Add API token
Enter a token name and click "Create token."

Enter token name
You will then obtain the token.

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 ↓ I have also summarized the basics of Deep Learning in a book. I would be delighted if you picked it up ↓
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