This project is just a showcase on how to use Python as backend for flutter application and deploy them using heroku.
This project was mentioned on https://github.com/antonio-pedro99/fastapi_example
To build the backend, I used FastAPI which is a modern, fast (high-performance), web framework for building APIs with Python 3.6+ based on standard Python type hints. FastAPI has many features and the keys one are fast, fast to code, fewer bugs, intuitive, easy, Short, Robust. It is very easy to design and document APIs with FastAPI, that is one of the reason I like it. Fast API also supports ORMs, and in this app we used Sqlalchemy our SQLite database.
Reading: https://fastapi.tiangolo.com/
Heroku is a cloud platform as a service supporting several programming languages. One of the first cloud platforms(read more https://en.wikipedia.org/wiki/Heroku).
This a very simple notes app and the strutect of the notes are as follows:
Notes:
- id : integer value
- text: string value
- completed: boolean value
our SQL looks like
CREATE TABLE notes ( id int not null primary key auto_increment, text varchar(255) not null, completed boolean not null default 0 );
URL_HOST/notes/ create a new note
URL_HOST/notes/ get all notes
URL_HOST can be your localhost(in development) or your heroku-project-name-herokuapp.com/ (in production)
FastAPI is very useful when it comes to documentation of your api, through Swagger you will be able to have your API's docs without any effort