Skip to content
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

Can't find docs or examples for toml files #289

Open
sa- opened this issue Feb 1, 2022 · 1 comment
Open

Can't find docs or examples for toml files #289

sa- opened this issue Feb 1, 2022 · 1 comment

Comments

@sa-
Copy link

sa- commented Feb 1, 2022

As the title explains, I can't seem to find the docs for this package or an example of how to use toml files. It would be nice if this information was easy to find

@drgarcia1986
Copy link
Owner

Hm, maybe something like this?

# app.py
from simple_settings import settings

print(settings.simple)
print(settings.complex)
print(settings.complex['text'])
# settings.toml
simple = "a simple string"

[complex]
text = "this is a text in a complex struct"
$ SIMPLE_SETTINGS=settings.toml python app.py
a simple string
{'text': 'this is a text in a complex struct'}
this is a text in a complex struct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants