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
Provide Versions of customwebhookbot.py
with Different Frameworks
#3820
Conversation
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.
This looks so great! We're becoming incredibly developer-friendly 😆
I am only suggesting some changes to the comments and, while we're at it, docstrings.
Yes, a full-fledged Django project would have its own configuration files. This is an interesting question: on the one hand, we have to provide a short example, and that's why we're using |
This is a very valid argument, but at least for now I would give more weight to your last point
I think whenever two frameworks are being used together one will have to find a midway of usability and best practice. This is a first step in this direction. Maybe we can just include a disclaimer, maybe something along the lines
? |
Great disclaimer, agreed :) |
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.
Great, just a couple of typos in the disclaimer :)
Co-authored-by: Dmitry K <58207913+lemontree210@users.noreply.github.com>
Co-authored-by: Dmitry K <58207913+lemontree210@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.
Wow, didn't realize how similar these examples would be! Unfortuantely I can't setup a webhook right now so can't run these examples. I assume you tested all of them? I also like the inline tabs idea, that's neat
Review comments below are mostly stylistic/design based.
? |
@harshil21 Yes |
Closes #3717 by providing versions with flask, quart and Django. Other examples can ofc be added later as well.
I have used neither of the frameworks before, so the examples are surely not optimal from their perspective and I'm happy for improving comments. Especially for Django I am sure that an actual Django project would set this up very differently as (AFAIK) Django usually makes heavy use of several modules & files.
Moreover, I want to point out that ASGI servers like uvicorn are more frequently started from the command line than from within a python script, but I kept to this scheme because
python script.py
as per usual)Docs build it available here.