Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    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.
    András Mózes
    @mozesa
    Hello! @pgjones you mentioned earlier that there is a plan for async for message in websocket.receive_json(). I just would like to reinforce that it would be a nice feature :smile:
    Anil Waghmare
    @anilmwr
    Hi All, I am trying to test an Angular app with Quart, it works fine when loaded for the first time, but if I rebuild the Angular app and copy new files to /static and /templates directories, I still see the older version of the app in Browser. If I force reload by disabling cache, the modified template content under /templates is not picked up. I have no option other than killing the Quart app instance and restarting it, after which it correctly picks newly built template file contents. How to resolve this template caching problem? Thanks!
    Phil Jones
    @pgjones
    Are you using 0.14.1? This should be fixed by pgjones/quart@cbc72c5
    Anil Waghmare
    @anilmwr
    I am on Python 3.9.1 and Quart version is '0.14.1'.
    Phil Jones
    @pgjones
    With debug=True?
    Anil Waghmare
    @anilmwr
    Where should I specify debug=True? I am serving my app using below statement:
    hypercorn.asyncio.serve(app, quart_config)
    Phil Jones
    @pgjones
    app.debug = True - this is for development right?
    Also app.templates_auto_reload = Trueor app.config["TEMPLATES_AUTO_RELOAD"] = True
    Anil Waghmare
    @anilmwr
    Yes, for development, with above lines added, it is loading updated template. Thanks a lot!
    Phil Jones
    @pgjones
    :+1:
    (Only need one of the above)
    McSinyx
    @McSinyx:matrix.org
    [m]
    about quart-trio, is there any recommendation regarding testing TooSlowError with the embeded client
    Dave Hirschfeld
    @dhirschfeld
    :wave: hi @mozesa, before I go down the rabbit-hole - did you ever get hypercorn working with structlog?
    Phil Jones
    @pgjones
    @McSinyx:matrix.org something like,
    async with test_client.request(...) as connection:
        connection.send(b"data")
        await trio.sleep(A_LONG_TIME)
    assert connection.as_response().status_code == 408
    Not tested, but I think it will work...
    McSinyx
    @McSinyx:matrix.org
    [m]
    thanks, i'll try
    Tigran Tch
    @NargiT
    hello is there a way to prefix all routes without affecting the code source?
    I saw that we can use SCRIPT_NAME in wsgi spec, and I was wondering if there is an equivalent for asgi with hypercorn or uvicorn for example.
    xarvos
    @xarvos:matrix.org
    [m]
    I suppose you can set config APPLICATION_ROOT
    Phil Jones
    @pgjones
    The ASGI root_path should work for this, could you try with hypercorn and see if it narrows down the bug to uvicorn or Quart?
    András Mózes
    @mozesa
    @dhirschfeld Hello! No, I haven't checked, but it is on the todo-list. I would like to use structlog and I would like to log accesses and errors. But it seems to me only former can be customised.
    Phil Jones
    @pgjones
    @mozesa they both can be, you should be able to customise this
    András Mózes
    @mozesa
    @pgjones Cool :smile: