<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en-us" xmlns="http://www.w3.org/2005/Atom"><title>Simon Willison's Weblog: flask</title><link href="http://simonwillison.net/" rel="alternate"/><link href="http://simonwillison.net/tags/flask.atom" rel="self"/><id>http://simonwillison.net/</id><updated>2024-10-09T15:22:04+00:00</updated><author><name>Simon Willison</name></author><entry><title>otterwiki</title><link href="https://simonwillison.net/2024/Oct/9/otterwiki/#atom-tag" rel="alternate"/><published>2024-10-09T15:22:04+00:00</published><updated>2024-10-09T15:22:04+00:00</updated><id>https://simonwillison.net/2024/Oct/9/otterwiki/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/redimp/otterwiki"&gt;otterwiki&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
It's been a while since I've seen a new-ish Wiki implementation, and this one by  Ralph Thesen is really nice. It's written in Python (Flask + SQLAlchemy + &lt;a href="https://github.com/lepture/mistune"&gt;mistune&lt;/a&gt; for Markdown + &lt;a href="https://github.com/gitpython-developers/GitPython"&gt;GitPython&lt;/a&gt;) and keeps all of the actual wiki content as Markdown files in a local Git repository.&lt;/p&gt;
&lt;p&gt;The &lt;a href="https://otterwiki.com/Installation"&gt;installation instructions&lt;/a&gt; are a little in-depth as they assume a production installation with Docker or systemd - I figured out &lt;a href="https://github.com/redimp/otterwiki/issues/146"&gt;this recipe&lt;/a&gt; for trying it locally using &lt;code&gt;uv&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;git clone https://github.com/redimp/otterwiki.git
cd otterwiki

mkdir -p app-data/repository
git init app-data/repository

echo "REPOSITORY='${PWD}/app-data/repository'" &amp;gt;&amp;gt; settings.cfg
echo "SQLALCHEMY_DATABASE_URI='sqlite:///${PWD}/app-data/db.sqlite'" &amp;gt;&amp;gt; settings.cfg
echo "SECRET_KEY='$(echo $RANDOM | md5sum | head -c 16)'" &amp;gt;&amp;gt; settings.cfg

export OTTERWIKI_SETTINGS=$PWD/settings.cfg
uv run --with gunicorn gunicorn --bind 127.0.0.1:8080 otterwiki.server:app
&lt;/code&gt;&lt;/pre&gt;

    &lt;p&gt;&lt;small&gt;&lt;/small&gt;Via &lt;a href="https://news.ycombinator.com/item?id=41749680"&gt;Hacker News&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/flask"&gt;flask&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/git"&gt;git&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/sqlalchemy"&gt;sqlalchemy&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/sqlite"&gt;sqlite&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/markdown"&gt;markdown&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/wikis"&gt;wikis&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/uv"&gt;uv&lt;/a&gt;&lt;/p&gt;



</summary><category term="flask"/><category term="git"/><category term="python"/><category term="sqlalchemy"/><category term="sqlite"/><category term="markdown"/><category term="wikis"/><category term="uv"/></entry><entry><title>Quoting Using async and await in Flask 2.0</title><link href="https://simonwillison.net/2021/May/12/using-async-and-await/#atom-tag" rel="alternate"/><published>2021-05-12T17:59:51+00:00</published><updated>2021-05-12T17:59:51+00:00</updated><id>https://simonwillison.net/2021/May/12/using-async-and-await/#atom-tag</id><summary type="html">
    &lt;blockquote cite="https://flask.palletsprojects.com/en/2.0.x/async-await/"&gt;&lt;p&gt;Async functions require an event loop to run. Flask, as a WSGI application, uses one worker to handle one request/response cycle. When a request comes in to an async view, Flask will start an event loop in a thread, run the view function there, then return the result.&lt;/p&gt;
&lt;p&gt;Each request still ties up one worker, even for async views. The upside is that you can run async code within a view, for example to make multiple concurrent database queries, HTTP requests to an external API, etc. However, the number of requests your application can handle at one time will remain the same.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p class="cite"&gt;&amp;mdash; &lt;a href="https://flask.palletsprojects.com/en/2.0.x/async-await/"&gt;Using async and await in Flask 2.0&lt;/a&gt;&lt;/p&gt;

    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/async"&gt;async&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/flask"&gt;flask&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/wsgi"&gt;wsgi&lt;/a&gt;&lt;/p&gt;



</summary><category term="async"/><category term="flask"/><category term="python"/><category term="wsgi"/></entry><entry><title>New Major Versions Released! Flask 2.0, Werkzeug 2.0, Jinja 3.0, Click 8.0, ItsDangerous 2.0, and MarkupSafe 2.0</title><link href="https://simonwillison.net/2021/May/12/pallets/#atom-tag" rel="alternate"/><published>2021-05-12T17:37:14+00:00</published><updated>2021-05-12T17:37:14+00:00</updated><id>https://simonwillison.net/2021/May/12/pallets/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://palletsprojects.com/blog/flask-2-0-released/"&gt;New Major Versions Released! Flask 2.0, Werkzeug 2.0, Jinja 3.0, Click 8.0, ItsDangerous 2.0, and MarkupSafe 2.0&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Huge set of releases from the Pallets team. Python 3.6+ required and comprehensive type annotations. Flask now supports async views, Jinja async templates (used extensively by Datasette) “no longer requires patching”, Click has a bunch of new code around shell tab completion, ItsDangerous supports key rotation and so much more.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/async"&gt;async&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/flask"&gt;flask&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/jinja"&gt;jinja&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;&lt;/p&gt;



</summary><category term="async"/><category term="flask"/><category term="jinja"/><category term="python"/></entry><entry><title>Do Flask and Django have a GUI interface like web2py?</title><link href="https://simonwillison.net/2013/Jun/14/do-flask-and-django/#atom-tag" rel="alternate"/><published>2013-06-14T11:20:00+00:00</published><updated>2013-06-14T11:20:00+00:00</updated><id>https://simonwillison.net/2013/Jun/14/do-flask-and-django/#atom-tag</id><summary type="html">
    &lt;p&gt;&lt;em&gt;My answer to &lt;a href="https://www.quora.com/Do-Flask-and-Django-have-a-GUI-interface-like-web2py/answer/Simon-Willison"&gt;Do Flask and Django have a GUI interface like web2py?&lt;/a&gt; on Quora&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;No. The web2py GUI is something of an oddity in the Python world.&lt;/p&gt;

&lt;p&gt;Personally, I firmly recommend getting comfortable with the command line if you want to become a truly effective programmer. Once you know how to use it you'll be able to leave GUI-centric programmers in the dust.&lt;/p&gt;
    
        &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/django"&gt;django&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/flask"&gt;flask&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/quora"&gt;quora&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/web2py"&gt;web2py&lt;/a&gt;&lt;/p&gt;
    

</summary><category term="django"/><category term="flask"/><category term="python"/><category term="quora"/><category term="web2py"/></entry><entry><title>Do Python programmers have a tendency to write their own software instead of contributing? Why?</title><link href="https://simonwillison.net/2012/Jan/22/do-python-programmers-have/#atom-tag" rel="alternate"/><published>2012-01-22T12:44:00+00:00</published><updated>2012-01-22T12:44:00+00:00</updated><id>https://simonwillison.net/2012/Jan/22/do-python-programmers-have/#atom-tag</id><summary type="html">
    &lt;p&gt;&lt;em&gt;My answer to &lt;a href="https://www.quora.com/Do-Python-programmers-have-a-tendency-to-write-their-own-software-instead-of-contributing-Why/answer/Simon-Willison"&gt;Do Python programmers have a tendency to write their own software instead of contributing? Why?&lt;/a&gt; on Quora&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I think you'll find that PROGRAMMERS have a tendency to develop their own thing rather than contributing to an existing project. It's even got its own TLA: NIH (Not Invented Here).&lt;/p&gt;

&lt;p&gt;It's not always a bad thing. When Dave Winer expressed dismay at Douglas Crockford for inventing/discovering JSON when XML and XML-RPC already existed, Douglas responded:&lt;/p&gt;

&lt;p&gt;"The good thing about reinventing the wheel is that you can get a round one."&lt;/p&gt;

&lt;span&gt;&lt;a href="http://scripting.wordpress.com/2006/12/20/scripting-news-for-12202006/#comment-26383"&gt;http://scripting.wordpress.com/2...&lt;/a&gt;&lt;/span&gt;
    
        &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/django"&gt;django&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/flask"&gt;flask&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/open-source"&gt;open-source&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/quora"&gt;quora&lt;/a&gt;&lt;/p&gt;
    

</summary><category term="django"/><category term="flask"/><category term="open-source"/><category term="python"/><category term="quora"/></entry><entry><title>Flask 0.1 Released</title><link href="https://simonwillison.net/2010/Apr/16/flask/#atom-tag" rel="alternate"/><published>2010-04-16T17:12:48+00:00</published><updated>2010-04-16T17:12:48+00:00</updated><id>https://simonwillison.net/2010/Apr/16/flask/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://lucumr.pocoo.org/2010/4/16/flask-0-1-released"&gt;Flask 0.1 Released&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Armin’s Flask (a Python microframework built around Werkzeug and Jinja2) is looking pretty solid for a two week old project—extensive documentation, comprehensive unit test support (and example applications with unit tests) and some very tidy API design.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/armin-ronacher"&gt;armin-ronacher&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/flask"&gt;flask&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/jinja"&gt;jinja&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/microframeworks"&gt;microframeworks&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/testing"&gt;testing&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/werkzeug"&gt;werkzeug&lt;/a&gt;&lt;/p&gt;



</summary><category term="armin-ronacher"/><category term="flask"/><category term="jinja"/><category term="microframeworks"/><category term="python"/><category term="testing"/><category term="werkzeug"/></entry></feed>