Installation¶
FastOpenAPI is available on PyPI and supports Python 3.10 and above.
Requirements¶
- Python 3.10+ - Required for modern type hints and Pydantic v2 support
- Pydantic v2 - Automatically installed as a dependency
- (Optional) A web framework - Install separately or use extras
Basic Installation¶
Install FastOpenAPI using pip:
This installs the core library with Pydantic v2. You'll need to install your web framework separately if you don't have it already.
Installation with Framework Extras¶
To install FastOpenAPI along with a specific framework, use one of the following extras:
AIOHTTP¶
Installs FastOpenAPI with aiohttp.
Django¶
Installs FastOpenAPI with Django.
Falcon¶
Installs FastOpenAPI with Falcon (ASGI/WSGI support).
Flask¶
Installs FastOpenAPI with Flask.
Quart¶
Installs FastOpenAPI with Quart (async Flask alternative).
Sanic¶
Installs FastOpenAPI with Sanic.
Starlette¶
Installs FastOpenAPI with Starlette.
Tornado¶
Installs FastOpenAPI with Tornado.
Installing Multiple Frameworks¶
If you need to work with multiple frameworks (e.g., for testing or library development), you can install multiple extras:
Development Installation¶
To contribute to FastOpenAPI or run tests, clone the repository and install in development mode:
This installs FastOpenAPI with all development dependencies and framework extras.
Verifying Installation¶
After installation, verify that FastOpenAPI is correctly installed:
You should see the version number (e.g., 1.0.0rc1).
Upgrading¶
To upgrade FastOpenAPI to the latest version:
To upgrade with extras:
Troubleshooting¶
ImportError for a specific framework¶
If you get an ImportError when trying to use a specific router:
Solution: Install the framework extra:
Or install the framework separately:
Pydantic v1 vs v2¶
FastOpenAPI requires Pydantic v2. If you have Pydantic v1 installed, you may encounter compatibility issues.
Check your Pydantic version:
Upgrade to Pydantic v2:
Python Version Issues¶
FastOpenAPI requires Python 3.10 or higher. Check your Python version:
If you have an older version, consider using pyenv to manage multiple Python versions.
Next Steps¶
Now that FastOpenAPI is installed, continue to:
- Quickstart - Build your first API
- Core Concepts - Understand the fundamentals
- Framework Guides - Choose your framework