Home Page Microblog


(venv) $ pip install flask



Download 2,44 Mb.
Pdf ko'rish
bet8/17
Sana30.12.2021
Hajmi2,44 Mb.
#90837
1   ...   4   5   6   7   8   9   10   11   ...   17
Bog'liq
mega-tutorial

(venv) $ pip install flask

If you want to confirm that your virtual environment now has Flask installed, you can start the

Python interpreter and import Flask into it:



1.3. A “HELLO, WORLD” FLASK APPLICATION

5

>>>



import

flask

>>>

_

If this statement does not give you any errors you can congratulate yourself, as Flask is installed

and ready to be used.

1.3


A “Hello, World” Flask Application

If you go to the

Flask website

, you are welcomed with a very simple example application

that has just five lines of code. Instead of repeating that trivial example, I’m going to show

you a slightly more elaborate one that will give you a good base structure for writing larger

applications.

The application will exist in a package. In Python, a sub-directory that includes a __init__.py

file is considered a package, and can be imported. When you import a package, the __init__.py

executes and defines what symbols the package exposes to the outside world.

Let’s create a package called

app

, that will host the application. Make sure you are in the



microblog directory and then run the following command:


Download 2,44 Mb.

Do'stlaringiz bilan baham:
1   ...   4   5   6   7   8   9   10   11   ...   17




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish