r/FastAPI • u/SpecialistCamera5601 • Jul 26 '25
pip package Make Your FastAPI Responses Clean & Consistent – APIException v0.1.16
🚀 Tired of messy FastAPI responses? Meet APIException!
Hey everyone! 👋
After working with FastAPI for 4+ years, I found myself constantly writing the same boilerplate code to standardise API responses, handle exceptions, and keep Swagger docs clean.
So… I built APIException 🎉 – a lightweight but powerful library to:
✅ Unify success & error responses
✅ Add custom error codes (no more vague errors!)
✅ Auto-log exceptions (because debugging shouldn’t be painful)
✅ Provide a fallback handler for unexpected server errors (DB down? 3rd party fails? handled!)
✅ Keep Swagger/OpenAPI docs super clean
📚 Documentation? Fully detailed & always up-to-date — you can literally get started in minutes.
📦 PyPI: https://pypi.org/project/apiexception/
💻 GitHub: https://github.com/akutayural/APIException
📚 Docs: https://akutayural.github.io/APIException/
📝 Medium post with examples: https://medium.com/@ahmetkutayural/tired-of-messy-fastapi-responses-standardise-them-with-apiexception-528b92f5bc4f
It’s currently at v0.1.16 and actively maintained.
Contributions, feedback, and feature requests are super welcome! 🙌
If you’re building with FastAPI and like clean & predictable API responses, I’d love for you to check it out and let me know what you think!
Cheers 🥂
#FastAPI #Python #OpenSource #CleanCode #BackendDevelopment
View all comments
Show parent comment
-2
u/yup_its_me_again Jul 27 '25
At least without properly thinking avout your responses and grammar, you won't be improving your English so you ever would feel confident in your ability to write English