Skip to content

use SQLModel's AsyncSession when available, fallback to SQLAlchemy's #28

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

h0rn3t
Copy link
Owner

@h0rn3t h0rn3t commented Aug 21, 2025

Resolving AsyncSession's 'exec' AttributeError in FastAPI with SQLModel

@trunet
Copy link

trunet commented Aug 24, 2025

It's working for me with this PR.

Copy link

codecov bot commented Aug 27, 2025

Codecov Report

❌ Patch coverage is 71.42857% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.45%. Comparing base (15a798b) to head (579f607).
⚠️ Report is 24 commits behind head on main.

Files with missing lines Patch % Lines
fastapi_async_sqlalchemy/middleware.py 69.23% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #28      +/-   ##
==========================================
- Coverage   97.22%   92.45%   -4.77%     
==========================================
  Files           3        3              
  Lines          72      106      +34     
==========================================
+ Hits           70       98      +28     
- Misses          2        8       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants