Skip to content

Conversation

@cofin
Copy link
Member

@cofin cofin commented Oct 24, 2025

Introduce a Flask extension for SQLSpec.

@cofin cofin changed the title feat: adds support for Flask feat: Flask extension Oct 24, 2025
cofin added 2 commits October 24, 2025 21:52
…ng in Flask extension

- Introduced `PortalProvider`, `Portal`, and `PortalManager` classes to manage async function calls from synchronous contexts.
- Updated `FlaskConfigState` to use constants for HTTP status code checks.
- Refactored `get_or_create_session` to accommodate the new portal pattern.
- Modified `SQLSpecPlugin` to utilize the portal for async operations.
- Enhanced `await_` decorator to automatically use the portal when no event loop is present.
- Added comprehensive unit tests for portal functionality and integration with sync tools.
- Updated integration tests for Flask to ensure compatibility with the new async handling.
@cofin cofin force-pushed the feat/flask-extension branch from 6945000 to 00fc096 Compare October 25, 2025 02:52
@cofin cofin merged commit 67c1640 into main Oct 27, 2025
9 of 10 checks passed
@cofin cofin deleted the feat/flask-extension branch October 27, 2025 00:20
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