The Python Oracle

Can I have multiple ini config files in Pyramid?

--------------------------------------------------
Hire the world's top talent on demand or became one of them at Toptal: https://topt.al/25cXVn
and get $2,000 discount on your first invoice
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Romantic Lands Beckon

--

Chapters
00:00 Can I Have Multiple Ini Config Files In Pyramid?
00:19 Accepted Answer Score 9
00:52 Thank you

--

Full question
https://stackoverflow.com/questions/2925...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#python #pyramid #ini #paster #pythonpaste

#avk47



ACCEPTED ANSWER

Score 9


Yes that's possible. In one of my projects I have a production_base.ini file and all other production inis inherit from it:

production_base.ini

[app:main]
use = egg:xxx
maintenance_mode = False

production_www.ini

[app:main]
use = config:production_base.ini
maintenance_mode = True  # overwrites the value in the base ini

You can also check paste docs for more examples.

Side note - you can't inherit logging section though.