Provide Versions of customwebhookbot.py with Different Frameworks#3820
Provide Versions of customwebhookbot.py with Different Frameworks#3820Bibo-Joshi merged 16 commits intomasterfrom
customwebhookbot.py with Different Frameworks#3820Conversation
lemontree210
left a comment
There was a problem hiding this comment.
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 :) |
lemontree210
left a comment
There was a problem hiding this comment.
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>
harshil21
left a comment
There was a problem hiding this comment.
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.pyas per usual)Docs build it available here.