Skip to content

Quickstart

CRAG666 edited this page Jun 22, 2020 · 4 revisions

Welcome to the make-flask-api wiki!

Assuming you already read README.md file

Create a new project!

create project

The created project does not yet have a virtual environment; use the one of your preference or use poetry already integrated in mfa. requirements.txt is created automatically

Create a new project and install dependencies

create project indep

Try out

Just enter the project folder start the virtual environment and run run.py create project indep

Endpoints

The endpoints you can use for this example:

  • GET localhost:5000/example/ -> returns all records
  • GET localhost:5000/example/<id> -> returns a record passed by id
  • GET localhost:5000/example/?page=<num_page>&size=<records_per_page> -> page all records
  • POST localhost:5000/example/ -> create new record
  • PUT localhost:5000/example/<id> -> update record for id
  • DELETE localhost:5000/example/<id> -> delete record for id
Clone this wiki locally