Skip to content
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

Add Dictionary Configuration Support #495

Open
kevdog824 opened this issue Sep 9, 2024 · 0 comments
Open

Add Dictionary Configuration Support #495

kevdog824 opened this issue Sep 9, 2024 · 0 comments

Comments

@kevdog824
Copy link

PREFACE: I searched open issues for a similar issue but did not find one. Feel free to mark as duplicate if this issue already exists.

I am proposing adding dictionary-based or static configuration-based functionality to Tenacity. I am not sure that this is the best way to describe the functionality I am hoping to see so let me elaborate below.

A convenient part of the standard library logging module is the dictconfig function that allows you to setup configuration for logging from a dictionary. This enables a wide range of options for configuring logging. For example:

  • Statically defining the logging configuration via pyproject.toml or some other config file
  • Allowing a framework or application runner to easily accept a custom logging definition without custom code (see uvicorn's command line switches for an example of this)

I propose adding a functionality similar to dictconfig to tenacity for creating and configuring Retry objects. I think this would add some good benefits and development options for developers using tenacity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant