You can access the settings at request.registry.settings
or pyramid.threadlocal.get_current_registry().settings
. It behaves like dictionary.
If you want to use the second one, that is getting the settings without having the request, I have to warn you. According to the doc :
This function should be used extremely sparingly, usually only in unit
testing code. it’s almost always usually a mistake to use
get_current_registry outside a testing context because its usage makes
it possible to write code that can be neither easily tested nor
scripted.
Any part of your code that needs access to the settings is part of the web application, and should access the request, not some magically accessible global. You might think you have a good reason, but there's probably a better way. If you want to discuss that (maybe in another question if it's complex, as some code would help), I'll be glad to help you find a clean way to do it.