Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Flask - O pequeno príncipe
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Diego Toral
December 12, 2015
Programming
0
170
Flask - O pequeno príncipe
Diego Toral
December 12, 2015
Tweet
Share
Other Decks in Programming
See All in Programming
360° Signals in Angular: Signal Forms with SignalStore & Resources @ngLondon 01/2026
manfredsteyer
PRO
0
130
LLM Observabilityによる 対話型音声AIアプリケーションの安定運用
gekko0114
2
430
組織で育むオブザーバビリティ
ryota_hnk
0
180
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
7
2.3k
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
390
16年目のピクシブ百科事典を支える最新の技術基盤 / The Modern Tech Stack Powering Pixiv Encyclopedia in its 16th Year
ahuglajbclajep
5
1k
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
200
要求定義・仕様記述・設計・検証の手引き - 理論から学ぶ明確で統一された成果物定義
orgachem
PRO
1
190
ノイジーネイバー問題を解決する 公平なキューイング
occhi
0
110
責任感のあるCloudWatchアラームを設計しよう
akihisaikeda
3
180
FOSDEM 2026: STUNMESH-go: Building P2P WireGuard Mesh Without Self-Hosted Infrastructure
tjjh89017
0
170
Oxlintはいいぞ
yug1224
5
1.4k
Featured
See All Featured
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.1k
Bash Introduction
62gerente
615
210k
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
71
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
9.6k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
1.9k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.3k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
86
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
320
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
67
Information Architects: The Missing Link in Design Systems
soysaucechin
0
780
Transcript
O pequeno príncipe
A gente só conhece bem as coisas que cativou, disse
a raposa. - O pequeno príncipe
cativar Ficar apaixonado por; enamorar-se http://www.dicio.com.br/cativar/
Diego Toral Python and Ruby developer gh://diegotoral | fb://diegootoral |
http://diegotoral.me
vim falar sobre
framework micro
freedom estrutura ✦ banco de dados
1 from flask import Flask 2 3 app = Flask('foobar')
4 5 @app.route('/') 6 def hello(): 7 return 'Hello World!' 8 9 if __name__ == '__main__': 10 app.run() $ python hello.py * Running on http://localhost:5000/
configuração development / production $ pip install flask-environments 1 def
config_app(app): 2 env = os.getenv('FLASK_ENV', 'development') 3 app.config.from_object('foobar.config.default') 4 app.config.from_pyfile('config/%s.py' % env)
o logger app.logger.debug('A long time ago') app.logger.warning('in a galaxy far,
') app.logger.error('far away..') use
templates 1 <h1>Hello {{ name }}</h1> 2 3 {% if
with_yoda %} 4 <p>Do or do not. There is no try.</p> 5 {% endif %} +JOKB 1 from flask import Flask, render_template 2 3 @app.route('/') 4 def hello(): 5 return render_template('hello.html', name='Luke', with_yoda=True)
DADOS #"/$0de 1 from flask import Flask 2 from flask.ext.mongoengine
import MongoEngine 3 4 app = Flask(__name__) 5 db = MongoEngine(app) $ pip install flask-mongoengine 1 from flask import Flask 2 from flask_sqlalchemy import SQLAlchemy 3 4 app = Flask(__name__) 5 app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:////tmp/test.db' 6 db = SQLAlchemy(app) $ pip install flask-sqlalchemy
no mundo real
13Ó9*.04 passos ler a documentação criar algo simples se desafiar
None