Posts

Showing posts with the label Web

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

How to Flask with Python : Making of a Flask website

Flask is the one of the most popular Micro Framework which enables programmers to quickly build web applications. Linkedin, Pinterest are some of the finest examples of this framework. The Framework was initially coded by Armin Ronacher of Pocoo. Let's start with Installation Install Flask First up all you need to install Python on your system if you don't have to get one from www.python.org. You can install Flask from Python Package Index which requires the PIP command and an internet connection. Learn how to get PIP? Install flask using the following command line, the simplest way to install Flask on your system. On Windows go to your command prompt/shell and issue the pip command. D:/> pip install flask It will take some time to finish the procedures. Uninstalling Flask D:/> pip install flask will remove Flask packages from your system Create your first App Flask is Fun Create a file called hello.py from flask import Flask app =...