Skip to content

Conversation

@pgjones
Copy link
Member

@pgjones pgjones commented Oct 15, 2019

TOML is a very popular format now, and is taking hold in the Python
ecosystem via pyproject.toml (among others). This allows toml config
files via,

app.config.from_file("config.toml", toml.loads)

it also allows for any other file format whereby there is a loader
that takes a string and returns a mapping.

This is an alternative to #3386.

@davidism
Copy link
Member

I'm not sure if it's worth pulling in TOML just for one test. Can this be tested with json.load instead?

@pgjones
Copy link
Member Author

pgjones commented Oct 16, 2019

I've moved the toml example to the docs (from the tests).

@davidism davidism added this to the 2.0.0 milestone Oct 18, 2019
TOML is a very popular format now, and is taking hold in the Python
ecosystem via pyproject.toml (among others). This allows toml config
files via,

    app.config.from_file("config.toml", toml.loads)

it also allows for any other file format whereby there is a loader
that takes a string and returns a mapping.
@davidism davidism merged commit 8f422d2 into pallets:master Oct 18, 2019
@pgjones pgjones deleted the toml branch October 18, 2019 16:56
pgjones added a commit to pallets/quart that referenced this pull request Oct 18, 2019
This alters e49d4f6 and follows
discussion in Flask about how best to support this functionality. With
this change Quart matches the Flask functionality.

See pallets/flask#3398.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants