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
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
AIと一緒にレガシーに向き合ってみた
nyafunta9858
0
250
コントリビューターによるDenoのすゝめ / Deno Recommendations by a Contributor
petamoriken
0
210
生成AIを活用したソフトウェア開発ライフサイクル変革の現在値
hiroyukimori
PRO
0
100
カスタマーサクセス業務を変革したヘルススコアの実現と学び
_hummer0724
0
730
AgentCoreとHuman in the Loop
har1101
5
240
並行開発のためのコードレビュー
miyukiw
0
880
KIKI_MBSD Cybersecurity Challenges 2025
ikema
0
1.3k
16年目のピクシブ百科事典を支える最新の技術基盤 / The Modern Tech Stack Powering Pixiv Encyclopedia in its 16th Year
ahuglajbclajep
5
1k
AIで開発はどれくらい加速したのか?AIエージェントによるコード生成を、現場の評価と研究開発の評価の両面からdeep diveしてみる
daisuketakeda
1
2.5k
Basic Architectures
denyspoltorak
0
680
Vibe Coding - AI 驅動的軟體開發
mickyp100
0
180
FOSDEM 2026: STUNMESH-go: Building P2P WireGuard Mesh Without Self-Hosted Infrastructure
tjjh89017
0
170
Featured
See All Featured
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.1k
GraphQLとの向き合い方2022年版
quramy
50
14k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
180
BBQ
matthewcrist
89
10k
AI: The stuff that nobody shows you
jnunemaker
PRO
2
270
Design in an AI World
tapps
0
140
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
Ruling the World: When Life Gets Gamed
codingconduct
0
150
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
320
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
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