Using this repository, you can easily start a REST API server. This server will automatically create an OpenAPI json file and can be checked in localhost/redoc after startup. If you want to use this startkit, you need to use Docker.
- Clone this repository and run the command.
# init start
docker-compose up --build
# start after the second time
docker-compose up
- Open your browser and go to http://localhost/countries?country_id=1.
- You can get the results of the RESTAPI.
The directory that contains the SQL file to be executed when the RESTAPI is first started.
Currently, init.sql
will be executed.
It is created when the RESTAPI is first started, and it persists postgres.
router.py
will be the entry point for routing.
The subfile calls /fastapi/database
to retrieve the data.
The directory for executing SQL commands to the database.
This is the directory that defines the middleware that will be executed when the request is retrieved.
This is the directory for defining the types to be displayed in OPENAPI.
Other utility directory.