My first framework, please judge me

Posted by Ok-Intern-8921@reddit | Python | View on Reddit | 33 comments

Hi all! First post here!

I'm excited to introduce LightAPI, a lightweight framework designed for quickly building API endpoints using Python's native libraries. It streamlines the process of creating APIs by reducing boilerplate code while still providing flexibility through SQLAlchemy for ORM and aiohttp for handling async HTTP requests.

I've been working in software development for quite some time, but I haven't contributed much to open source projects until now. LightAPI is my first step in that direction, and I’d love your help and feedback!

What My Project Does:
LightAPI simplifies API development by auto-generating RESTful endpoints for SQLAlchemy models. It's built around simplicity and performance, ensuring minimal setup while supporting asynchronous operations through aiohttp. This makes it highly efficient for handling concurrent requests and building fast, scalable applications.

Target Audience:
This framework is ideal for developers who need a quick, lightweight solution for building APIs, especially for prototyping, small-to-medium projects, or situations where development speed is critical. While it’s fully functional, it’s not yet intended for production-level applications—though with the right contributions, it can definitely get there!

Comparison:
Unlike heavier frameworks like Django REST Framework, which provides many advanced features but requires more setup, LightAPI focuses on minimalism and speed. It automates a lot of the boilerplate code for CRUD operations but doesn’t compromise on flexibility. When compared to FastAPI, LightAPI is more stripped down—it doesn't include dependency injection or models out-of-the-box. However, its async-first approach via aiohttp gives it strong performance advantages for smaller, focused use cases where simplicity is key.

My Future Plans:
I'm still figuring out how to handle database migrations automatically, similar to how Django does it. For now, Alembic is a great tool to manage schema versioning, but I'm thinking ahead about adding more modularity and customization, similar to how Tornado allows for modular async operations and custom middleware/token handling.

You can find more details about the features and setup in the README file, including sample code that shows how easy it is to get started.

I'd love for you to help improve LightAPI by:

Any suggestions or contributions would be hugely appreciated. I'm open to feedback on all aspects—from performance optimizations to code readability, as I aim to make LightAPI a powerful yet simple tool for developers.

Here’s the repo: https://github.com/iklobato/LightAPI

Thanks for your time! Looking forward to collaborating with you all and growing this project together!

Cheers!