How to create a website in Python - Python Flask tutorial - First basic website
How to create a website in Python - Python Flask tutorial - First basic website
Python is a very popular language right now. Many big companies are using it. Python is used in most of the fields. You can create softwares, basic games as well as websites in Python. In web development, Python's libraries are considered very good for making backends. Even companies like Netflix use Python in their backend.
Basically, there are two main Python libraries, with which you can learn wen development and create a backend for your site. First is Flask, the other is Django. Flask is a little simple.
Here I will show how you can make your first Python website with Flask...
Process
- Install the Flask library, by running the command pip install flask in your terminal.
- Then you are ready for making your first Flask App
- To get your first app, Create a new file and paste the below code. This is the basic structure of a Flask application.
The Code
Congratulations, you have made your first Flask app.
Now open the terminal and run the command flask run
Previous Post:
PyQt5 Basic code
import sys
from PyQt5.QtCore import *
from PyQt5.QtWidgets import *
class MainWindow(QMainWindow):
def __init__(self):
# Main Window
super(MainWindow, self).__init__()
self.showMaximized()
app = QApplication(sys.argv)
QApplication.setApplicationName("Browser")
window = MainWindow()
app.exec_()
4 Comments
More python tutorials please
ReplyDeletePlease be a little consistent
ReplyDeleteBhai ek mahina ho gya almost last post ke baad... Where are you?
ReplyDeleteWill you continue the Flask tutorial series?
ReplyDelete