Skip to content

Release 0.2.1 – Async Support for extra_log_fields & Python 3.9 Compatibility

Latest

Choose a tag to compare

@akutayural akutayural released this 16 Oct 23:58
· 2 commits to main since this release

APIException v0.2.1

✨ What's New

  • Async support for extra_log_fields
    • You can now define your callback as async def and use await request.body() directly.
    • Fully backward compatible with sync functions.
  • Python 3.9 compatibility restored
    • Introduced conditional import of TypeGuard via typing_extensions.
    • Officially supports Python 3.9 → 3.13.
  • Improved type-safety and cross-version stability in response_utils.py.
  • Updated pyproject.toml for extended compatibility.

🧠 Highlights

  • Cleaner and safer async logging system.
  • Backward-compatible design.
  • Ready for production FastAPI environments.
  • Verified build on PyPI: apiexception 0.2.1

🧩 Upgrade

pip install -U apiexception

📄 Related Docs

📘 Section 🔗 Link
🧭 Usage Guide: How to register global exception handlers register_exception_handlers
⚙️ Response Models: Understanding ResponseModel and RFC7807ResponseModel Response Models Guide
🧩 Custom Exceptions: Defining your own BaseExceptionCode Custom Exception Codes
🪵 Logging: Structured logging setup & extra_log_fields usage Logging & Monitoring
🧱 APIResponse Helpers: APIResponse.default() and APIResponse.custom() examples APIResponse Reference
🧠 Changelog: All notable updates, fixes, and improvements Full Changelog