Skip to content

Add custom converters to the docs #790

@rochacbruno

Description

@rochacbruno

The PR #784

allowed

# app.py
from pathlib import Path
from dynaconf.utils import parse_conf

parse_conf.converters["@path"] = (
    lambda value: value.set_casting(Path)
    if isinstance(value, parse_conf.Lazy)
    else Path(value)
)
# settings.toml

parent = "@path @format {env[HOME]}/parent"
child = "@path @format {this.parent}/child"

We need to add that to the docs and example/ test run

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions