Show HN: Assembly: A Pythonic Object-Oriented Web Framework Built on Flask

  • > Flask is very easy and simple. It's fun to put a few endpoints in a single file. However when your application starts growing into an endless of endpoints, tons of models and views, or your team is having more people, it is very necessary to have some sort of structure in your application.

    How is this different than the typical Blueprints setup? My Flask applications are split into modules, each with its own Blueprint; this helps organize large projects.

  • I thought the whole idea of Flask was to keep it simple. Reduce the amount of boilerplateing and potentially "useless" features of other frameworks, i.e. Django + DRF. For what I've seen so far, it looks like you've put the Django + DRF features on top of Flask.

    My question would be, why should I use Assemby instead of Django + DRF?

  • Instead of shitting on Flask (which is in fact great as-is and nicely suited to large projects via Blueprints), why not just build your own web framework and try to get support from the community based entirely on the merits of your framework? And I agree with others comments that this project seems to be adding mostly a bunch of magic Django-esque contraptions to the code, which I very deliberately choose Flask to avoid.

  • it would be superb if something like this can be built on the newer ASGI based frameworks - Starlette or Fastapi (which is built on Starlette).

    They are among the fastest python frameworks according to techempower benchmarks, have automatically included type checking and are async.

  • >Assembly Makes Flask Great Again

    The fact that flask can bar a basis for other frameworks makes Flask (and werkzeug) great in itself.

  • From the tutorial:

        class Index(Assembly):
          index(self):
            return 
    
    How is this valid Python?

  • Be aware that repository has 0 (zero) contributors on Github.

  • If you want a very Object Oriented Python web framework thats actively maintained and older than Django and Flask check out CherryPy. It was the only framework I saw that you just make a class and expose your routed methods and they become end-points. Every other Python framework looked odd to me with all the annotations.

    Have used it fot 3+ years in production and its done me well.

  • Can this handle websockets and streams?

  • Some good ideas here. Similarly, one thing that bugs me about all/most frameworks is that you have to spend a significant amount of time “wiring things up,” ... connecting models to views to the admin.

    That should happen automatically in my opinion. I’d like to create a model class in a models folder and have it found, loaded, tied to views, templates, the admin already. Customizable still of course.

    Would also like an admin page to download common models like wordpress plugins. Say CMS with comments, roles, history/audit etc. All built to standard interfaces. Why do I have to reinvent this and wire it up every single project?

    Also flowers and Trump themes are a weird combo. Especially when Flask is relatively unchanged. The design is either great or not depending on your perspective.

  • One tip: add a comment to the thread giving the backstory of how you came to work on this, and explaining what's different about it. That tends to seed discussion in a good direction. Good luck!

  • I think its quite a poor choice for web framework name ;-)

  • It is a terrible name. You can do web dev in pure Assembly and it actually makes sense in contrast with yet another framework over a framework over an interpreter over POSIX-libraries.

    E. g. monitoring for mission critical servers. You really don't want the whole stack of unverified goodies on these machines, but since you already have TCP/IP for SSH, writing a simple web-server that reports machine health over HTTP is like a half-day job.

    And it's verifiable since it's small. It doesn't drag the whole Python infrastructure with it.