Skip to content

Add support for Quart#25

Merged
rayluo merged 9 commits into
rayluo:devfrom
pamelafox:quart
May 16, 2024
Merged

Add support for Quart#25
rayluo merged 9 commits into
rayluo:devfrom
pamelafox:quart

Conversation

@pamelafox

Copy link
Copy Markdown
Contributor

Quart is the async version of Flask. This PR adds support by cloning the Flask file, adding async/await as needed, and changing the required extra. Notably Quart-Session doesnt support filesystem, so I'm using redis. This is working in my test sample.

@pamelafox

Copy link
Copy Markdown
Contributor Author

@rayluo For your review. Happy to add docs/tests as needed. Would like this for Build sample.

@pamelafox

Copy link
Copy Markdown
Contributor Author

Could also make a base class for Flask/Quart.

@rayluo rayluo left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much for taking the first cut, @pamelafox ! It is amazing to see it took minimal effort to have one more framework supported!

Could also make a base class for Flask/Quart.

In this particular case, it seems only the constructor and the logout() helper can be put into a base class, yet the majority of the logic are duplicated. In general, I do not know a satisfied way to maintain a similar sync and async code base with minimal code duplication. Please enlighten me how you are going to approach this.

Happy to add docs/tests as needed. Would like this for Build sample.

I can keep this PR for a couple more days if you plan to add docs/tests. Alternatively, it is totally fine to merge this as-is to meet your deadline, and we can add docs afterwards in the near future. Just let me know.

Comment thread .github/workflows/python-package.yml
@pamelafox

Copy link
Copy Markdown
Contributor Author

I have added tests and docs, please take a look.

Comment thread docs/quart.rst
Comment thread CONTRIBUTING.MD
Comment thread docs/django.rst
@pamelafox

Copy link
Copy Markdown
Contributor Author

Changes addressed

Comment thread tests/test_quart.py Outdated
@rayluo rayluo merged commit 8972202 into rayluo:dev May 16, 2024
@pamelafox pamelafox deleted the quart branch May 16, 2024 17:40
@pamelafox

Copy link
Copy Markdown
Contributor Author

Woot! Thanks for the speedy review and merge.

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