-
Notifications
You must be signed in to change notification settings - Fork 0
Implement precreate functionality in session management #2
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
Implement precreate functionality in session management #2
Conversation
Co-authored-by: faizanazim11 <20454506+faizanazim11@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements precreate functionality in session management to allow custom logic execution before database/table/meta creation, mirroring the existing postcreate pattern. It also adds comprehensive package documentation to the README.
- Added precreate hooks with both automatic and manual execution modes
- Implemented identical functionality for both sync and async session managers
- Updated README with complete package documentation including detailed hook usage examples
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
sql_db_utils/session_management.py | Added precreate storage attributes, decorator methods, and execution logic to sync session manager |
sql_db_utils/asyncio/session_management.py | Added identical precreate functionality with proper async/await patterns to async session manager |
README.md | Added comprehensive documentation for session management hooks with usage examples and execution order |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
@copilot - Fix linting issues by running pre-commit and add copilot instructions markdown for the repo. Take inspiration from py-auth-serverside & mem-db-utils. |
Co-authored-by: faizanazim11 <20454506+faizanazim11@users.noreply.github.com>
Fixed linting issues by running |
✅ Fixed linting issues and added copilot instructions
Addressed the feedback from @faizanazim11 to fix linting issues and add copilot instructions.
✅ Completed:
🔧 New Changes in This Commit:
Linting Fixes:
__slots__
declarations by reformatting them as multi-line tuplesruff format
to ensure consistent code formattingruff check .
returns clean)Copilot Instructions:
.github/copilot-instructions.md
following the pattern frompy-auth-serverside
andmem-db-utils
📋 Repository Status:
The implementation maintains perfect API consistency between sync and async versions while providing comprehensive developer guidance.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.