Smuggling Pythons and Falcons

I love trying out Python things with Glitch. It feels a bit rebellious for some reason. Why? Glitch caters more towards JavaScript-centric frameworks and static sites. Their most recent announcement, Remix a Whole New Glitch, emphasizes this. But the fact that Glitch cedes some of this wonderful playground to Python is awesome.

The way that most Python Glitch apps work is wonderfully hacky — a bash script that installs all of your packages before running the Python file. This bash script is invoked by the package.json file, which you usually associate with a JavaScript based project. I love the idea of smuggling in a language by way of a metadata file reserved for another language. It peters on the edge of “Should this even be possible?” (even though Glitch supports a lot of languages)

Another avenue of the “Should this even be possible?” route is testing to see which Python web frameworks even work with Glitch. I've cut my teeth on remixing a lot of tiny Glitch apps that use Flask. I've also seen some people use Django. These frameworks, however, were already tested out by others. Which ones weren't?

One I haven't seen implemented in Glitch yet is Falcon. Love how the docs describe it:

Falcon is a minimalist WSGI library for building speedy web APIs and app backends. We like to think of Falcon as the Dieter Rams of web frameworks.

When it comes to building HTTP APIs, other frameworks weigh you down with tons of dependencies and unnecessary abstractions. Falcon cuts to the chase with a clean design that embraces HTTP and the REST architectural style.

So a little different from Flask & Django, but hey — as long as I could invoke python3 server.app, I should be good to go right?

Turns out yes! I was able to successfully create an example app that uses some example code from the “Getting Started” portion of the Falcon docs. Now it's just a matter of building something with it. Curious to try building something more of the API/backend persuasion on Glitch.