forked from loafle/openapi-generator-original
* Delete sample folders of discontinued clients * Remove duplicate python-flask server sample The python-flask sample actually lives in samples/server/petstore/python-flask. * Move hand-written test to "tests" folder Now, "test" only contains generated stubs and all hand-written tests are in "tests". * Delete left-over files in Python samples These are not created by the generators (anymore) and not hand-written for testing. * Regenerate test file to fix import error
OpenAPI generated FastAPI server
This Python package is automatically generated by the OpenAPI Generator project:
- API version: 1.0.0
- 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
uvicorn 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