Bocadillo: Yet Another Python Framework

Ali GOREN on June 05, 2019

Hi everyone. In this post, I'll introduce the Bocadillo framework. As you know, there are a lot of web frameworks in Python. In the past days, I w... [Read Full]
markdown guide
 

Dude, I do not what I'm gonna do with it but I need to use this framework.

 

Hehe. Actually, you can use for web applications. Bocadillo is very similar to Flask.

You probably heard about the Flask framework. Using Bocadillo, you can create async web apps.

 

Maintainer of Bocadillo here! 👋

Thanks a lot for this post, @aligoren ! Very concise and nicely written. :-)

P.S.: the "ASGI 'lifespan' protocol appears unsupported." message you see when starting the Uvicorn server is because app.py is missing a small thing, i.e. a call to configure():

from bocadillo import App, configure

app = App()
configure(app)

This is documented here, if you're interested: Minimal working application

Thanks again for this article!

 

Hehe :)

Thanks. I actually knew that (ASGI lifespan message). I have a plan for Bocadillo. I'm thinking about a series. Maybe like Miguel Grinberg's Flask series.

I enjoyed with Bocadillo. Thanks <3 :)

 

That would be awesome! If you need anything from me, my DMs are open, here or on Twitter. :)

Haha. Are you sure? I’ll be trouble :P

 

I need the following:

  • SSL proxy forwarding (Apache proxy with lets encrypt)
  • OAuth authentication with bearer tokens.
  • Swagger out of the box, or easy to configure without marshmallow(It is too strict)

This works perfectly in Flask.

If Bocadilly can document this I will give it a try :-)

 

Thanks, this is very helpful!

We’ve been working on reusability so far, but I think built-in OpenAPI/Swagger support will be the next big thing. It’s been a very demanded feature!

As for OAuth (and other kinds of authentication), it’s also on the road map. In fact I’ve already begun working on authentication for ASGI apps here: starlette-auth-toolkit.

SSL proxy forwarding

You can serve a Bocadillo app with HTTPS using uvicorn/Gunicorn, and this is documented here: HTTPS. If you’re thinking of something else, let me know!

code of conduct - report abuse