Publish your Python SDK with PyPI

To make your Python SDK publicly accessible, publish to PyPI. Once you’ve followed the steps below to connect your PyPI account to your SDK, Fern will automatically publish the latest version of your SDK.

Creating a PyPI token

1

Log In

Log into PyPI.

3

Create API Token

Scroll down to API tokens and click Create API token. Name your token and set the scope to the relevant projects. Once finished, click Create token.

Save your token

Be sure to save the generated token - it won’t be displayed after you leave the page.

Adding tokens to your GitHub repository

Using GitLab? Follow these steps.

1

Open Repository

Open your Fern repository in GitHub.

3

Add Secret

Select New repository secret. Name your secret (we recommend PYPI_TOKEN), add the corresponding token, and click Add secret.

Once you regenerate your SDK, a GitHub action will run to publish directly to PyPI!