Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/antonio-pedro99/fastapi_notes
This project is just a showcase on how to use Python as backend for flutter application and deploy them using heroku.
https://github.com/antonio-pedro99/fastapi_notes
fastapi fastapi-crud fastapi-sqlalchemy orm python restful-api sqlite-database
Last synced: 24 days ago
JSON representation
This project is just a showcase on how to use Python as backend for flutter application and deploy them using heroku.
- Host: GitHub
- URL: https://github.com/antonio-pedro99/fastapi_notes
- Owner: antonio-pedro99
- Created: 2021-05-21T13:36:25.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-07-26T15:32:45.000Z (over 2 years ago)
- Last Synced: 2023-03-10T01:17:09.531Z (over 1 year ago)
- Topics: fastapi, fastapi-crud, fastapi-sqlalchemy, orm, python, restful-api, sqlite-database
- Language: Python
- Homepage:
- Size: 24.4 KB
- Stars: 12
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# FastAPI + Flutter + Heroku
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
## FastAPI
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
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).
## Backend anatomy
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
### SQL
our SQL looks likeCREATE TABLE notes (
id int not null primary key auto_increment,
text varchar(255) not null,
completed boolean not null default 0
);
## Endpoints### Post
URL_HOST/notes/ create a new note
### Get
URL_HOST/notes/ get all notes
URL_HOST can be your localhost(in development) or your heroku-project-name-herokuapp.com/ (in production)
### FastAPI Swagger Ui
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
![image](https://user-images.githubusercontent.com/42675180/159958799-ae5ae91a-a062-49d2-b99e-138cd87531cb.png)