From 95c59301ad044028a416d2cbf6c1e25efbfe820d Mon Sep 17 00:00:00 2001 From: Osvaldo Santana Neto Date: Tue, 16 Feb 2016 13:17:48 -0200 Subject: [PATCH] Add more informations about python-decouple vs. prettyconf at FAQ (Fixes #16 again) --- CHANGES.txt | 1 + docs/source/faq.rst | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index a29d240..4cabef5 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,7 @@ ===== - Fix a blocker issue with ``config.eval`` cast and add a test to prevent regressions + - Add more informations about python-decouple vs. prettyconf at FAQ (Fixes #16 again) 1.2.2 ===== diff --git a/docs/source/faq.rst b/docs/source/faq.rst index f904f38..6470ede 100644 --- a/docs/source/faq.rst +++ b/docs/source/faq.rst @@ -35,18 +35,30 @@ highly inspired in ``python-decouple`` and provides almost the same API. The implementation of ``prettyconf`` is more extensible and flexible to make behaviour configurations easier. + Why you created a library similar to python-decouple instead of use it? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ I made some_ contributions_ for python-decouple_ previously, but I needed to change its behaviour as described above and this change is backward incompatible, so, it could break software that relies on the old behaviour. -Besides that it's hard to make this change on ``python-decouple`` due to +Besides that it's hard to make this change on ``python-decouple`` due to the way it's implemented. +See the lookup order of configurations below:: + + +---------------+-----------------+--------------------------+-----------------------+ + | Lookup Order | prettyconf | python-decouple (before) | python-decouple (now) | + +---------------+-----------------+--------------------------+-----------------------+ + | 1 | ENVVAR | .env | ENVVAR | + | 2 | .env | settings.ini | .env | + | 3 | *.cfg or *.ini | ENVVAR | settings.ini | + +---------------+-----------------+--------------------------+-----------------------+ + .. _some: https://github.com/henriquebastos/python-decouple/pull/4 .. _contributions: https://github.com/henriquebastos/python-decouple/pull/5 + Why use ``prettyconf`` instead of ``python-decouple``? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -55,4 +67,3 @@ features. .. _`python-decouple`: https://github.com/henriquebastos/python-decouple -