Skip to content

Commit 93967a6

Browse files
committed
new markdown resource. reworking flask page
1 parent 6bc5f07 commit 93967a6

File tree

2 files changed

+33
-30
lines changed

2 files changed

+33
-30
lines changed

content/pages/03-data/26-markdown.markdown

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,10 @@ or block quotes.
6666
view of Markdown and the reasons it provides are one reason why I use
6767
both Markdown and reStructuredText depending on the project.
6868

69+
* The Python Package Index (PyPI)
70+
[supports Markdown as of 2018](https://dustingram.com/articles/2018/03/16/markdown-descriptions-on-pypi)
71+
although there are still some tweaks being made to the flavors that can be
72+
used such as
73+
[GitHub-flavored Markdown](http://blog.jonparrott.com/github-flavored-markdown-on-pypi/).
74+
6975

content/pages/04-web-development/03-flask.markdown

Lines changed: 27 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,20 @@ meta: Flask is a popular, extensible web microframework for building web applica
88

99

1010
# Flask
11-
[Flask](http://flask.pocoo.org/) is a Python web framework built with a
11+
[Flask](http://flask.pocoo.org/) ([source code](https://github.com/pallets/flask))
12+
is a Python [web framework](/web-frameworks.html) built with a
1213
[small core and easy-to-extend philosophy](http://flask.pocoo.org/docs/design/).
1314

1415
<a href="http://flask.pocoo.org/" style="border: none;"><img src="/img/logos/flask.jpg" width="100%" alt="Official Flask logo. Flask Artwork License." class="technical-diagram"></a>
1516

1617

17-
## Why is Flask a good web framework choice?
18+
### Why is Flask a good web framework choice?
1819
Flask is considered more
1920
[Pythonic](http://blog.startifact.com/posts/older/what-is-pythonic.html)
20-
than Django because Flask web application code is in most cases more explicit.
21-
Flask is easy to get started with as a beginner because there is little
22-
boilerplate code for getting a simple app up and running.
21+
than the [Django](/django.html) web framework because in common situations the
22+
equivalent Flask web application is more explicit. Flask is also easy to get
23+
started with as a beginner because there is little boilerplate code for getting a
24+
simple app up and running.
2325

2426
For example, here is a valid "Hello, world!" web application with Flask:
2527

@@ -30,13 +32,15 @@ app = Flask(__name__)
3032

3133
@app.route('/')
3234
def hello_world():
33-
return 'Hello World!'
34-
35+
return 'Hello, World!'
3536

3637
if __name__ == '__main__':
3738
app.run()
3839
```
3940

41+
The above code shows "Hello, World!" on localhost port 5000 in a web browser
42+
when run with the `python app.py` command and the Flask library installed.
43+
4044
The equivalent "Hello, World!" web application using the [Django](/django.html)
4145
[web framework](/web-frameworks.html) would involve significantly more boilerplate
4246
code.
@@ -78,29 +82,11 @@ Jökull Sólberg wrote a great piece articulating to this effect in his
7882
book that are excellent resources worth the price, especially to support
7983
his continuous revisions to the content.
8084

81-
* If you're looking for a fun tutorial with Flask and WebSockets, check out
82-
my blog post on creating
83-
[Choose Your Own Adventure Presentations with Reveal.js, Python and WebSockets](https://www.twilio.com/blog/2014/11/choose-your-own-adventure-presentations-with-reveal-js-python-and-websockets.html).
84-
Follow up that tutorial by
85-
[building an admin interface in part 1](https://www.twilio.com/blog/2015/03/choose-your-own-adventures-presentations-wizard-mode-part-1-of-3.html),
86-
[part 2](https://www.twilio.com/blog/2015/05/choose-your-own-adventure-presentations-wizard-mode-part-2-of-3.html)
87-
and [part 3](https://www.twilio.com/blog/2015/07/choose-your-own-adventure-presentations-flask-reveal-js-websockets.html)
88-
that'll show you how to use forms and SQLAlchemy. There is also a
89-
companion open source
90-
[GitHub repository](https://github.com/mattmakai/choose-your-own-adventure-presentations)
91-
for the app with
92-
[tags for each step](https://github.com/mattmakai/choose-your-own-adventure-presentations/releases)
93-
in the blog posts.
94-
9585
* [Microservices with Flask, Docker, and React](https://testdriven.io/)
9686
teaches how to spin up a reproducible Flask development environment with
9787
[Docker](/docker.html). It shows how to deploy it to an Amazon EC2 instance
9888
then scale the services on Amazon EC2 Container Service (ECS).
9989

100-
* This [simple Flask app uses Twilio Voice](https://www.twilio.com/blog/2015/09/warm-phone-call-transfers-with-python-flask-and-twilio-voice.html)
101-
to do voice calling with three participants. It's a fun introduction
102-
to Python and Flask I wrote for the Twilio blog.
103-
10490
* [The Flask Extensions Registry](http://flask.pocoo.org/extensions/) is a
10591
curated list of the best packages that extend Flask. It's the first location
10692
to look through when you're wondering how to do something that's not in the
@@ -155,9 +141,20 @@ Jökull Sólberg wrote a great piece articulating to this effect in his
155141
[blueprints](http://flask.pocoo.org/docs/0.10/blueprints/) for large
156142
projects.
157143

158-
* [Video streaming with Flask](http://blog.miguelgrinberg.com/post/video-streaming-with-flask)
159-
is another fantastic tutorial by Miguel Grinberg that covers video
160-
streaming.
144+
* If you're looking for a fun tutorial with Flask and WebSockets, check out
145+
my blog post on creating
146+
[Choose Your Own Adventure Presentations with Reveal.js, Python and WebSockets](https://www.twilio.com/blog/2014/11/choose-your-own-adventure-presentations-with-reveal-js-python-and-websockets.html).
147+
Follow up that tutorial by
148+
[building an admin interface in part 1](https://www.twilio.com/blog/2015/03/choose-your-own-adventures-presentations-wizard-mode-part-1-of-3.html),
149+
[part 2](https://www.twilio.com/blog/2015/05/choose-your-own-adventure-presentations-wizard-mode-part-2-of-3.html)
150+
and [part 3](https://www.twilio.com/blog/2015/07/choose-your-own-adventure-presentations-flask-reveal-js-websockets.html)
151+
that'll show you how to use forms and SQLAlchemy. There is also a
152+
companion open source
153+
[GitHub repository](https://github.com/mattmakai/choose-your-own-adventure-presentations)
154+
for the app with
155+
[tags for each step](https://github.com/mattmakai/choose-your-own-adventure-presentations/releases)
156+
in the blog posts.
157+
161158

162159
* [One line of code cut our Flask page load times by 60%](https://medium.com/@5hreyans/the-one-weird-trick-that-cut-our-flask-page-load-time-by-70-87145335f679)
163160
is an important note about optimizing Flask template cache size to
@@ -185,7 +182,7 @@ Jökull Sólberg wrote a great piece articulating to this effect in his
185182
static website from a backend data source.
186183

187184

188-
## Open source Flask example projects
185+
### Open source Flask example projects
189186
* [Choose Your Own Adventure Presentations](https://github.com/mattmakai/choose-your-own-adventure-presentations)
190187
combines Flask with [Reveal.js](http://lab.hakim.se/reveal-js/) and text
191188
messages to create presentations where the audience can vote on how the
@@ -220,7 +217,7 @@ Jökull Sólberg wrote a great piece articulating to this effect in his
220217
psutils to display information about the computer it is running on.
221218

222219

223-
## Flask project templates
220+
### Flask project templates
224221
* Use the
225222
[Flask App Engine Template](https://github.com/kamalgill/flask-appengine-template)
226223
for getting set up on Google App Engine with Flask.

0 commit comments

Comments
 (0)