Posts

Showing posts from August, 2017

SqlAlchemy[SQLite] database connection in Python-Flask

Flask is a Python framework which can be used to build the web application from scratch. Flask is a micro-framework which capable to build websites like Instagram, twitter and anything at programmers will. SqlAlchemy is a package in Python Flask which simplifies database connections. The following simple Application will explain ..... how. This project was built on windows OS and Pycharm IDE The connection string from flask_sqlalchemy import SQLAlchemy app = Flask(__name__) app.config['DATABASE_FILE'] = 'app2.db' app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///' + app.config['DATABASE_FILE'] app.config['SECRET_KEY'] = '123456790' db = SQLAlchemy(app) So the db is like the cursor to the database. Read More The complete SQLite Project can be downloaded from GitHub