[Chicago] Slides for "Using Tasks in Your Asyncio Web App"

Feihong Hsu feihong.hsu at gmail.com
Fri Sep 9 15:36:53 EDT 2016

Hi Bob,

Good question! The node packages are not needed to run asyncio or any of
the backend code, but are used to make the frontend code easier to discuss.
For example, the main node package I used was RapydScript, a
Python-to-JavaScript compiler. Using this tool, I was able to keep my
client code examples in Python. Although if you look closely at the .pyj
files in the example programs, you'll see that it's not quite pure Python.

The other node package is called Stylus, and is a CSS preprocessor. This
allowed to me write much more minimal style code. For example, this is the
stylesheet for the first example:
As you can see, Stylus uses whitespace-delimited blocks and eliminates the
need for colons and semicolons.

The talk was already more than long enough, so I wasn't able to get into
this, but integrating preprocessors into your local development workflow is
a bit easier when using asyncio or other event loops frameworks. Normally
you would need to use threads to avoid simultaneous compiles unnecessarily
slowing down the page render, but in asyncio web frameworks each request
handler is already running in its own task and so cannot block other tasks.

Hope this answered your question,

On Fri, Sep 9, 2016 at 4:18 AM, Bob Haugen <bob.haugen at gmail.com> wrote:

> Hi Feihong,
> Interesting stuff! Sorry I could not attend. Maybe you explained this
> in the questions-and-answers, but why do your examples require Node?
> Thanks,
> Bob
> On Thu, Sep 8, 2016 at 11:35 PM, Feihong Hsu <feihong.hsu at gmail.com>
> wrote:
> > Hi all,
> >
> > Thanks to everyone in the audience for listening to me blab forever about
> > asyncio again, and for asking such great questions! Here's the link to
> the
> > GitHub repo for my talk:
> >
> > https://github.com/feihong/asyncio-tasks-talk
> >
> > There you can find the slides, as well as copious notes and the full
> source
> > code for all my demos.
> >
> > Cheers,
> > Feihong
> >
> > _______________________________________________
> > Chicago mailing list
> > Chicago at python.org
> > https://mail.python.org/mailman/listinfo/chicago
> >
> _______________________________________________
> Chicago mailing list
> Chicago at python.org
> https://mail.python.org/mailman/listinfo/chicago
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/chicago/attachments/20160909/d01f698e/attachment.html>

More information about the Chicago mailing list