@@ -231,6 +231,18 @@ You will also need to verify your email address before you're able to upload
231231any packages. For more details on Test PyPI, see
232232:doc: `/guides/using-testpypi `.
233233
234+ Now you'll create a PyPI `API token `_ so you will be able to securely upload
235+ your project.
236+
237+ Go to https://test.pypi.org/manage/account/#api-tokens and create a new
238+ `API token `_; don't limit its scope to a particular project, since you
239+ are creating a new project.
240+
241+ **Don't close the page until you have copied and saved the token — you
242+ won't see that token again. **
243+
244+ .. _API token : https://test.pypi.org/help/#apitoken
245+
234246Now that you are registered, you can use :ref: `twine ` to upload the
235247distribution packages. You'll need to install Twine:
236248
@@ -244,8 +256,11 @@ Once installed, run Twine to upload all of the archives under :file:`dist`:
244256
245257 python3 -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*
246258
247- You will be prompted for the username and password you registered with Test
248- PyPI. After the command completes, you should see output similar to this:
259+ You will be prompted for a username and password. For the username,
260+ use ``__token__ ``. For the password, use the token value, including
261+ the ``pypi- `` prefix.
262+
263+ After the command completes, you should see output similar to this:
249264
250265.. code-block :: bash
251266
0 commit comments