Files
openapi-generator/samples/server/petstore/python-fastapi/README.md
William Cheng 9adfe986a3 Prepare v7.20.0 release (#22738)
* Revert "v7.19.0 release (#22732)"

This reverts commit ff400e9a31.

* prepare v7.20.0 release

* update samples

* update doc
2026-01-20 03:13:58 +08:00

863 B

OpenAPI generated FastAPI server

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.0
  • Generator version: 7.20.0-SNAPSHOT
  • Build package: org.openapitools.codegen.languages.PythonFastAPIServerCodegen

Requirements.

Python >= 3.7

Installation & Usage

To run the server, please execute the following from the root directory:

pip3 install -r requirements.txt
PYTHONPATH=src uvicorn openapi_server.main:app --host 0.0.0.0 --port 8080

and open your browser at http://localhost:8080/docs/ to see the docs.

Running with Docker

To run the server on a Docker container, please execute the following from the root directory:

docker compose up --build

Tests

To run the tests:

pip3 install pytest
PYTHONPATH=src pytest tests