-
Notifications
You must be signed in to change notification settings - Fork 77
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
User model: Refactor the config handling #257
Comments
in other words: Change all instances of |
Do I understand correctly, reading other threads on this topic, that the https://github.com/bwindsor/typed-config solution will not be applicable here due to incompatibility with Docker environments? Zgodnie z #324 (comment) ? |
What about solution like https://github.com/CERT-Polska/Artemis/blob/main/artemis/config.py |
Hi, short version (as per PM), something like a class MqueryConfig with fields like this:
(a typed property per wrapped config entry) will probably be OK.
In this case the problem is that typed-config is for config files whereas this is more dynamic (it's more like program settings, I guess?) I guess we could make a provider for typedconfig that would make it possible to use typedconfig for this, but I think it's an overkill
Interesting, I never saw Annotated[] using like this. This is similar to what I had in mind (see above), but we need dynamic dispatch because settings may change (so we need properties/functions instead of static fields). |
Part of #23
Right now we handle config very roughly. For example let's take:
I think about something like:
Where the
auth_default_roles
is a property that does the magic (parsing and validation)The text was updated successfully, but these errors were encountered: