# Read and evaluate YAML files or search for a certainYAML entry

**URL:** <https://community.shotgridsoftware.com/t/read-and-evaluate-yaml-files-or-search-for-a-certainyaml-entry/8906>\
**Category:** Pipeline Integrations\
**Created:** [June 3, 2020, 8:30am UTC](https://community.shotgridsoftware.com/t/read-and-evaluate-yaml-files-or-search-for-a-certainyaml-entry/8906 "2020-06-03T08:30:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sogrday](https://avatars.discourse-cdn.com/v4/letter/s/bc79bd/32.png) [@sogrday](https://community.shotgridsoftware.com/u/sogrday)\
**Post date:** [June 3, 2020, 8:30am UTC](https://community.shotgridsoftware.com/t/read-and-evaluate-yaml-files-or-search-for-a-certainyaml-entry/8906/1 "2020-06-03T08:30:16Z")

</div>

Hi SG-Community ,

I am looking for a way to load a config’s full set YAML files into a python dict. The reason I am asking is to get a quick overview of a pipeline configuration. Working for different clients that manage their own shotgun configs with multiple projects, can become quite hard to oversee when not knowing the yaml values and the yaml file locations. Hence I am looking for way to either load them all in at once or query for a specific setting or entry (Ideally with knowing where the yaml file came from).

Specifically I am wondering about the following:  
1.) How do tk-apps retrieve their settings from a set of relevant yaml files ? Could you point me to the code ? Is there a yaml.loads() call somewhere when an app is launching ?

2.) If I have a ‘resolved’ yaml for my setting or certain piece of configuration e.G.

```auto
 settings.tk-multi-publish2.nuke.shot_step:
  collector: "{self}/collector.py:{config}/tk-multi-publish2/nuke/collector.py"

```

Is there a way of knowing where the yaml entries are defined, which are higher up the hierarchy ? for example

```auto
# get file the location of settings.yml or 
# get file the location where settings: are defined
 settings.tk-multi-publish2.nuke.shot_step:
  collector: "{self}/collector.py:{config}/tk-multi-publish2/nuke/collector.py"

```

Thanks  
Stu

---

<div class="post-metadata">

**Author:** ![tannaz](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/tannaz/32/32_2.png) [@tannaz](https://community.shotgridsoftware.com/u/tannaz)\
**Post date:** [June 17, 2020, 11:08pm UTC](https://community.shotgridsoftware.com/t/read-and-evaluate-yaml-files-or-search-for-a-certainyaml-entry/8906/4 "2020-06-17T23:08:17Z")

</div>

Hi @sogrday –

Unfortunately there are no guarantees when it comes to the order in which includes are evaluated.

Some useful coding resources:

- There is a public API method called [`find_app_settings()`](https://developer.shotgunsoftware.com/tk-core/platform.html?highlight=find_app_settings#sgtk.platform.find_app_settings) that finds all the settings for a gvien app in the current environment.
- In our own code, we’ve used the [`resolve_include()`](https://github.com/shotgunsoftware/tk-core/blob/master/python/tank/util/includes.py#L48) and [`environment_includes()`](https://github.com/shotgunsoftware/tk-core/blob/master/python/tank/platform/environment_includes.py#L174) methods.

If you can give us a better idea of what you’re hoping to achieve, we can give more directed advice.
