Zum Hauptinhalt springen
Echtzeit-Radar & Feeds
Alle RSS Feeds ➔
👥 Community & Social
•
AI & KI NachrichtenKoi(30.09.2026 um 13:45 Uhr)
•
IT Security ToolsPIForge(30.09.2026 um 14:45 Uhr)
•••
IT Security NachrichtenFirefox 157 released with new Nova user interface and Compact Mode(30.09.2026 um 14:49 Uhr)
••••
IT Security NachrichtenGNW-News: Sekoia Elevate macht autonome Cyberabwehr zur Realität(30.09.2026 um 14:07 Uhr)
••
AI & KI NachrichtenKoi(30.09.2026 um 13:45 Uhr)
•
IT Security ToolsPIForge(30.09.2026 um 14:45 Uhr)
•••
IT Security NachrichtenFirefox 157 released with new Nova user interface and Compact Mode(30.09.2026 um 14:49 Uhr)
••••
IT Security NachrichtenGNW-News: Sekoia Elevate macht autonome Cyberabwehr zur Realität(30.09.2026 um 14:07 Uhr)
•
Intelligence View
⚡ tsecurity.de Intelligence

Python Flask: Hello World

The de-facto standard first thing to do in programming in every language or framework is to print "Hello World" on the screen. This is what we are going to do with Flask now. This is probably the most simple Flask application. For this we…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!

The de-facto standard first thing to do in programming in every language or framework is to print "Hello World" on the screen.

This is what we are going to do with Flask now. This is probably the most simple Flask application.



For this we need to create regular Python file, for example app.py. I'd recommend you first create a new empty directory and

put the file inside that directory.



The first thing is to load the Flask class from the flask module.



Then we create an object representing the whole application. You could use any variable name for this, but the "standard" is to use

the name app.



Then comes the interesting part. We declare a function that will return the HTML page.

In our example the name of the function is main, but the name actually is not important. You could as well call it some_other_name.

The important part is the decorator above it. That decorator means that if someone reaches the path / on the web site, this function will

be executed and whatever it returns will be sent back to the browser. This mapping of a path to a function is called URL routing and we'll

discuss it in detail later on.



For now, let's see how we can use this.




from flask import Flask

app = Flask(__name__)

@app.route("/")
def main():
return "Hello World!"






Check out the full book: Python Flask

Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Python Flask: Hello World

Thematisch verwandte Begriffe: Python, Flask, Hello, World · 6 Treffer

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

💬 Kommentare werden geladen…
Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-97150 | When converting baserCMS4-style addons to baserCMS5-style ones, BcAddon…
Advisory →
tsecurity.de Icon
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag