[HN Gopher] Microdot: Yet another Python web framework
       ___________________________________________________________________
        
       Microdot: Yet another Python web framework
        
       Author : PaulHoule
       Score  : 80 points
       Date   : 2024-01-01 18:37 UTC (4 hours ago)
        
 (HTM) web link (blog.miguelgrinberg.com)
 (TXT) w3m dump (blog.miguelgrinberg.com)
        
       | miguelgrinberg wrote:
       | Microdot creator here. Happy to answer any questions about
       | Microdot if you have any!
        
         | makin wrote:
         | You have some performance comparisons, but I'd like to see a
         | table of the _features_ it has over the mainstream frameworks.
         | Is everything in the list at the top of the article something
         | neither Flask nor FastAPI offer?
        
           | miguelgrinberg wrote:
           | The main thing that none of the frameworks you know offer is
           | being small enough to also work under MicroPython on $5
           | microcontrollers. I created Microdot a few years ago when I
           | wanted to have a web interface to configure a thermostat that
           | I built to control the heating in my house.
        
         | freetonik wrote:
         | This is pretty cool! Always happy to see simple, small and
         | performant frameworks. I know it's still young, but do you know
         | if any companies or communities are already using it?
        
           | miguelgrinberg wrote:
           | It has some traction in the MicroPython community, used with
           | IoT projects running on microcontrollers.
        
         | iamcreasy wrote:
         | Interesting. So the entire library is in these 11 files under
         | src/microdot?
        
           | miguelgrinberg wrote:
           | Yep!
        
         | fantasybroker wrote:
         | Thanks for posting this! I am not planning any new projects but
         | this is a cool example of implementing a micro-framework in
         | Python. Might just use it as a reference to build my own.
         | 
         | As a side note, I noticed you have Flask tutorials, it could be
         | interesting to make a tutorial on writing a framework from
         | scratch using Microdot as a production ready example.
        
         | agumonkey wrote:
         | what about a microtutorial series in 2 very small parts ? ;)
         | 
         | ps: jokes aside, thanks for the project, it's gonna be nice to
         | experiment with embedded python using it
        
         | b800h wrote:
         | Did you name it after the LSD delivery mechanism?
        
         | pryelluw wrote:
         | pyATL organizer here. I was looking for a project to write a
         | talk about and this is perfect. Thanks for sharing it.
         | 
         | If you're ever in the Atlanta area please don't hesitate to
         | reach out. We'd love to have you hang out.
        
       | ulrischa wrote:
       | I like the similarity to flask without the 'magic'
        
       | yashasolutions wrote:
       | is it only for small projects - or can it handle larger load?
        
         | miguelgrinberg wrote:
         | If you deploy it with a production grade web server (uvicorn,
         | etc.) it should be able to scale just fine, while using less
         | RAM than the larger frameworks.
        
       | hamoodhabibi wrote:
       | Where to buy ESP8266 with cash ?
       | 
       | Wish I could just go on craigslist and buy one so I can build
       | minimal home automation
        
         | infinityio wrote:
         | probably the easiest way would be to buy an amazon gift card in
         | cash and deliver it to a locker/shop for pickup, although you'd
         | likely still need to link it to a phone number
        
         | fantasybroker wrote:
         | I don't have much experience with soldering, but would it be
         | possible to buy a device that uses this chip and take it
         | out/re-use? E.g. this listing in my area:
         | https://sfbay.craigslist.org/sby/atq/d/san-jose-tasmota-smar...
        
       | enkrs wrote:
       | There is something very magical about these micro frameworks for
       | solo hobby projects. You can _craft_ your small project vs just
       | _glue_ the solution somehow together.
       | 
       | Just today I was working on my ESP32 MicroPython project, and I
       | used Microdot for the first time (together with picocss and
       | htmx). The documentation was sparse in places, but the source
       | code was so niceley commented and easy to navigate that I figured
       | everything out.
        
       | dang wrote:
       | Recent and related:
       | 
       |  _Microdot_ - https://news.ycombinator.com/item?id=38156060 - Nov
       | 2023 (26 comments)
        
       | iamcreasy wrote:
       | Am I correct to conclude that I should not/do not need to use
       | framework like this one if the backend is only responding to REST
       | requests?
        
         | miguelgrinberg wrote:
         | I have written a few microservices/APIs with Microdot,
         | actually. Works really well for that.
        
       ___________________________________________________________________
       (page generated 2024-01-01 23:01 UTC)