- Template: AI Helpers API template
- Description: My project description
$ poetry install
[...]
Package operations: 44 installs, 0 updates, 0 removals
[...]
$ poetry run api-example
[\2024-05-28 15:58:59,332] {\root} \INFO - \[API] Starting service with version 0.1.0...
[\2024-05-28 15:58:59,332] {\root} \INFO - \[API] Log level set to DEBUG
[\2024-05-28 15:58:59,332] {\api_example.cli} \INFO - \[API] Log level set to DEBUG
[\2024-05-28 15:58:59,332] {\api_example.cli} \INFO - \[API] API service starting on 0.0.0.0:80
[\2024-05-28 15:59:15,529] {\uvicorn.error} \INFO - \Started server process [98569]
[\2024-05-28 15:59:15,529] {\uvicorn.error} \INFO - \Waiting for application startup.
[\2024-05-28 15:59:15,529] {\uvicorn.error} \INFO - \Application startup complete.
[\2024-05-28 15:59:15,534] {\uvicorn.error} \INFO - \Uvicorn running on http://0.0.0.0:80 (Press CTRL+C to quit)A simple endpoint to check the health of the application.
GET /healthReturns a status message indicating the service is up and running.
Provides information about the application.
GET /infoReturns metadata such as version, author, and other relevant details (cf. data/info.txt)
Endpoint for making predictions based on input data.
POST /predictAccepts a JSON payload with the necessary input data and returns the prediction results.
Endpoint for testing purposes.
GET /testReturns a test response, useful for debugging and ensuring the endpoint is reachable.
FastAPI provides interactive API documentation.
GET /docsAccess the Swagger UI for a user-friendly interface to interact with your API.
GET /redocAccess the ReDoc interface for an alternative documentation style.
├── api-example
│ ├── .github <- Github Actions CICD
│ ├── data
│ ├── docs <- Sphinx documentation
│ ├── src
│ └── api_example <- Core of project
│ │ ├── endpoints <- API endpoints definition
│ │ ├── settings <- settings
│ │ ├── __init__.py
│ │ ├── app.py
│ │ ├── cli.py
│ │ ├── errors
│ │ ├── load_model.py
│ │ └── setup_logging.py
│ ├── tasks <- Makefile tasks
│ ├── tests <- tests (units tests, data tests)
│ ├── .gitignore
│ ├── .mypy.ini
│ ├── Makefile
│ ├── poetry.toml
│ ├── pyproject.toml
└── README.md
Your contributions are valued! Please feel free to open issues or submit pull requests.
Let me know if you'd like any other sections added!