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

Dynamically build Config from client attributes #176

Closed
gadomski opened this issue May 28, 2024 · 0 comments · Fixed by #177
Closed

Dynamically build Config from client attributes #176

gadomski opened this issue May 28, 2024 · 0 comments · Fixed by #177

Comments

@gadomski
Copy link
Member

As mentioned in #163 (review), I'm a little unhappy with how Config has some client-specific attributes, but not all. IMO it'd be better architecture to have a "global" Config object that exposes client-specific configuration attributes via some sort of dynamic, namespaced mechanism. Sorta like:

class Config:
    ...

for client_class in CLIENT_CLASSES:
    Config.add_client_class(client_class)  # This would add attributes from each client in a namespace, e.g. `Config.http_timeout`
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

Successfully merging a pull request may close this issue.

1 participant