Member-only story
A New Small Python Web Framework Is Here!
Welcome back! Python is one of the best programming languages out there, and today, we’re taking a look at an exciting new lightweight web framework for Python!
I recently came across this framework on Reddit, and it immediately caught my attention. Here’s the original post.
Meet Micropie
The developer behind this project created Micropie, an ultra-micro ASGI Python web framework that is designed to be fast, dynamic, and get out of your way. It features automatic URL mapping and a minimalistic approach, making it an excellent choice for lightweight web applications.
For more details, check out their GitHub page:
How to Install Micropie
Installing this framework is quick and easy. Simply run the following command:
pip install micropie
Getting Started with Micropie
Once installed, you can create a simple “Hello World” web app using just a few lines of code:
from MicroPie import Server
class MyApp(Server):
async def index(self):
return "Hello, World!"
app = MyApp() # Run with `uvicorn app:app`
That’s all the code you need to get started! Just run the application using Uvicorn, and you have a fully functional web server.
What do you think? Will you be trying out Micropie? I’d love to hear your thoughts!
💬 Let’s connect on Twitter: @PreetTheMan
Thanks for reading, and as always, happy coding! 🚀