Flask SQLAlchemy
Sqlalchemy
- Flask SQLAlchemy is an ORM tool.
- It is establishes the relationship between the objects and the tables of the relational databases.
- The object-relational mapping is the technique of storing python objects into the database tables without writing the raw SQL queries.
Install flask-sqlalchemy:
- Using pip installer, we must need to install flask-sqlalchemy.
$ pip install flask-sqlalchemy
- To confirm the installation, We need to import the module on the python shell. If it is successfully imported, the installation is successful.
$ import flask_sqlalchemy
Creating a small web application using flask-sqlalchemy
Here we will create a CRUD Application in python using ORM SQLAlchemy.
Sample Code
add.html
list_employees.html
app.py
Employe Management System
- Click on the link Add new Employee
Add New Employee
- Click on Submit, and we will see the newly added employee in the list on the home page.
Added Employee
If you want to learn about Python Course , you can refer the following links Python Training in Chennai , Machine Learning Training in Chennai , Data Science Training in Chennai , Artificial Intelligence Training in Chennai