Skip to main content

Publish

Finally, let's be brave and publish our package to PyPI. There's no good reason for you not to do this, as it's free and easy to do, and it's an awesome thing to be able to say you've done!

0 - Create or log in to PyPI

Next, we need to create an account on PyPI, or log in if we already have one. You can do this at https://pypi.org/account/register/.

1 - Create an API token

Go to https://pypi.org/manage/account/token/ and create a new API token. Make sure to copy the token somewhere safe, as you won't be able to see it again.

2 - Add the token to Poetry

poetry config pypi-token.pypi your-token-you-just-created

3 - Build

Now we need to build the package.

poetry build

4 - Publish

Run the following command to publish the package to PyPI:

poetry publish

Note

The name you give your package must be unique on PyPI. If you try to publish a package with a name that already exists, you'll get an error. I've renamed my package to mandybrot to avoid this problem.


5 - Install

In another project, we can now install mandybrot like any other package!

[tool.poetry.dependencies]
mandybrot = "^0.0.0"

Metadata

Release files for mandybrot 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mandybrot 0.0.1
File Size Uploaded
mandybrot-0.0.1.tar.gz 2.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mandybrot 0.0.1
File Interpreter ABI Platform
mandybrot-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 4.9 kB

Release files / mandybrot-0.0.1.tar.gz

Download URL mandybrot-0.0.1.tar.gz
Size 2.1 kB
Tags Source
SHA-256 checksum
How to use checksums
3e7a18c451c9217a1b2dcc75a902963098522296040f610e10adea0acb46f663
BLAKE2b-256 checksum
How to use checksums
247853508c7f5a3f35db6cfbbd30bc747b39ec34121fdbb10709ead96f04195b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.0 CPython/3.11.2 Darwin/22.1.0

Release files / mandybrot-0.0.1-py3-none-any.whl

Download URL mandybrot-0.0.1-py3-none-any.whl
Size 2.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b9caef7918f9eed2a2303631b987dddd092c328f548c226955701f2971198007
BLAKE2b-256 checksum
How to use checksums
37c987ae92b4e21e9f165ae5871b50a1aa1b67ec142f1561e3a56abeb9548041
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.0 CPython/3.11.2 Darwin/22.1.0

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page