Comments (7)
Was looking into this myself. Seems like the SDK just returns a plain dict of the response.
For auth0 core devs, future me, or anyone who might be interested in developing a PR, one approach would be to use requests.Session() combined with event hooks.
Allowing the user to register their own callback function seems like a big win. Until then, I might just monkeypatch the various requests methods.
from auth0-python.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you have not received a response for our team (apologies for the delay) and this is still a blocker, please reply with additional information or just a ping. Thank you for your contribution! 🙇♂️
from auth0-python.
Hi, I just encountered Rate limit issues with the Library.
Would you have a hint on how to tackle this in the library today?
Thank you
from auth0-python.
👋 @remi-debette I don't know if the persons above can share their implementation, but the issue today is the library doesn't return the "response object" with the information. The only thing that is returned is the parsed response body. So any rate-limiting implementation, that doesn't introduce breaking changes, needs to happen internally in some sort of throttling logic that reads those headers and retries the requests.
from auth0-python.
(Other account but same person)
Indeed, as today the library raises exceptions in the case of Rate limit reached, my understanding is that there is no such mechanism internally and that we are forced to retry after the fact
from auth0-python.
Correct, there's no automatic handling or exponential backoff strategy.
The formatting in the readme is a bit broken, but each request could fail with any of these 3 exceptions listed there https://github.com/auth0/auth0-python#error-handling. You could try/catch this particular RateLimitError
type and retry after some seconds.
from auth0-python.
For future users who arrive here searching, rate-limiting info has been exposed as of 3.11, see #219
Also, automatic rate-limit handling has been implemented since 3.17, see #285
from auth0-python.
Related Issues (20)
- Worse developer experience since introducing async support - IntelliSense doesn't work for endpoint classes HOT 11
- Allow setting the cache TTL for JwksFetcher through AsymmetricSignatureVerifier HOT 1
- Management.Branding.update_template_universal_login - Syntax Error! HOT 1
- Connections.all() should accept name HOT 1
- GetToken and asyncify: Algorithm not supported HOT 2
- Method from documentation missing HOT 4
- Wrong return type for the all_organization_members method
- Retries implementation of rest.py missing for POST/PATCH/PUT/DELETE HOT 1
- Type checks started failing on our codebase with v4.4 HOT 13
- Cannot install when python version is set like ">=3.10" in pyproject.toml HOT 1
- API management call and headers like X-Correlation-ID HOT 3
- `get_all_organization_members` should support `fields` HOT 2
- Pip install fails in python 3.12.0 HOT 2
- typing in roles.py HOT 2
- Getting an error coroutine 'AsyncRestClient._request_with_session' was never awaited HOT 3
- userinfo_async broken in 4.6.0 HOT 1
- Add functions to manage Guardian settings available via the REST API, e.g. available message types.
- Get management token using device code flow
- Allow crytography >= 42 to resolve high-severity security vulnerability. HOT 3
- Allow for urllib3 < 2.x 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 auth0-python.