Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Phil Jones
    @pgjones
    Also any other improvements (I periodically check to see if I still need setup.cfg)
    McSinyx
    @McSinyx:matrix.org
    [m]
    thanks
    most stuff in setup.cfg can be moved to tox.ini I think, except for mypy
    Phil Jones
    @pgjones
    I try and move it to pyproject.toml (I run black to auto format outside of tox)
    McSinyx
    @McSinyx:matrix.org
    [m]
    great; also is there any reason for some static check to install the packages and deps or it's just something overlooked?
    mypy doesn't support pyproject.toml ATM (python/mypy#5205) but if it's the only thing left the config could resides in mypy.ini for clarity
    Phil Jones
    @pgjones
    I don't think I've added a static install check, happy for one though
    Agree on the mypy move
    McSinyx
    @McSinyx:matrix.org
    [m]
    re static, I meant the linters and mypy runs in tox also tries to install quart* and the deps which results in some extra latency
    Phil Jones
    @pgjones
    Oh, I'm not sure. Deps may be needed for mypy's type checks
    McSinyx
    @McSinyx:matrix.org
    [m]
    ah that's right, silly me d-;
    Finleyyy
    @Finleyyy
    How do I get form data in a POST request?
    Phil Jones
    @pgjones
    await request.form
    Finleyyy
    @Finleyyy
    Right, but how do I get the value of one of the form elements?
    Phil Jones
    @pgjones
    form = await request.form
    form["name"]
    Finleyyy
    @Finleyyy
    Thanks
    McSinyx
    @McSinyx:matrix.org
    [m]
    pgjones, could you please take a look at pgjones/quart!92
    Henshal B
    @henshalb
    i'm using quart-openapi with quart 0.14. but says an error.....```
    super().add_url_rule(path, endpoint, view_func, methods,provide_automatic_options=provide_automatic_options, **kwargs) TypeError: add_url_rule() takes from 2 to 4 positional arguments but 5 positional arguments (and 1 keyword-only argument) were given
    oython version 3.8
    *python
    Henshal B
    @henshalb
    does it mean, tha Pint has to be updated
    ??
    Phil Jones
    @pgjones
    @zeroshade would you happen to know?
    I don't think this has changed in Quart...
    Phil Jones
    @pgjones
    Ah, it did in 0.12.0 released on the 2020-05-21 to match Flask's API
    Henshal B
    @henshalb
    Since restplus swagger is not available, only option is quart-openapi. Hope this will get updated soon.
    McSinyx
    @McSinyx:matrix.org
    [m]
    @pgjones, I understand that it's sunday but may I have some reviews over pgjones/quart!92
    it would allow fixing the lack of Event.is_set on quart-trio in a easier manner and allow my team to use it without a quart-trio 0.6.x backport (since we can't get 0.7.x to handle static type check for subclass of QuartTrio at the moment)
    (without a fix like in the linked MR)
    Phil Jones
    @pgjones
    @henshalb looks like this is fixed in the Quart-OpenAPI master, just not released. Quart-Schema is another alternative
    Henshal B
    @henshalb
    Okay. Thank you.
    Henshal B
    @henshalb
    I request you to add those to the doc.
    Phil Jones
    @pgjones
    @augustozanellato routes added in pgjones/quart@d6de101
    @henshalb see pgjones/quart@bcf5c01
    Henshal B
    @henshalb
    @pgjones quart-schema is not having blueprint support, right?
    sferdi0
    @sferdi0
    Phil Jones
    @pgjones
    @henshalb it does support blueprints - unless there is a specific feature you mean?
    @sferdi0 nice! Could you open a MR to add it to the Quart extensions docs?
    sferdi0
    @sferdi0
    @pgjones not yet, after sufficient testing in production I will do so
    For now it's something "I made in a few days" ... :-)
    Phil Jones
    @pgjones
    ok :+1:
    Henshal B
    @henshalb
    No. But by using the blueprint name as decorator, it not catching the doc.
    Phil Jones
    @pgjones
    I don't quite follow - could you show a snippet and the error?
    Henshal B
    @henshalb
    Ohh, I switched back to quart_ openapi.
    andrewsh
    @andrewsh:matrix.org
    [m]
    I still don’t understand how blueprints work or how to use them
    Phil Jones
    @pgjones
    Do the Flask docs help?
    If not, I'm happy to answer questions
    Henshal B
    @henshalb
    @andrewsh blueprints ties different module to your main file. For that you need to make a module a blueprint and then register it with main.
    a humble idea.
    andrewsh
    @andrewsh:matrix.org
    [m]
    so it’s just a way to split off an independent part of the functionality into a separate module?
    Phil Jones
    @pgjones
    Yea, they are also re-useable so different apps could use the same blueprint e.g. a set of standard introspection routes.