-
-
Notifications
You must be signed in to change notification settings - Fork 288
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
Metadata for configuration data point #838
Comments
This must be resolved with the 4.0 implementation of typing #683 |
Now with #1107 we can add |
Hey Bruno, Without deeper study of the change I am unsure whether this indeed resolves my question. I was hoping for the ability to add metadata in the I have to add that I am not a full-time software developer or current user of dynaconf. This ticket is from two years ago when I was happy to have found dynaconf and confused by the lack of metadata :) Does that make sense? Cheers! |
Hi @ThomDietrich, yes I think the new schema based settings will be the way to solve the issue Example: class Settings(Dynaconf):
host: Annotated[str, Description("The server hostname"), Metadata(foo="bar")]
post: Annotated[int, Description("Server port")] = 5050 With a schema class like the one above you will be able to run: $ dynaconf template-settings-file yaml > settings.yaml IT will output # The server hostname
# foo: bar
# required: true
# type: str
host:
# Server port
# type: int
port: 5050 So with the information in a schema on a |
I see. Amazing!! That looks great and does solve my request. If this is already documented please feel free to close the ticket :) Thanks again! |
Hey friends,
does Dynaconf support metadata alongside it's managed configuration? How would one go about adding further details about a data point? Examples would be the owner or source of a setting, range and restrictions, or a short description for UI explanation.
For my specific use case (data science lab work) I would prefer metadata alongside the value, however I can see that for many production software this might probably find its way into another related file in parallel.
Is there any support for metadata in the context of Dynaconf or would you guys have a recommendation for a best practice solution? Thanks!
The text was updated successfully, but these errors were encountered: