Giter Club home page Giter Club logo

Comments (7)

marcelchastain avatar marcelchastain commented on June 8, 2024 1

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.

stale avatar stale commented on June 8, 2024

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.

remi-debette avatar remi-debette commented on June 8, 2024

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.

lbalmaceda avatar lbalmaceda commented on June 8, 2024

👋 @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.

remidebette avatar remidebette commented on June 8, 2024

(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.

lbalmaceda avatar lbalmaceda commented on June 8, 2024

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.

leeomara avatar leeomara commented on June 8, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.