Publishing to PyPI
Publish your public-facing Fern Python SDK to the PyPI registry. After following the steps on this page, you’ll have a versioned package published on PyPI.

This page assumes that you have:
- An initialized
fern
folder on your local machine. See Set up thefern
folder. - A GitHub repository for your SDK. See Project Structure.
Configure generators.yml
Run fern add <generator>
Navigate to your generators.yml
on your local machine. Your generators.yml
lives inside of your fern
folder and contains all the configuration for your Fern generators.
Add a new generator to generators.yml
:
Once the command completes, you’ll see a new group created in your generators.yml
:
Configure output
location
Next, change the output location in generators.yml
from local-file-system
(the default) to pypi
to indicate that Fern should publish your package directly to the PyPI registry:
Add a unique package name
Your package name must be unique in the PyPI repository, otherwise publishing your SDK to PyPI will fail. Update your package name if you haven’t done so already:
Set up PyPi publishing authentication
Release your SDK to PyPI
At this point, you’re ready to generate a release for your SDK.