I know this is unrelated, but probably a lot of Pythonistas here and I've been wondering: what is the async web framework of choice for you guys today? As for DBs, still SQLAlchemy? What about a prettier (js) alternative?
Httpx: A next-generation HTTP client for Python
21–30 of 119 posts
Re: Httpx: A next-generation HTTP client for Python
#22Re: Httpx: A next-generation HTTP client for Python
#23> Fully type annotated. This is a huge win compare to requests. AFAIKT requests is too flexible (read: easier to misuse) and difficult to add type annotation now. The author of requests gave a horrible type annotation example here [0]. IMO at this time when you evaluate a new Python library before adopting, "having type annotation" should be as important as "having decent unit test coverage". [0]: https://lwn.net/Art…
Re: Httpx: A next-generation HTTP client for Python
#24Re: Httpx: A next-generation HTTP client for Python
#25I've been using httpx 0.9.3 in production now for a couple months. I switched from requests when I realized I needed async support and it has been a dream to use. The only issue I've run into has been with my attempt to reuse the same AsyncClient to make multiple concurrent requests to the same remote host. It looks like this issue may have been fixed in 0.10 or 0.11 so I'll be upgrading soon to check. Also, be sure…
Do you know if those exist in butterfly?
I'm already deep in aiohttp and it's not an easy task to learn an async client (at least in my case, but I'm no dev) so if I do switch it would be for more features (retry option on exceptions, limit requests per host and per time frame...). But that's only my opinion.
Re: Httpx: A next-generation HTTP client for Python
#26One of the highlighted features is directly calling into WSGI applications[1], which uses flask as an example. Question: is there any advantage of this over flask’s builtin werkzeug test client? [1] https://www.python-httpx.org/advanced/#calling-into-python-w... [2] https://flask.palletsprojects.com/en/1.1.x/testing/
Based on similar experience with other tools, that possibly means that Httpx is great for simple testing but if you need to go deep it's better to use the framework provided. That's an assumption, though, so I'd love to hear more from others.
Re: Httpx: A next-generation HTTP client for Python
#27I know this is unrelated, but probably a lot of Pythonistas here and I've been wondering: what is the async web framework of choice for you guys today? As for DBs, still SQLAlchemy? What about a prettier (js) alternative?
Re: Httpx: A next-generation HTTP client for Python
#28FastAPI creator here... if you use FastAPI, HTTPX would probably be the best match for sending requests, just saying... :D