Skip to content

Enhancement: Global configuration for max_retries, obey_rate_limit, perhaps others #1890

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
swarren opened this issue Feb 10, 2022 · 0 comments

Comments

@swarren
Copy link

swarren commented Feb 10, 2022

Description of the problem, including code/CLI snippet

My reading of the API docs and implementation indicate that HTTP-oriented parameters such as obey_rate_limit and max_retries must be specified separately for each API invocation. It would be nice if a "default" set of such parameters could be passed in when creating the Gitlab object, to avoid the need to pass the parameters on every subsequent API call.

Expected Behavior

Can set values such as max_retries once when initializing the library.

Actual Behavior

Need to pass those values to each get API call.

Specifications

  • python-gitlab version: 1.15.0 (although I believe the latest git is the same)
  • API version you are using (v3/v4): Whichever is the library default.
  • Gitlab server version (or gitlab.com): gitlab.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants