Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions source/tutorials/packaging-projects.rst
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,12 @@ PyPI, which isn't a permanent storage. The Test system occasionally deletes
packages and accounts. It is best to use TestPyPI for testing and experiments
like this tutorial.

.. tip::

For projects published through a supported CI/CD platform, we recommend
:ref:`Trusted Publishing <trusted-publishing>` instead of storing a long-lived
API token. The linked guide shows how to set this up with GitHub Actions.

When you are ready to upload a real package to the Python Package Index you can
do much the same as you did in this tutorial, but with these important
differences:
Expand All @@ -500,10 +506,10 @@ differences:
* Register an account on https://pypi.org - note that these are two separate
servers and the login details from the test server are not shared with the
main server.
* Use ``twine upload dist/*`` to upload your package and enter your credentials
for the account you registered on the real PyPI. Now that you're uploading
the package in production, you don't need to specify ``--repository``; the
package will upload to https://pypi.org/ by default.
* For a manual upload, use ``twine upload dist/*`` to upload your package and
enter your credentials for the account you registered on the real PyPI. Now
that you're uploading the package in production, you don't need to specify
``--repository``; the package will upload to https://pypi.org/ by default.
* Install your package from the real PyPI using ``python3 -m pip install [your-package]``.

At this point if you want to read more on packaging Python libraries here are
Expand Down
Loading