Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Sippy Cup: A beginner's guide to Flask
Search
Steve Gattuso
June 28, 2013
Technology
380
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Sippy Cup: A beginner's guide to Flask
A talk I gave to my fellow hackNY fellows.
Steve Gattuso
June 28, 2013
Other Decks in Technology
See All in Technology
JAWS-UGグッズ職人仕事の流儀
kentapapa
0
100
Webの常識が通じないHTMLメールのダークモード
teamlab
PRO
0
120
10年後、Engineering 行為を剥奪されるとして、わたしたちは、どう、何を創ればいいだろうか。 / If Engineering Is Taken Away in 10 Years, How and What Should We Create?
bitkey
PRO
1
190
Railsで挑む大量データ永続化 〜600億件を永続化するための設計とボトルネックとの戦い〜
occhi
1
580
NDIでApple Vision Proにリアルタイム映像送信
jyouryuusui
0
120
Active Record Connection Adaptersにおける長年の課題に再び取り組む
yahonda
0
150
Getting Started with Google Antigravity
glaforge
0
300
今さら理解するウェブフォントver.2026
takanorip
3
770
子育てエンジニアの可処分時間が減っても成長を諦めない戦い方
sudoakiy
6
4.6k
go-sqletch
moznion
0
140
サブエージェントと Claude Mods で作る独自 Advisor ツールの話
kenichiodo
2
160
フロントエンドカンファレンス関西2026 - 速すぎるUIに、待ち時間を
teamlab
PRO
0
130
Featured
See All Featured
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
50
10k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
69
67k
The Curse of the Amulet
leimatthew05
3
16k
Are puppies a ranking factor?
jonoalderson
2
4.1k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.9k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Heart Work Chapter 1 - Part 1
lfama
PRO
10
37k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
930
Ethics towards AI in product and experience design
skipperchong
2
430
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Transcript
sippy cup @stevenleeg a beginner’s guide to flask
what is flask?
None
hello world from flask import Flask app = Flask(__name__) @app.route("/")
def index(): return "Hello world" if __name__ == "__main__": app.run()
None
it makes sense
templates
@app.route("/") def index(): name = request.args.get("name", None) friends = ["steve",
"hankcy", "rochacko"] return render_template("index.html", name = name, friends = friends ) templates
{% if name %} Hey there! Your name is {{name}}.
{% endif %} <h1>Friends</h1> <ul> {% for friend in friends %} <li>{{friend|capitalize}}</li> {% endfor %} </ul> templates
None
None
extensions
None
None
None
None
from testapp import app from flask.ext.sqlalchemy import SQLAlchemy db =
SQLAlchemy(app) class Person(db.Model): id = db.Column(db.Integer, primary_key = True) name = db.Column(db.String) age = db.Column(db.Integer) def __init__(self, name, age): self.name = name self.age = age
me = Person("Steve", 18) me.age += 1 bot = Person("Hankcy",
0) db.session.add(me) db.session.add(bot) db.session.commit()
>>> bot = Person.query.filter_by(name="Hankcy").first() <User u"Hankcy">
>>> people = Person.query.all() [<Person u"Steve">, <Person u"Hankcy">]
hankcy.age += 1 db.session.add(hankcy) db.session.commit()
db.session.delete(hankcy) db.session.commit()
None
beyond hello world
bigger codebases python packages virtualenv
deployment
deployment +
deployment +
deployment +
Just play with it
have fun! @stevenleeg