[RFC] implement `settings.populate_args` - `settings.populate_attrs` decorators.
Open
Not a Bug
RFC
wontfix
- Dominant language
- Python
- Stars
- 4.3k
- Forks
- 347
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 1
Description
## populate_args
```py
@settings.populate_args()
def a_function(server, port):
...
# optionally mapped
@settings.populate_args(server="db.config.server")
def a_function(server, port):
...
s_function(port=8888) # server will be read from dynaconf settings if not passed
```
## populate attrs
```py
@settings.populate_attr("db.config")
class Server:
server: str
port: int
s = Server(port=8888)
s.server # loaded from dynaconf settings
s.port
```
Contributor guide
Assessment
This issue has not been assessed yet.