Comments (7)
Dear Andrea,
thank you for writing in.
Are there any plans to support/switch to an async client like httpx in place of requests?
It isn't planned yet, but we will be happy to take it into consideration.
It would be useful for using it within web services without blocking concurrency.
We can see the need for such scenarios. Let's use this ticket to maybe collect more voices from the community about how strong the needs are beyond your initiative, which we appreciate.
an async client like httpx
We guess using httpx
is the way to go on this matter? Are there any alternatives yet? urllib3
will stay in synchronous lands, so far?
With kind regards,
Andreas.
/cc @hramezani
from grafana-client.
I've suggested httpx because it's my go-to library for async requests these days, but the trustworthy aiohttp is also an option.
In comparison with aiohttp, though, httpx can be used both sycronously and asyncronously, and supports HTTP/2; by contrast, aiohttp is faster (but doesn't decode JSON automatically as requests and httpx do).
from grafana-client.
Hello,
There's a 3rd option you may consider, staying with Requests but "upgrading" to https://github.com/jawah/niquests
Happy to hear your opinion on the matter.
from grafana-client.
Hi again,
Niquests, advertising itself as a drop-in replacement for Requests, sounds intriguing 1, so we would like to give it a spin. In order to evaluate interest within the community, please vote 👍 on the original post by @sanzoghenzo. At the same time, a corresponding pull request would be very much welcome.
With kind regards,
Andreas.
Footnotes
from grafana-client.
Thank you for considering Niquests, I'd be happy to help and support the initiative.
Let me know if you need anything.
from grafana-client.
urllib3
will stay in synchronous lands, so far?
On this matter, it was easy to discover those discussions.
Do you have any pragmatic recommendations for us, @hramezani?
- Wait for urllib3 version 3 to have full async support?
- Just use httpx?
- Use a different library?
from grafana-client.
I can see the benefit of a drop in replacement, but since we're talking about switching to async, the drop-in replacement is only half of the sotry: all the methods of the AsyncSession
and responses needs to be await
ed, and the functions containing these calls needs to be in turn async.
Anyway, I no longer have the need for this request since I only needed a few endpoints, and I was a bit disappointed when I realized that there's no object de/serialization (using dataclasses, pydantic, attrs, msgspec...) in this library.
Feel free to close this if nobody else need an async version!
from grafana-client.
Related Issues (20)
- Improve test suite by adding integration tests with Grafana HOT 1
- Add x-disable-provenance header to allow alert rules to be edited from the UI HOT 7
- Field `database` in data source model will be deprecated HOT 1
- grafana_client.client.GrafanaClientError: Client Error 404: Not found HOT 8
- Setting timeout explicitly HOT 7
- Grafana Smart Query Prometheus missing key HOT 6
- Need support for following missing api HOT 4
- Dashboard.get_dashboard_by_name seems broken HOT 5
- Plugins: Add more filtering capabilities to `list()` method HOT 1
- Cannot update datasource key with newlines, e.g. GCP Monitoring HOT 1
- distutils.version.LooseVersion is deprecated HOT 3
- Feature: Organisation-awareness HOT 7
- Service Account functionality HOT 7
- New version of Grafana API create-annotation adds dashboardUID field HOT 2
- Grafana 10.2.3: breaking changes HOT 5
- Missing parentUid for create_folder HOT 6
- User Teams API endpoint missing HOT 3
- Get all folders endpoint is incorrect HOT 1
- Dashboard Search API endpoint is incorrect HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grafana-client.