Initial Local Setup
Make sure that Python is already installed on your computer along with a way to create virtual environments. This allows you to run your project locally, and test that it works, before deploying it to Fly.io.We recommend the latest supported versions of Python.
Dependency Management
For project and dependency management we use Poetry. Like most package managers, Poetry combines multiple tools in one. You have other options: If you are just starting out, it is easiest to follow along usingpoetry.
After installing it, you will have to set 2 flags for virtual environment management.
poetry run:
If you’re using Poetry 2.0+ (the default when installed via
pipx), the poetry shell command is no longer built in. Use poetry run (recommended) or poetry env activate as shown above. If you prefer poetry shell, you can install it as a plugin: poetry self add poetry-plugin-shell.