{
  "id": "task_libraries:configuration/python",
  "path": "/exapedia/python-configuration-libraries",
  "template": {
    "id": "task_libraries",
    "version": 4
  },
  "title": "Python configuration libraries",
  "answer": [
    {
      "t": "text",
      "text": "Python configuration libraries load application settings from environment variables, files, and command-line arguments. A settings loader reads each source in a fixed order of precedence and converts the raw strings into typed values. These libraries let apps and services run the same code in development, test, and production."
    }
  ],
  "breadcrumb": [
    {
      "label": "Tools"
    },
    {
      "label": "Python configuration libraries"
    }
  ],
  "sections": [
    {
      "id": "libraries_popularity",
      "anchor": "popularity",
      "heading": "Popularity",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "Monthly downloads",
            "Stars",
            "Last release",
            "License"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#python-dotenv",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F132"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F133"
                }
              ],
              [
                {
                  "t": "text",
                  "text": "Not on GitHub"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F136"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F134"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#pydantic-settings",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F149"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F150"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F6"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F153"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F151"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#traitlets",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F164"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F165"
                }
              ],
              [
                {
                  "t": "text",
                  "text": "Not on GitHub"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F168"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F166"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#omegaconf",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F181"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F182"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F31"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F185"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F183"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#configargparse",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F196"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F197"
                }
              ],
              [
                {
                  "t": "text",
                  "text": "Not on GitHub"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F200"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F198"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#hydra-core",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F209"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F210"
                }
              ],
              [
                {
                  "t": "text",
                  "text": "Not on GitHub"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F213"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F211"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#django-environ",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F226"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F227"
                }
              ],
              [
                {
                  "t": "text",
                  "text": "Not on GitHub"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F230"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F228"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#python-decouple",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F243"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F244"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F57"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F247"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F245"
                }
              ]
            ]
          ],
          "variant": "pop",
          "caption": [
            {
              "t": "text",
              "text": "Downloads: "
            },
            {
              "t": "text",
              "text": "pypi"
            },
            {
              "t": "text",
              "text": ", last thirty days. Stars and releases: GitHub. Amber: no release in over a year."
            }
          ]
        }
      ],
      "note": [
        {
          "t": "link",
          "href": "#python-dotenv",
          "label": [
            {
              "t": "text",
              "text": "python-dotenv"
            }
          ]
        },
        {
          "t": "text",
          "text": " has the most monthly downloads in this comparison, at "
        },
        {
          "t": "fact",
          "fact": "F133"
        },
        {
          "t": "text",
          "text": "."
        }
      ]
    },
    {
      "id": "libraries_capabilities",
      "anchor": "capabilities",
      "heading": "Capabilities",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "Dotenv file loader",
            "Nested configuration merge",
            "Application CLI overrides"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#python-dotenv",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F132"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F141"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F142"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F143"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#pydantic-settings",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F149"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F156"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F157"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F158"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#traitlets",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F164"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F173"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F174"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F175"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#omegaconf",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F181"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F188"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F189"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F190"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#configargparse",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F196"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F205"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F206"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F207"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#hydra-core",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F209"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F218"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F219"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F220"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#django-environ",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F226"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F235"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F236"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F237"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#python-decouple",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F243"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F250"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F251"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F252"
                }
              ]
            ]
          ],
          "variant": "cap"
        }
      ]
    },
    {
      "id": "libraries_entries",
      "anchor": "libraries",
      "heading": "Libraries",
      "blocks": [
        {
          "b": "entry",
          "anchor": "python-dotenv",
          "name": [
            {
              "t": "fact",
              "fact": "F132"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/theskumar/python-dotenv"
            },
            {
              "label": "pypi",
              "href": "https://pypi.org/project/python-dotenv"
            },
            {
              "label": "Docs",
              "href": "https://github.com/theskumar/python-dotenv/blob/v1.2.4/src/dotenv/main.py"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F139"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F133"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F135"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F134"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/theskumar/python-dotenv/blob/v1.2.4/src/dotenv/main.py",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F132"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F147"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F148"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/pydantic/pydantic-settings",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F147"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "@staticmethod\ndef _static_read_env_file(\n    file_path: Path,\n    *,\n    encoding: str | None = None,\n    case_sensitive: bool = False,\n    ignore_empty: bool = False,\n    parse_none_str: str | None = None,\n) -> Mapping[str, str | None]:\n    encoding = encoding if encoding is not None else 'utf-8'\n    file_vars: dict[str, str | None] = dotenv_values(file_path, encoding=encoding)\n    return parse_env_vars(file_vars, case_sensitive, ignore_empty, parse_none_str)",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/pydantic/pydantic-settings/blob/50e676c2050225877a011779ef6c07a942feb335/pydantic_settings/sources/providers/dotenv.py#L82-L93",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F146"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=python-dotenv%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F132"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from dotenv import load_dotenv\n\nload_dotenv()\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/theskumar/python-dotenv/blob/v1.2.4/src/dotenv/main.py",
                  "label": [
                    {
                      "t": "text",
                      "text": "main.py"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F137"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "pydantic-settings",
          "name": [
            {
              "t": "fact",
              "fact": "F149"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/pydantic/pydantic-settings"
            },
            {
              "label": "pypi",
              "href": "https://pypi.org/project/pydantic-settings"
            },
            {
              "label": "Docs",
              "href": "https://docs.pydantic.dev/latest/concepts/pydantic_settings/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F11"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F150"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F6"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F152"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F151"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://docs.pydantic.dev/latest/concepts/pydantic_settings/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F149"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F12"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F13"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F14"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F15"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F16"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F17"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F18"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F19"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F162"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F163"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/hatchet-dev/hatchet",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F162"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def _ambient_client_token_source() -> str | None:\n    \"\"\"\n    Return where a token picked up by the standard `ClientConfig` constructor\n    would come from (the environment, or one of the `.env` files it reads), or\n    `None` if there is none. The `.env` files are probed with `ClientConfig`'s\n    own pydantic-settings dotenv source, one file at a time so the warning can\n    name the file, which keeps the answer identical to what the constructor\n    would actually load.\n    \"\"\"\n    if os.environ.get(\"HATCHET_CLIENT_TOKEN\"):\n        return \"the environment\"\n\n    env_prefix = str(ClientConfig.model_config.get(\"env_prefix\", \"\"))\n    env_file_setting = ClientConfig.model_config.get(\"env_file\")\n\n    env_files: tuple[Path | str, ...]\n    if env_file_setting is None:\n        env_files = ()\n    elif isinstance(env_file_setting, (str, Path)):\n        env_files = (env_file_setting,)\n    else:\n        env_files = tuple(env_file_setting)\n\n    for name in env_files:\n        source = DotEnvSettingsSource(\n            ClientConfig, env_file=name, env_prefix=env_prefix\n        )\n        if source().get(\"token\"):\n            return str(name)\n\n    return None",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/hatchet-dev/hatchet/blob/762e6018e9a48f39fa02993fb080391c7e201906/sdks/python/hatchet_sdk/embedded.py#L287-L317",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F161"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20applications%20using%20pydantic-settings%20for%20settings-source%20precedence%2C%20layered%20overrides%2C%20configuration%20composition%20and%20migration&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F149"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from pydantic_settings import BaseSettings\n\nclass Settings(BaseSettings):\n    app_name: str = \"demo\"\n\nprint(Settings().app_name)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://docs.pydantic.dev/latest/concepts/pydantic_settings/",
                  "label": [
                    {
                      "t": "text",
                      "text": "pydantic_settings.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F154"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "traitlets",
          "name": [
            {
              "t": "fact",
              "fact": "F164"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/ipython/traitlets"
            },
            {
              "label": "pypi",
              "href": "https://pypi.org/project/traitlets"
            },
            {
              "label": "Docs",
              "href": "https://traitlets.readthedocs.io/en/stable/config.html"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F171"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F165"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F167"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F166"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://traitlets.readthedocs.io/en/stable/config.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F164"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F179"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F180"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/jupyter/jupyter_core",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F179"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def load_config_file(self, suppress_errors: bool = True) -> None:  # type:ignore[override]\n    \"\"\"Load the config file.\n\n    By default, errors in loading config are handled, and a warning\n    printed on screen. For testing, the suppress_errors option is set\n    to False, so errors will make tests fail.\n    \"\"\"\n    self.log.debug(\"Searching %s for config files\", self.config_file_paths)\n    base_config = \"jupyter_config\"\n    try:\n        super().load_config_file(\n            base_config,\n            path=self.config_file_paths,\n        )\n    except ConfigFileNotFound:\n        # ignore errors loading parent\n        self.log.debug(\"Config file %s not found\", base_config)\n\n    if self.config_file:\n        path, config_file_name = os.path.split(self.config_file)\n    else:\n        path = self.config_file_paths  # type:ignore[assignment]\n        config_file_name = self.config_file_name\n\n        if not config_file_name or (config_file_name == base_config):\n            return\n\n    try:\n        super().load_config_file(config_file_name, path=path)\n    except ConfigFileNotFound:\n        self.log.debug(\"Config file not found, skipping: %s\", config_file_name)\n    except Exception:\n        # Reraise errors for testing purposes, or if set in\n        # self.raise_config_file_errors\n        if (not suppress_errors) or self.raise_config_file_errors:\n            raise\n        self.log.warning(\"Error loading config file: %s\", config_file_name, exc_info=True)",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/jupyter/jupyter_core/blob/21b34b5a662165a4ea3dd5f86bc6e06374393468/jupyter_core/application.py#L188-L224",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F178"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=traitlets%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F164"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from traitlets import Integer\nfrom traitlets.config import Config, Configurable\n\nclass App(Configurable):\n    workers = Integer(2).tag(config=True)\n\nprint(App(config=Config({\"App\": {\"workers\": 4}})).workers)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://traitlets.readthedocs.io/en/stable/config.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "config.html"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F169"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "omegaconf",
          "name": [
            {
              "t": "fact",
              "fact": "F181"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/hydra-ecosystem/omegaconf"
            },
            {
              "label": "pypi",
              "href": "https://pypi.org/project/omegaconf"
            },
            {
              "label": "Docs",
              "href": "https://omegaconf.readthedocs.io/en/latest/usage.html"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F37"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F182"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F31"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F184"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F183"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://omegaconf.readthedocs.io/en/latest/usage.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F181"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F38"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F39"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F40"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F41"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F42"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F43"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F44"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F45"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F194"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F195"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/hydra-ecosystem/hydra",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F194"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "@staticmethod\ndef _embed_result_config(\n    ret: ConfigResult, package_override: str | None\n) -> ConfigResult:\n    package = ret.header[\"package\"]\n    if package_override is not None:\n        package = package_override\n\n    if package is not None and package != \"\":\n        cfg = OmegaConf.create()\n        OmegaConf.update(cfg, package, ret.config, merge=False)\n        ret = copy.copy(ret)\n        ret.config = cfg\n\n    return ret",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/hydra-ecosystem/hydra/blob/fdd1cbb80369222e9e132f107456a9c8af1842cb/hydra/_internal/config_loader_impl.py#L708-L722",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F193"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20applications%20using%20omegaconf%20for%20settings-source%20precedence%2C%20layered%20overrides%2C%20configuration%20composition%20and%20migration&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F181"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from omegaconf import OmegaConf\n\ncfg = OmegaConf.create({\"server\": {\"port\": 8000}})\nprint(cfg.server.port)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://omegaconf.readthedocs.io/en/latest/usage.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "usage.html"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F186"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "configargparse",
          "name": [
            {
              "t": "fact",
              "fact": "F196"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/bw2/ConfigArgParse"
            },
            {
              "label": "pypi",
              "href": "https://pypi.org/project/configargparse"
            },
            {
              "label": "Docs",
              "href": "https://github.com/bw2/ConfigArgParse/blob/v1.10.1/configargparse.py"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F203"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F197"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F199"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F198"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/bw2/ConfigArgParse/blob/v1.10.1/configargparse.py",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F196"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import configargparse\n\nparser = configargparse.ArgParser()\nparser.add(\"--workers\", type=int, default=2, env_var=\"WORKERS\")\nprint(parser.parse_args([\"--workers\", \"4\"]).workers)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/bw2/ConfigArgParse/blob/v1.10.1/configargparse.py",
                  "label": [
                    {
                      "t": "text",
                      "text": "configargparse.py"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=configargparse%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "Find projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F196"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F201"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "hydra-core",
          "name": [
            {
              "t": "fact",
              "fact": "F209"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/hydra-ecosystem/hydra"
            },
            {
              "label": "pypi",
              "href": "https://pypi.org/project/hydra-core"
            },
            {
              "label": "Docs",
              "href": "https://hydra.cc/docs/advanced/compose_api/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F216"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F210"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F212"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F211"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://hydra.cc/docs/advanced/compose_api/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F209"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F224"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F225"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/JonasGeiping/cramming",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F224"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def get_backend_config(backend=\"torch-default\", overrides=[]):\n    \"\"\"Return default hydra config for a given attack.\"\"\"\n    with hydra.initialize(config_path=\"config/impl\"):\n        cfg = hydra.compose(config_name=backend, overrides=overrides)\n        print(f\"Loading backend {cfg.name}.\")\n    return cfg",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/JonasGeiping/cramming/blob/196c9912d8c5b06a05e9a58edd1521e3d38f7c0c/cramming/__init__.py#L39-L44",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F223"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=hydra-core%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F209"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from hydra import compose, initialize\n\nwith initialize(version_base=None, config_path=None):\n    cfg = compose(overrides=[\"+message=hello\"])\nprint(cfg.message)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://hydra.cc/docs/advanced/compose_api/",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F214"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "django-environ",
          "name": [
            {
              "t": "fact",
              "fact": "F226"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/joke2k/django-environ"
            },
            {
              "label": "pypi",
              "href": "https://pypi.org/project/django-environ"
            },
            {
              "label": "Docs",
              "href": "https://django-environ.readthedocs.io/en/latest/api.html"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F233"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F227"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F229"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F228"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://django-environ.readthedocs.io/en/latest/api.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F226"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F241"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F242"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/HumanSignal/label-studio",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F241"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def generate_secret_key_if_missing(data_dir: str) -> str:\n    env_key = 'SECRET_KEY'\n    env = environ.Env()\n    env_filepath = os.path.join(data_dir, '.env')\n    restrict_env_file_permissions(env_filepath)\n    environ.Env.read_env(env_filepath)\n\n    if existing_secret := env.str(env_key, ''):\n        return existing_secret\n\n    logger.warning(f'Warning: {env_key} not found in environment variables. Will generate a random key.')\n    new_secret = get_random_secret_key()\n\n    if is_collectstatic():\n        logger.info(\n            'Random SECRET_KEY was generated, but it is not being persisted because this is a collectstatic run'\n        )\n        return new_secret\n\n    try:\n        # SECRET_KEY also signs JWTs, so the file must not be readable by other local users\n        fd = os.open(env_filepath, os.O_WRONLY | os.O_APPEND | os.O_CREAT, 0o600)\n        with os.fdopen(fd, 'a') as f:\n            f.write(f'\\n{env_key}={new_secret}\\n')  # nosec\n    except Exception as e:\n        logger.warning(\n            f'Warning: failed to write {env_key} to .env file: {e}, new key will be regenerated on every '\n            f'server restart. If this key is used for signing, it will invalidate all existing sessions '\n            f'or tokens. Please set {env_key} in your environment variables to avoid this warning.'\n        )\n\n    os.environ[env_key] = new_secret\n    return new_secret",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/HumanSignal/label-studio/blob/bce6c7ba79c3a0d4c4c6b54de98d2e8e9586c1b6/label_studio/core/utils/secret_key.py#L29-L61",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F240"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=django-environ%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F226"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import environ\n\nenv = environ.Env(DEBUG=(bool, False))\nprint(env(\"DEBUG\"))\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://django-environ.readthedocs.io/en/latest/quickstart.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "quickstart.html"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F231"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "python-decouple",
          "name": [
            {
              "t": "fact",
              "fact": "F243"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/HBNetwork/python-decouple"
            },
            {
              "label": "pypi",
              "href": "https://pypi.org/project/python-decouple"
            },
            {
              "label": "Docs",
              "href": "https://github.com/HBNetwork/python-decouple/blob/v3.8/decouple.py"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F61"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F244"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F57"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F246"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F245"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/HBNetwork/python-decouple/blob/v3.8/decouple.py",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F243"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F62"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F63"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F64"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F65"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F66"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F67"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F68"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F69"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F256"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F257"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/RoboSats/robosats",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F256"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "@shared_task(name=\"follow_send_payment\", time_limit=180, soft_time_limit=175)\ndef follow_send_payment(hash):\n    \"\"\"Sends sats to buyer, continuous update\"\"\"\n\n    from datetime import timedelta\n\n    from decouple import config\n    from django.utils import timezone\n\n    from api.lightning.node import LNNode\n    from api.models import LNPayment\n\n    if config(\"DEBUG_PERMISSIONED_PAYOUTS\", cast=bool, default=False):\n        return\n\n    lnpayment = LNPayment.objects.get(payment_hash=hash)\n    lnpayment.last_routing_time = timezone.now()\n    lnpayment.save(update_fields=[\"last_routing_time\"])\n\n    # Checked against the lightning node before every attempt; a payout that fails it\n    # is held (and retried in an hour) until the coordinator looks at it.\n    from api.logics import payout_problem\n\n    problem = payout_problem(lnpayment)\n    if problem:\n        print(f\"PAYOUT HELD {hash}: {problem}\", flush=True)\n        from api.models import Order\n\n        order = Order.objects.filter(payout=lnpayment).first()\n        if order and \"PAYOUT HELD\" not in (order.logs or \"\"):\n            order.log(f\"PAYOUT HELD: {problem}\", level=\"WARN\")\n        lnpayment.last_routing_time = timezone.now() + timedelta(hours=1)\n        lnpayment.save(update_fields=[\"last_routing_time\"])\n        return\n\n    # Default is 0ppm. Set by the user over API. Client's default is 1000 ppm.\n    fee_limit_sat = int(\n        float(lnpayment.num_satoshis) * float(lnpayment.routing_budget_ppm) / 1_000_000\n    )\n    timeout_seconds = config(\"PAYOUT_TIMEOUT_SECONDS\", cast=int, default=90)\n    try:\n        results = LNNode.follow_send_payment(lnpayment, fee_limit_sat, timeout_seconds)\n\n    except SoftTimeLimitExceeded:\n        # If the 175 seconds have been consumed without follow_send_payment()\n        # returning, we set the last routing time as 'in 10 minutes'\n        # so the next check happens in 10 minutes, instead of right now.\n        lnpayment.last_routing_time = timezone.now() + timedelta(minutes=10)\n        lnpayment.save(update_fields=[\"last_routing_time\"])\n        print(\n            f\"Order: {lnpayment.order_paid_LN.id} SOFT TIME LIMIT REACHED. Hash: {hash}\"\n        )\n        results = {}\n\n    return results",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/RoboSats/robosats/blob/babf62e2238f262182d0bf638496aaa53e286853/api/tasks.py#L76-L130",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F255"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20applications%20using%20python-decouple%20for%20settings-source%20precedence%2C%20layered%20overrides%2C%20configuration%20composition%20and%20migration&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F243"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from decouple import config\n\nprint(config(\"DEBUG\", default=False, cast=bool))\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/HBNetwork/python-decouple/blob/master/README.rst",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.rst"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F248"
            }
          ]
        }
      ]
    }
  ],
  "questions": [
    {
      "q": "Which Python configuration library should I use?",
      "a": [
        {
          "t": "link",
          "href": "#pydantic-settings",
          "label": [
            {
              "t": "text",
              "text": "Pydantic Settings"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits applications that validate settings against a typed model. "
        },
        {
          "t": "link",
          "href": "#python-dotenv",
          "label": [
            {
              "t": "text",
              "text": "python-dotenv"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits scripts that only need the values from a .env file. "
        },
        {
          "t": "link",
          "href": "#omegaconf",
          "label": [
            {
              "t": "text",
              "text": "OmegaConf"
            }
          ]
        },
        {
          "t": "text",
          "text": " and "
        },
        {
          "t": "link",
          "href": "#hydra-core",
          "label": [
            {
              "t": "text",
              "text": "Hydra"
            }
          ]
        },
        {
          "t": "text",
          "text": " suit nested configurations with command-line overrides."
        }
      ]
    },
    {
      "q": "What is python-dotenv?",
      "a": [
        {
          "t": "link",
          "href": "#python-dotenv",
          "label": [
            {
              "t": "text",
              "text": "python-dotenv"
            }
          ]
        },
        {
          "t": "text",
          "text": " reads key-value pairs from a .env file and sets them as environment variables. It does not build typed settings models or merge nested configuration."
        }
      ]
    },
    {
      "q": "What is Pydantic Settings?",
      "a": [
        {
          "t": "link",
          "href": "#pydantic-settings",
          "label": [
            {
              "t": "text",
              "text": "Pydantic Settings"
            }
          ]
        },
        {
          "t": "text",
          "text": " loads settings into typed models from environment variables, dotenv files, secrets files, and custom sources. It validates each value against the declared field types."
        }
      ]
    },
    {
      "q": "What is OmegaConf?",
      "a": [
        {
          "t": "link",
          "href": "#omegaconf",
          "label": [
            {
              "t": "text",
              "text": "OmegaConf"
            }
          ]
        },
        {
          "t": "text",
          "text": " builds hierarchical configuration objects with interpolation between values, structured schemas, and recursive merging. "
        },
        {
          "t": "link",
          "href": "#hydra-core",
          "label": [
            {
              "t": "text",
              "text": "Hydra"
            }
          ]
        },
        {
          "t": "text",
          "text": " builds configuration composition on top of it."
        }
      ]
    },
    {
      "q": "What is Hydra in Python?",
      "a": [
        {
          "t": "link",
          "href": "#hydra-core",
          "label": [
            {
              "t": "text",
              "text": "Hydra"
            }
          ]
        },
        {
          "t": "text",
          "text": " composes an application's configuration from modular groups and command-line overrides. It runs on OmegaConf and adds launch and multirun workflows."
        }
      ]
    }
  ],
  "facts": {
    "F1": {
      "label": "Library name, pydantic-settings",
      "display": "Pydantic Settings",
      "asOf": "2026-11-17"
    },
    "F2": {
      "label": "Monthly downloads, pydantic-settings",
      "display": "487.7M",
      "asOf": "2026-11-17"
    },
    "F3": {
      "label": "License, pydantic-settings",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F4": {
      "label": "Package release, pydantic-settings",
      "display": "2.16.3, Nov 2026",
      "asOf": "2026-11-13"
    },
    "F5": {
      "label": "Package release date, pydantic-settings",
      "display": "Nov 2026",
      "asOf": "2026-11-13"
    },
    "F6": {
      "label": "Repository stars, pydantic-settings",
      "display": "1.5K",
      "asOf": "2026-11-17"
    },
    "F7": {
      "label": "Typed values, pydantic-settings",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F8": {
      "label": "Nested keys, pydantic-settings",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F9": {
      "label": "Deep merge, pydantic-settings",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F10": {
      "label": "Install, pydantic-settings",
      "display": "pip install pydantic-settings",
      "asOf": "2026-11-17"
    },
    "F11": {
      "label": "What it does, pydantic-settings",
      "display": "Loads application settings into typed models from ordered environment, file, and custom sources.",
      "asOf": "2026-11-17"
    },
    "F12": {
      "label": "strengths lead, pydantic-settings",
      "display": "Validates declared settings types",
      "asOf": "2026-11-17"
    },
    "F13": {
      "label": "strengths, pydantic-settings",
      "display": "Validate configuration against a typed settings model.",
      "asOf": "2026-11-17"
    },
    "F14": {
      "label": "strengths lead, pydantic-settings",
      "display": "Customizes source precedence",
      "asOf": "2026-11-17"
    },
    "F15": {
      "label": "strengths, pydantic-settings",
      "display": "Order settings sources explicitly when the defaults do not fit.",
      "asOf": "2026-11-17"
    },
    "F16": {
      "label": "limitations lead, pydantic-settings",
      "display": "Dotenv rejects undeclared fields",
      "asOf": "2026-11-17"
    },
    "F17": {
      "label": "limitations, pydantic-settings",
      "display": "Extra dotenv values raise validation errors under the default forbid policy.",
      "asOf": "2026-11-17"
    },
    "F18": {
      "label": "limitations lead, pydantic-settings",
      "display": "Windows environment matching ignores case",
      "asOf": "2026-11-17"
    },
    "F19": {
      "label": "limitations, pydantic-settings",
      "display": "case_sensitive cannot enforce environment-variable casing on Windows.",
      "asOf": "2026-11-17"
    },
    "F20": {
      "label": "Quickstart, pydantic-settings",
      "display": "from collections.abc import Callable\nfrom typing import Any\n\nfrom pydantic import (\n    AliasChoices,\n    AmqpDsn,\n    BaseModel,\n    Field,\n    ImportString,\n    PostgresDsn,\n    RedisDsn,\n)\n\nfrom pydantic_settings import BaseSettings, SettingsConfigDict\n\nclass SubModel(BaseModel):\n    foo: str = 'bar'\n    apple: int = 1\n\nclass Settings(BaseSettings):\n    auth_key: str = Field(validation_alias='my_auth_key')  # (1)\n\n    api_key: str = Field(alias='my_api_key')  # (2)\n\n    redis_dsn: RedisDsn = Field(\n        'redis://user:pass@localhost:6379/1',\n        validation_alias=AliasChoices('service_redis_dsn', 'redis_url'),  # (3)\n    )\n    pg_dsn: PostgresDsn = 'postgres://user:pass@localhost:5432/foobar'\n    amqp_dsn: AmqpDsn = 'amqp://user:pass@localhost:5672/'\n\n    special_function: ImportString[Callable[[Any], Any]] = 'math.cos'  # (4)\n\n    # to override domains:\n    # export my_prefix_domains='[\"foo.com\", \"bar.com\"]'\n    domains: set[str] = set()\n\n    # to override more_settings:\n    # export my_prefix_more_settings='{\"foo\": \"x\", \"apple\": 1}'\n    more_settings: SubModel = SubModel()\n\n    model_config = SettingsConfigDict(env_prefix='my_prefix_')  # (5)\n\nprint(Settings().model_dump())\n\"\"\"\n{\n    'auth_key': 'xxx',\n    'api_key': 'xxx',\n    'redis_dsn': RedisDsn('redis://user:pass@localhost:6379/1'),\n    'pg_dsn': PostgresDsn('postgres://user:pass@localhost:5432/foobar'),\n    'amqp_dsn': AmqpDsn('amqp://user:pass@localhost:5672/'),\n    'special_function': math.cos,\n    'domains': set(),\n    'more_settings': {'foo': 'bar', 'apple': 1},\n}\n\"\"\"\n\n",
      "asOf": "2026-11-17"
    },
    "F21": {
      "label": "Project function, pydantic-settings",
      "display": "def _ambient_client_token_source() -> str | None:\n    \"\"\"\n    Return where a token picked up by the standard `ClientConfig` constructor\n    would come from (the environment, or one of the `.env` files it reads), or\n    `None` if there is none. The `.env` files are probed with `ClientConfig`'s\n    own pydantic-settings dotenv source, one file at a time so the warning can\n    name the file, which keeps the answer identical to what the constructor\n    would actually load.\n    \"\"\"\n    if os.environ.get(\"HATCHET_CLIENT_TOKEN\"):\n        return \"the environment\"\n\n    env_prefix = str(ClientConfig.model_config.get(\"env_prefix\", \"\"))\n    env_file_setting = ClientConfig.model_config.get(\"env_file\")\n\n    env_files: tuple[Path | str, ...]\n    if env_file_setting is None:\n        env_files = ()\n    elif isinstance(env_file_setting, (str, Path)):\n        env_files = (env_file_setting,)\n    else:\n        env_files = tuple(env_file_setting)\n\n    for name in env_files:\n        source = DotEnvSettingsSource(\n            ClientConfig, env_file=name, env_prefix=env_prefix\n        )\n        if source().get(\"token\"):\n            return str(name)\n\n    return None\n",
      "asOf": "2026-11-17"
    },
    "F22": {
      "label": "Project function reference, pydantic-settings",
      "display": "embedded.py · _ambient_client_token_source()",
      "asOf": "2026-11-17"
    },
    "F23": {
      "label": "Project repository, pydantic-settings",
      "display": "hatchet-dev/hatchet",
      "asOf": "2026-11-17"
    },
    "F24": {
      "label": "Project stars, hatchet-dev/hatchet",
      "display": "8.3K",
      "asOf": "2026-11-17"
    },
    "F25": {
      "label": "Project push date, hatchet-dev/hatchet",
      "display": "Nov 2026",
      "asOf": "2026-11-17"
    },
    "F26": {
      "label": "Library name, omegaconf",
      "display": "OmegaConf",
      "asOf": "2026-11-17"
    },
    "F27": {
      "label": "Monthly downloads, omegaconf",
      "display": "38.8M",
      "asOf": "2026-11-17"
    },
    "F28": {
      "label": "License, omegaconf",
      "display": "BSD",
      "asOf": "2026-11-17"
    },
    "F29": {
      "label": "Package release, omegaconf",
      "display": "2.4.0, Oct 2026",
      "asOf": "2026-10-09"
    },
    "F30": {
      "label": "Package release date, omegaconf",
      "display": "Oct 2026",
      "asOf": "2026-10-09"
    },
    "F31": {
      "label": "Repository stars, omegaconf",
      "display": "2.4K",
      "asOf": "2026-11-17"
    },
    "F32": {
      "label": "Typed values, omegaconf",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F33": {
      "label": "Nested keys, omegaconf",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F34": {
      "label": "Value interpolation, omegaconf",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F35": {
      "label": "Deep merge, omegaconf",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F36": {
      "label": "Install, omegaconf",
      "display": "pip install omegaconf",
      "asOf": "2026-11-17"
    },
    "F37": {
      "label": "What it does, omegaconf",
      "display": "Builds hierarchical configuration objects with interpolation, structured schemas, and configuration composition.",
      "asOf": "2026-11-17"
    },
    "F38": {
      "label": "strengths lead, omegaconf",
      "display": "Interpolates related settings lazily",
      "asOf": "2026-11-17"
    },
    "F39": {
      "label": "strengths, omegaconf",
      "display": "Reference other configuration values and resolve them when accessed.",
      "asOf": "2026-11-17"
    },
    "F40": {
      "label": "strengths lead, omegaconf",
      "display": "Validates structured configuration",
      "asOf": "2026-11-17"
    },
    "F41": {
      "label": "strengths, omegaconf",
      "display": "Use dataclass or attrs schemas to validate assignments at runtime.",
      "asOf": "2026-11-17"
    },
    "F42": {
      "label": "limitations lead, omegaconf",
      "display": "Implicit conversions emit warnings",
      "asOf": "2026-11-17"
    },
    "F43": {
      "label": "limitations, omegaconf",
      "display": "Use matching types or OmegaConf.update to request conversion explicitly.",
      "asOf": "2026-11-17"
    },
    "F44": {
      "label": "limitations lead, omegaconf",
      "display": "Resolution in place removes expressions",
      "asOf": "2026-11-17"
    },
    "F45": {
      "label": "limitations, omegaconf",
      "display": "Copy configuration before resolve when lazy references must be preserved.",
      "asOf": "2026-11-17"
    },
    "F46": {
      "label": "Quickstart, omegaconf",
      "display": "from omegaconf import OmegaConf \ndefaults = OmegaConf. create({ \n\"server\": {\"port\": 80}, \n\"debug\": False, \n}) \noverrides = OmegaConf. from_dotlist([\"server.port=8080\", \"debug=true\"]) \ncfg = OmegaConf. merge(defaults, overrides) \ncfg. server. port, cfg. debug \n",
      "asOf": "2026-11-17"
    },
    "F47": {
      "label": "Project function, omegaconf",
      "display": "def load_sweep_config(\n    self, master_config: DictConfig, sweep_overrides: list[str]\n) -> DictConfig:\n    # Recreate the config for this sweep instance with the appropriate overrides\n    overrides = OmegaConf.to_container(master_config.hydra.overrides.hydra)\n    assert isinstance(overrides, list)\n    overrides = overrides + sweep_overrides\n    # Sweep overrides are already expanded in the master config. Do not\n    # expand again: a target may also happen to be another alias name.\n    sweep_config = self._load_configuration(\n        config_name=master_config.hydra.job.config_name,\n        overrides=overrides,\n        run_mode=RunMode.RUN,\n        from_shell=True,\n        validate_sweep_overrides=True,\n        skip_missing_defaults=False,\n        activate_config_repository=False,\n        parsed_overrides=OverridesParser.create().parse_overrides(overrides),\n    )\n    ConfigLoaderImpl._ensure_sweep_config_controller_unchanged(\n        master_config=master_config,\n        sweep_config=sweep_config,\n    )\n\n    # Copy old config cache to ensure we get the same resolved values (for things\n    # like timestamps etc). Since `oc.env` does not cache environment variables\n    # (but the deprecated `env` resolver did), the entire config should be copied\n    OmegaConf.copy_cache(from_config=master_config, to_config=sweep_config)\n\n    return sweep_config\n",
      "asOf": "2026-11-17"
    },
    "F48": {
      "label": "Project function reference, omegaconf",
      "display": "config_loader_impl.py · load_sweep_config()",
      "asOf": "2026-11-17"
    },
    "F49": {
      "label": "Project repository, omegaconf",
      "display": "hydra-ecosystem/hydra",
      "asOf": "2026-11-17"
    },
    "F50": {
      "label": "Project stars, hydra-ecosystem/hydra",
      "display": "10.8K",
      "asOf": "2026-11-17"
    },
    "F51": {
      "label": "Project push date, hydra-ecosystem/hydra",
      "display": "Nov 2026",
      "asOf": "2026-11-17"
    },
    "F52": {
      "label": "Library name, python-decouple",
      "display": "python-decouple",
      "asOf": "2026-11-17"
    },
    "F53": {
      "label": "Monthly downloads, python-decouple",
      "display": "7.3M",
      "asOf": "2026-11-17"
    },
    "F54": {
      "label": "License, python-decouple",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F55": {
      "label": "Package release, python-decouple",
      "display": "3.8, Mar 2023",
      "asOf": "2023-03-01"
    },
    "F56": {
      "label": "Package release date, python-decouple",
      "display": "Mar 2023",
      "asOf": "2023-03-01"
    },
    "F57": {
      "label": "Repository stars, python-decouple",
      "display": "3.0K",
      "asOf": "2026-11-17"
    },
    "F58": {
      "label": "Typed values, python-decouple",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F59": {
      "label": "Value interpolation, python-decouple",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F60": {
      "label": "Install, python-decouple",
      "display": "pip install python-decouple",
      "asOf": "2026-11-17"
    },
    "F61": {
      "label": "What it does, python-decouple",
      "display": "Looks up settings in environment variables and INI or dotenv files, with defaults and explicit casts.",
      "asOf": "2026-11-17"
    },
    "F62": {
      "label": "strengths lead, python-decouple",
      "display": "Environment values take precedence",
      "asOf": "2026-11-17"
    },
    "F63": {
      "label": "strengths, python-decouple",
      "display": "Environment variables override matching settings-file values.",
      "asOf": "2026-11-17"
    },
    "F64": {
      "label": "strengths lead, python-decouple",
      "display": "Casts values at lookup",
      "asOf": "2026-11-17"
    },
    "F65": {
      "label": "strengths, python-decouple",
      "display": "Apply bool, int, or custom casts when retrieving a setting.",
      "asOf": "2026-11-17"
    },
    "F66": {
      "label": "limitations lead, python-decouple",
      "display": "Values start as strings",
      "asOf": "2026-11-17"
    },
    "F67": {
      "label": "limitations, python-decouple",
      "display": "Request explicit casts when booleans, numbers, or lists are needed.",
      "asOf": "2026-11-17"
    },
    "F68": {
      "label": "limitations lead, python-decouple",
      "display": "Missing required values raise errors",
      "asOf": "2026-11-17"
    },
    "F69": {
      "label": "limitations, python-decouple",
      "display": "Provide a default or handle UndefinedValueError for missing settings.",
      "asOf": "2026-11-17"
    },
    "F70": {
      "label": "Quickstart, python-decouple",
      "display": "from decouple import config\n\nSECRET_KEY = config('SECRET_KEY')\nDEBUG = config('DEBUG', default=False, cast=bool)\nEMAIL_HOST = config('EMAIL_HOST', default='localhost')\nEMAIL_PORT = config('EMAIL_PORT', default=25, cast=int)\n",
      "asOf": "2026-11-17"
    },
    "F71": {
      "label": "Project function, python-decouple",
      "display": "def update_envs():\n    \"\"\"Update Var. attributes to udB\"\"\"\n    from .. import udB\n    _envs = [*list(os.environ)]\n    env_file = config._find_file(\".\")\n    if env_file:\n        try:\n            [_envs.append(_) for _ in list(RepositoryEnv(env_file).data)]\n        except Exception:\n            pass\n    for envs in _envs:\n        if (\n            envs in [\"LOG_CHANNEL\", \"BOT_TOKEN\", \"BOTMODE\", \"DUAL_MODE\", \"language\"]\n            or envs in udB.keys()\n        ):\n            if _value := os.environ.get(envs):\n                udB.set_key(envs, _value)\n            else:\n                udB.set_key(envs, config(envs, default=None))\n",
      "asOf": "2026-11-17"
    },
    "F72": {
      "label": "Project function reference, python-decouple",
      "display": "funcs.py · update_envs()",
      "asOf": "2026-11-17"
    },
    "F73": {
      "label": "Project repository, python-decouple",
      "display": "TeamUltroid/Ultroid",
      "asOf": "2026-11-17"
    },
    "F74": {
      "label": "Project stars, TeamUltroid/Ultroid",
      "display": "3.0K",
      "asOf": "2026-11-17"
    },
    "F75": {
      "label": "Project push date, TeamUltroid/Ultroid",
      "display": "Nov 2026",
      "asOf": "2026-11-05"
    },
    "F76": {
      "label": "Library name, dynaconf",
      "display": "Dynaconf",
      "asOf": "2026-11-17"
    },
    "F77": {
      "label": "Monthly downloads, dynaconf",
      "display": "5.3M",
      "asOf": "2026-11-17"
    },
    "F78": {
      "label": "License, dynaconf",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F79": {
      "label": "Package release, dynaconf",
      "display": "3.3.5, Aug 2026",
      "asOf": "2026-08-05"
    },
    "F80": {
      "label": "Package release date, dynaconf",
      "display": "Aug 2026",
      "asOf": "2026-08-05"
    },
    "F81": {
      "label": "Repository stars, dynaconf",
      "display": "4.3K",
      "asOf": "2026-11-17"
    },
    "F82": {
      "label": "Typed values, dynaconf",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F83": {
      "label": "Nested keys, dynaconf",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F84": {
      "label": "Value interpolation, dynaconf",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F85": {
      "label": "Deep merge, dynaconf",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F86": {
      "label": "Install, dynaconf",
      "display": "pip install dynaconf",
      "asOf": "2026-11-17"
    },
    "F87": {
      "label": "What it does, dynaconf",
      "display": "Loads configuration from multiple file formats and environment variables, with validation and templating.",
      "asOf": "2026-11-17"
    },
    "F88": {
      "label": "strengths lead, dynaconf",
      "display": "Environment overrides stay explicit",
      "asOf": "2026-11-17"
    },
    "F89": {
      "label": "strengths, dynaconf",
      "display": "Override settings by exporting variables with the configured prefix.",
      "asOf": "2026-11-17"
    },
    "F90": {
      "label": "strengths lead, dynaconf",
      "display": "Merges selected nested containers",
      "asOf": "2026-11-17"
    },
    "F91": {
      "label": "strengths, dynaconf",
      "display": "Use merge markers to combine dictionaries and lists across sources.",
      "asOf": "2026-11-17"
    },
    "F92": {
      "label": "limitations lead, dynaconf",
      "display": "Merging needs explicit opt-in",
      "asOf": "2026-11-17"
    },
    "F93": {
      "label": "limitations, dynaconf",
      "display": "Later files replace lists and dictionaries unless merging is enabled.",
      "asOf": "2026-11-17"
    },
    "F94": {
      "label": "limitations lead, dynaconf",
      "display": "Boolean-looking values can change type",
      "asOf": "2026-11-17"
    },
    "F95": {
      "label": "limitations, dynaconf",
      "display": "Use @str when True or False must remain literal text.",
      "asOf": "2026-11-17"
    },
    "F96": {
      "label": "Quickstart, dynaconf",
      "display": "from dynaconf import Dynaconf\n\nsettings = Dynaconf(\n    envvar_prefix=\"DYNACONF\",  # export envvars with `export DYNACONF_FOO=bar`.\n    settings_files=[\n        \"settings.yaml\",\n        \".secrets.yaml\",\n    ],  # Load files in the given order.\n)\n",
      "asOf": "2026-11-17"
    },
    "F97": {
      "label": "Project function, dynaconf",
      "display": "def _apply_settings_from_file(path: str, label: str):\n    \"\"\"\n    Merge an external .toml settings file into the global settings, section-by-section.\n    Uses the same custom_merge_loader as repo-local settings so security checks\n    (forbidden includes/preloads/loaders) apply consistently.\n    \"\"\"\n    if not path or not os.path.isfile(path):\n        return\n    try:\n        dynconf_kwargs = {\n            \"core_loaders\": [],\n            \"loaders\": [\"pr_agent.custom_merge_loader\"],\n            \"merge_enabled\": True,\n        }\n        try:\n            new_settings = Dynaconf(\n                settings_files=[path],\n                load_dotenv=False,\n                envvar_prefix=False,\n                **dynconf_kwargs,\n            )\n        except TypeError as e:\n            # Older Dynaconf versions don't accept load_dotenv / merge_enabled.\n            # The fallback Dynaconf(...) call below skips our custom_merge_loader,\n            # which is where validate_file_security() runs. Pre-validate the file\n            # explicitly here so forbidden directives (includes, preloads, custom\n            # loaders, ...) still cannot slip through on those older versions.\n            try:\n                with open(path, \"rb\") as f:\n                    parsed_toml = tomllib.load(f)\n                validate_file_security(parsed_toml, path)\n            except Exception as sec_err:\n                get_logger().warning(\n                    f\"Extra config failed security pre-validation; skipping: {sec_err}\"\n                )\n                return\n\n            get_logger().warning(\n                \"Your Dynaconf version does not support disabled \"\n                \"'load_dotenv'/'merge_enabled' parameters. Loading extra config \"\n                \"after explicit security pre-validation; some Dynaconf-level \"\n                \"hardening flags are off. Please upgrade Dynaconf for better \"\n                \"security.\",\n                artifact={\"error\": e, \"traceback\": traceback.format_exc()},\n            )\n            new_settings = Dynaconf(settings_files=[path])\n\n        merged_sections = []\n        for section, contents in new_settings.as_dict().items():\n            if not contents:\n                continue\n            section_dict = copy.deepcopy(get_settings().as_dict().get(section, {}))\n            _merge_section_keys(section_dict, contents)\n            get_settings().unset(section)\n            get_settings().set(section, section_dict, merge=False)\n            merged_sections.append(section)\n        # Restore env-var precedence: the section-level unset()/set() above can\n        # silently overwrite values originally sourced from env vars. Replay\n        # env_loader so the env layer remains the top of the precedence stack.\n        _reapply_env_overrides()\n        # Do NOT log the merged dict: external/repo .pr_agent.toml may contain\n        # secrets (e.g. openai.key, gitlab.personal_access_token) that would\n        # otherwise leak into CI logs. Section names are safe and sufficient\n        # for debugging which file contributed what.\n        get_logger().info(\n            f\"Applied {label} settings from {path} (sections merged: {sorted(merged_sections)})\"\n        )\n    except Exception as e:\n        get_logger().warning(f\"Failed to apply {label} settings from {path}: {e}\")\n",
      "asOf": "2026-11-17"
    },
    "F98": {
      "label": "Project function reference, dynaconf",
      "display": "utils.py · _apply_settings_from_file()",
      "asOf": "2026-11-17"
    },
    "F99": {
      "label": "Project repository, dynaconf",
      "display": "The-PR-Agent/pr-agent",
      "asOf": "2026-11-17"
    },
    "F100": {
      "label": "Project stars, The-PR-Agent/pr-agent",
      "display": "16.3K",
      "asOf": "2026-11-17"
    },
    "F101": {
      "label": "Project push date, The-PR-Agent/pr-agent",
      "display": "Nov 2026",
      "asOf": "2026-11-17"
    },
    "F102": {
      "label": "Developer need",
      "display": "Validating settings against a model",
      "asOf": "2026-11-17"
    },
    "F103": {
      "label": "Why choose pydantic-settings",
      "display": "typed settings validation",
      "asOf": "2026-11-17"
    },
    "F104": {
      "label": "Developer need in introduction",
      "display": "validating settings against a model",
      "asOf": "2026-11-17"
    },
    "F105": {
      "label": "When to consider omegaconf",
      "display": "lazy references between configuration values matter",
      "asOf": "2026-11-17"
    },
    "F106": {
      "label": "Developer need",
      "display": "Merging layered settings sources",
      "asOf": "2026-11-17"
    },
    "F107": {
      "label": "Why choose dynaconf",
      "display": "explicit container merge controls",
      "asOf": "2026-11-17"
    },
    "F108": {
      "label": "Developer need in introduction",
      "display": "merging layered settings sources",
      "asOf": "2026-11-17"
    },
    "F109": {
      "label": "When to consider pydantic-settings",
      "display": "a declared model should validate the settings",
      "asOf": "2026-11-17"
    },
    "F110": {
      "label": "Developer need",
      "display": "Linking hierarchical configuration values",
      "asOf": "2026-11-17"
    },
    "F111": {
      "label": "Why choose omegaconf",
      "display": "lazy value interpolation",
      "asOf": "2026-11-17"
    },
    "F112": {
      "label": "Developer need in introduction",
      "display": "linking hierarchical configuration values",
      "asOf": "2026-11-17"
    },
    "F113": {
      "label": "When to consider dynaconf",
      "display": "marker-driven file and environment merging is preferred",
      "asOf": "2026-11-17"
    },
    "F114": {
      "label": "Developer need",
      "display": "Looking up a few typed settings",
      "asOf": "2026-11-17"
    },
    "F115": {
      "label": "Why choose python-decouple",
      "display": "explicit casts at lookup",
      "asOf": "2026-11-17"
    },
    "F116": {
      "label": "Developer need in introduction",
      "display": "looking up a few typed settings",
      "asOf": "2026-11-17"
    },
    "F117": {
      "label": "When to consider pydantic-settings",
      "display": "model-based settings validation is needed",
      "asOf": "2026-11-17"
    },
    "F118": {
      "label": "Page introduction",
      "display": "Python configuration libraries let application developers load and organize application settings.",
      "asOf": "2026-11-17"
    },
    "F119": {
      "label": "FAQ: How does Pydantic Settings choose between sources?",
      "display": "Returned source callables run in priority order, with the first item highest.",
      "asOf": "2026-11-17"
    },
    "F120": {
      "label": "FAQ: Are settings sources merged shallowly?",
      "display": "Pydantic Settings uses a deep update, so lower-priority sources can fill missing nested keys.",
      "asOf": "2026-11-17"
    },
    "F121": {
      "label": "FAQ: Why does a shared dotenv file cause validation errors?",
      "display": "The default forbid policy rejects dotenv entries that are not declared model fields.",
      "asOf": "2026-11-17"
    },
    "F122": {
      "label": "FAQ: Does Pydantic case sensitivity work on Windows?",
      "display": "Windows environment variables are always matched without case sensitivity.",
      "asOf": "2026-11-17"
    },
    "F123": {
      "label": "FAQ: Does Pydantic case sensitivity work on Windows?",
      "display": "Dotenv file casing remains available for case-sensitive matching, including on Windows.",
      "asOf": "2026-11-17"
    },
    "F124": {
      "label": "FAQ: Does Dynaconf merge dictionaries automatically?",
      "display": "Merging is disabled by default and only applies to container values when enabled.",
      "asOf": "2026-11-17"
    },
    "F125": {
      "label": "FAQ: How can Dynaconf preserve boolean-looking text?",
      "display": "Use the explicit string token to preserve True or False as text.",
      "asOf": "2026-11-17"
    },
    "F126": {
      "label": "FAQ: Does Dynaconf interpolate settings lazily?",
      "display": "The format token uses Python str.format and evaluates substitutions on access.",
      "asOf": "2026-11-17"
    },
    "F127": {
      "label": "FAQ: Does OmegaConf return a dataclass instance?",
      "display": "A structured configuration remains a DictConfig object backed by its schema.",
      "asOf": "2026-11-17"
    },
    "F128": {
      "label": "FAQ: What happens when OmegaConf interpolations are resolved in place?",
      "display": "resolve replaces interpolation expressions with values, so copy first to retain lazy references.",
      "asOf": "2026-11-17"
    },
    "F129": {
      "label": "FAQ: Why can a converted OmegaConf assignment now warn?",
      "display": "Implicit conversion emits FutureWarning; matching types or explicit update conversion avoids it.",
      "asOf": "2026-11-17"
    },
    "F130": {
      "label": "FAQ: Does python-decouple prefer files or environment variables?",
      "display": "Environment variables override values from configuration files.",
      "asOf": "2026-11-17"
    },
    "F131": {
      "label": "FAQ: Does python-decouple interpolation mean dotenv expansion?",
      "display": "The documented interpolation behavior applies to ConfigParser-backed INI settings.",
      "asOf": "2026-11-17"
    },
    "F132": {
      "label": "Library name, python-dotenv",
      "display": "python-dotenv",
      "asOf": "2026-11-20"
    },
    "F133": {
      "label": "Monthly downloads, python-dotenv",
      "display": "757.3M",
      "asOf": "2026-11-20"
    },
    "F134": {
      "label": "License, python-dotenv",
      "display": "BSD-3-Clause",
      "asOf": "2026-11-20"
    },
    "F135": {
      "label": "Package release, python-dotenv",
      "display": "1.2.4",
      "asOf": "2026-11-20"
    },
    "F136": {
      "label": "Package release date, python-dotenv",
      "display": "Oct 2026",
      "asOf": "2026-11-20"
    },
    "F137": {
      "label": "Install, python-dotenv",
      "display": "python -m pip install python-dotenv==1.2.4",
      "asOf": "2026-11-20"
    },
    "F138": {
      "label": "Quickstart, python-dotenv",
      "display": "from dotenv import load_dotenv\n\nload_dotenv()\n",
      "asOf": "2026-11-20"
    },
    "F139": {
      "label": "Official description, python-dotenv",
      "display": "Reads key-value pairs from a .env file and sets them as environment variables.",
      "asOf": "2026-11-20"
    },
    "F140": {
      "label": "Quickstart source file, python-dotenv",
      "display": "src/dotenv/main.py",
      "asOf": "2026-11-20"
    },
    "F141": {
      "label": "Dotenv file loader, python-dotenv",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F142": {
      "label": "Nested configuration merge, python-dotenv",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F143": {
      "label": "Application CLI overrides, python-dotenv",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F144": {
      "label": "Documented interface and best-fit task, python-dotenv",
      "display": "Loads dotenv values into os.environ or returns an untyped mapping; streams and variable interpolation are supported. It does not construct typed settings models or merge nested config trees.",
      "asOf": "2026-11-20"
    },
    "F145": {
      "label": "Project function, python-dotenv",
      "display": "@staticmethod\ndef _static_read_env_file(\n    file_path: Path,\n    *,\n    encoding: str | None = None,\n    case_sensitive: bool = False,\n    ignore_empty: bool = False,\n    parse_none_str: str | None = None,\n) -> Mapping[str, str | None]:\n    encoding = encoding if encoding is not None else 'utf-8'\n    file_vars: dict[str, str | None] = dotenv_values(file_path, encoding=encoding)\n    return parse_env_vars(file_vars, case_sensitive, ignore_empty, parse_none_str)",
      "asOf": "2026-11-20"
    },
    "F146": {
      "label": "Project source file, python-dotenv",
      "display": "pydantic_settings/sources/providers/dotenv.py",
      "asOf": "2026-11-20"
    },
    "F147": {
      "label": "Project full_name, python-dotenv",
      "display": "pydantic/pydantic-settings",
      "asOf": "2026-11-20"
    },
    "F148": {
      "label": "Project stargazers_count, python-dotenv",
      "display": "1.5K",
      "asOf": "2026-11-20"
    },
    "F149": {
      "label": "Library name, pydantic-settings",
      "display": "Pydantic Settings",
      "asOf": "2026-11-20"
    },
    "F150": {
      "label": "Monthly downloads, pydantic-settings",
      "display": "487.7M",
      "asOf": "2026-11-20"
    },
    "F151": {
      "label": "License, pydantic-settings",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F152": {
      "label": "Package release, pydantic-settings",
      "display": "2.16.3",
      "asOf": "2026-11-20"
    },
    "F153": {
      "label": "Package release date, pydantic-settings",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F154": {
      "label": "Install, pydantic-settings",
      "display": "python -m pip install pydantic-settings==2.16.3",
      "asOf": "2026-11-20"
    },
    "F155": {
      "label": "Quickstart, pydantic-settings",
      "display": "from pydantic_settings import BaseSettings\n\nclass Settings(BaseSettings):\n    app_name: str = \"demo\"\n\nprint(Settings().app_name)\n",
      "asOf": "2026-11-20"
    },
    "F156": {
      "label": "Dotenv file loader, pydantic-settings",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F157": {
      "label": "Nested configuration merge, pydantic-settings",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F158": {
      "label": "Application CLI overrides, pydantic-settings",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F159": {
      "label": "Documented interface and best-fit task, pydantic-settings",
      "display": "Validates typed settings models from environment, dotenv, secrets files, and configurable sources, with nested settings and a native command-line parser. Requires Pydantic model conventions.",
      "asOf": "2026-11-20"
    },
    "F160": {
      "label": "Project function, pydantic-settings",
      "display": "def _ambient_client_token_source() -> str | None:\n    \"\"\"\n    Return where a token picked up by the standard `ClientConfig` constructor\n    would come from (the environment, or one of the `.env` files it reads), or\n    `None` if there is none. The `.env` files are probed with `ClientConfig`'s\n    own pydantic-settings dotenv source, one file at a time so the warning can\n    name the file, which keeps the answer identical to what the constructor\n    would actually load.\n    \"\"\"\n    if os.environ.get(\"HATCHET_CLIENT_TOKEN\"):\n        return \"the environment\"\n\n    env_prefix = str(ClientConfig.model_config.get(\"env_prefix\", \"\"))\n    env_file_setting = ClientConfig.model_config.get(\"env_file\")\n\n    env_files: tuple[Path | str, ...]\n    if env_file_setting is None:\n        env_files = ()\n    elif isinstance(env_file_setting, (str, Path)):\n        env_files = (env_file_setting,)\n    else:\n        env_files = tuple(env_file_setting)\n\n    for name in env_files:\n        source = DotEnvSettingsSource(\n            ClientConfig, env_file=name, env_prefix=env_prefix\n        )\n        if source().get(\"token\"):\n            return str(name)\n\n    return None",
      "asOf": "2026-11-20"
    },
    "F161": {
      "label": "Project source file, pydantic-settings",
      "display": "sdks/python/hatchet_sdk/embedded.py",
      "asOf": "2026-11-20"
    },
    "F162": {
      "label": "Project full_name, pydantic-settings",
      "display": "hatchet-dev/hatchet",
      "asOf": "2026-11-20"
    },
    "F163": {
      "label": "Project stargazers_count, pydantic-settings",
      "display": "8.3K",
      "asOf": "2026-11-20"
    },
    "F164": {
      "label": "Library name, traitlets",
      "display": "Traitlets",
      "asOf": "2026-11-20"
    },
    "F165": {
      "label": "Monthly downloads, traitlets",
      "display": "144.9M",
      "asOf": "2026-11-20"
    },
    "F166": {
      "label": "License, traitlets",
      "display": "BSD-3-Clause",
      "asOf": "2026-11-20"
    },
    "F167": {
      "label": "Package release, traitlets",
      "display": "5.16.1",
      "asOf": "2026-11-20"
    },
    "F168": {
      "label": "Package release date, traitlets",
      "display": "Aug 2026",
      "asOf": "2026-11-20"
    },
    "F169": {
      "label": "Install, traitlets",
      "display": "python -m pip install traitlets==5.16.1",
      "asOf": "2026-11-20"
    },
    "F170": {
      "label": "Quickstart, traitlets",
      "display": "from traitlets import Integer\nfrom traitlets.config import Config, Configurable\n\nclass App(Configurable):\n    workers = Integer(2).tag(config=True)\n\nprint(App(config=Config({\"App\": {\"workers\": 4}})).workers)\n",
      "asOf": "2026-11-20"
    },
    "F171": {
      "label": "Official description, traitlets",
      "display": "Provides a configuration system for Python applications.",
      "asOf": "2026-11-20"
    },
    "F172": {
      "label": "Quickstart source file, traitlets",
      "display": "config.html",
      "asOf": "2026-11-20"
    },
    "F173": {
      "label": "Dotenv file loader, traitlets",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F174": {
      "label": "Nested configuration merge, traitlets",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F175": {
      "label": "Application CLI overrides, traitlets",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F176": {
      "label": "Documented interface and best-fit task, traitlets",
      "display": "Configurable Python application classes with typed traits, hierarchical Config objects, file loading, and Application command-line aliases/flags; established Jupyter/IPython integration.",
      "asOf": "2026-11-20"
    },
    "F177": {
      "label": "Project function, traitlets",
      "display": "def load_config_file(self, suppress_errors: bool = True) -> None:  # type:ignore[override]\n    \"\"\"Load the config file.\n\n    By default, errors in loading config are handled, and a warning\n    printed on screen. For testing, the suppress_errors option is set\n    to False, so errors will make tests fail.\n    \"\"\"\n    self.log.debug(\"Searching %s for config files\", self.config_file_paths)\n    base_config = \"jupyter_config\"\n    try:\n        super().load_config_file(\n            base_config,\n            path=self.config_file_paths,\n        )\n    except ConfigFileNotFound:\n        # ignore errors loading parent\n        self.log.debug(\"Config file %s not found\", base_config)\n\n    if self.config_file:\n        path, config_file_name = os.path.split(self.config_file)\n    else:\n        path = self.config_file_paths  # type:ignore[assignment]\n        config_file_name = self.config_file_name\n\n        if not config_file_name or (config_file_name == base_config):\n            return\n\n    try:\n        super().load_config_file(config_file_name, path=path)\n    except ConfigFileNotFound:\n        self.log.debug(\"Config file not found, skipping: %s\", config_file_name)\n    except Exception:\n        # Reraise errors for testing purposes, or if set in\n        # self.raise_config_file_errors\n        if (not suppress_errors) or self.raise_config_file_errors:\n            raise\n        self.log.warning(\"Error loading config file: %s\", config_file_name, exc_info=True)",
      "asOf": "2026-11-20"
    },
    "F178": {
      "label": "Project source file, traitlets",
      "display": "jupyter_core/application.py",
      "asOf": "2026-11-20"
    },
    "F179": {
      "label": "Project full_name, traitlets",
      "display": "jupyter/jupyter_core",
      "asOf": "2026-11-20"
    },
    "F180": {
      "label": "Project stargazers_count, traitlets",
      "display": "219",
      "asOf": "2026-11-20"
    },
    "F181": {
      "label": "Library name, omegaconf",
      "display": "OmegaConf",
      "asOf": "2026-11-20"
    },
    "F182": {
      "label": "Monthly downloads, omegaconf",
      "display": "38.8M",
      "asOf": "2026-11-20"
    },
    "F183": {
      "label": "License, omegaconf",
      "display": "BSD-3-Clause",
      "asOf": "2026-11-20"
    },
    "F184": {
      "label": "Package release, omegaconf",
      "display": "2.4.0",
      "asOf": "2026-11-20"
    },
    "F185": {
      "label": "Package release date, omegaconf",
      "display": "Oct 2026",
      "asOf": "2026-11-20"
    },
    "F186": {
      "label": "Install, omegaconf",
      "display": "python -m pip install omegaconf==2.4.0",
      "asOf": "2026-11-20"
    },
    "F187": {
      "label": "Quickstart, omegaconf",
      "display": "from omegaconf import OmegaConf\n\ncfg = OmegaConf.create({\"server\": {\"port\": 8000}})\nprint(cfg.server.port)\n",
      "asOf": "2026-11-20"
    },
    "F188": {
      "label": "Dotenv file loader, omegaconf",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F189": {
      "label": "Nested configuration merge, omegaconf",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F190": {
      "label": "Application CLI overrides, omegaconf",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F191": {
      "label": "Documented interface and best-fit task, omegaconf",
      "display": "Hierarchical dictionary/list configuration with interpolation, structured config types, recursive merge, and dot-list/command-line overrides. Hydra builds application composition on this separate engine.",
      "asOf": "2026-11-20"
    },
    "F192": {
      "label": "Project function, omegaconf",
      "display": "@staticmethod\ndef _embed_result_config(\n    ret: ConfigResult, package_override: str | None\n) -> ConfigResult:\n    package = ret.header[\"package\"]\n    if package_override is not None:\n        package = package_override\n\n    if package is not None and package != \"\":\n        cfg = OmegaConf.create()\n        OmegaConf.update(cfg, package, ret.config, merge=False)\n        ret = copy.copy(ret)\n        ret.config = cfg\n\n    return ret",
      "asOf": "2026-11-20"
    },
    "F193": {
      "label": "Project source file, omegaconf",
      "display": "hydra/_internal/config_loader_impl.py",
      "asOf": "2026-11-20"
    },
    "F194": {
      "label": "Project full_name, omegaconf",
      "display": "hydra-ecosystem/hydra",
      "asOf": "2026-11-20"
    },
    "F195": {
      "label": "Project stargazers_count, omegaconf",
      "display": "10.8K",
      "asOf": "2026-11-20"
    },
    "F196": {
      "label": "Library name, configargparse",
      "display": "ConfigArgParse",
      "asOf": "2026-11-20"
    },
    "F197": {
      "label": "Monthly downloads, configargparse",
      "display": "21.8M",
      "asOf": "2026-11-20"
    },
    "F198": {
      "label": "License, configargparse",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F199": {
      "label": "Package release, configargparse",
      "display": "1.10.1",
      "asOf": "2026-11-20"
    },
    "F200": {
      "label": "Package release date, configargparse",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F201": {
      "label": "Install, configargparse",
      "display": "python -m pip install configargparse==1.10.1",
      "asOf": "2026-11-20"
    },
    "F202": {
      "label": "Quickstart, configargparse",
      "display": "import configargparse\n\nparser = configargparse.ArgParser()\nparser.add(\"--workers\", type=int, default=2, env_var=\"WORKERS\")\nprint(parser.parse_args([\"--workers\", \"4\"]).workers)\n",
      "asOf": "2026-11-20"
    },
    "F203": {
      "label": "Official description, configargparse",
      "display": "Extends argparse so options can also come from config files or environment variables.",
      "asOf": "2026-11-20"
    },
    "F204": {
      "label": "Quickstart source file, configargparse",
      "display": "configargparse.py",
      "asOf": "2026-11-20"
    },
    "F205": {
      "label": "Dotenv file loader, configargparse",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F206": {
      "label": "Nested configuration merge, configargparse",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F207": {
      "label": "Application CLI overrides, configargparse",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F208": {
      "label": "Documented interface and best-fit task, configargparse",
      "display": "Extends argparse with settings-file and environment-variable inputs, source precedence, and existing argparse option definitions; optimized for a command-line application interface rather than a nested merge tree.",
      "asOf": "2026-11-20"
    },
    "F209": {
      "label": "Library name, hydra-core",
      "display": "Hydra",
      "asOf": "2026-11-20"
    },
    "F210": {
      "label": "Monthly downloads, hydra-core",
      "display": "17.9M",
      "asOf": "2026-11-20"
    },
    "F211": {
      "label": "License, hydra-core",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F212": {
      "label": "Package release, hydra-core",
      "display": "1.3.8",
      "asOf": "2026-11-20"
    },
    "F213": {
      "label": "Package release date, hydra-core",
      "display": "Oct 2026",
      "asOf": "2026-11-20"
    },
    "F214": {
      "label": "Install, hydra-core",
      "display": "python -m pip install hydra-core==1.3.8",
      "asOf": "2026-11-20"
    },
    "F215": {
      "label": "Quickstart, hydra-core",
      "display": "from hydra import compose, initialize\n\nwith initialize(version_base=None, config_path=None):\n    cfg = compose(overrides=[\"+message=hello\"])\nprint(cfg.message)\n",
      "asOf": "2026-11-20"
    },
    "F216": {
      "label": "Official description, hydra-core",
      "display": "Provides a framework for configuring complex applications.",
      "asOf": "2026-11-20"
    },
    "F217": {
      "label": "Quickstart source file, hydra-core",
      "display": "advanced/compose_api/",
      "asOf": "2026-11-20"
    },
    "F218": {
      "label": "Dotenv file loader, hydra-core",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F219": {
      "label": "Nested configuration merge, hydra-core",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F220": {
      "label": "Application CLI overrides, hydra-core",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F221": {
      "label": "Documented interface and best-fit task, hydra-core",
      "display": "Composes modular configuration groups and command-line overrides, with application launch/multirun workflows. Uses OmegaConf and therefore has overlapping dependency counts, never pooled.",
      "asOf": "2026-11-20"
    },
    "F222": {
      "label": "Project function, hydra-core",
      "display": "def get_backend_config(backend=\"torch-default\", overrides=[]):\n    \"\"\"Return default hydra config for a given attack.\"\"\"\n    with hydra.initialize(config_path=\"config/impl\"):\n        cfg = hydra.compose(config_name=backend, overrides=overrides)\n        print(f\"Loading backend {cfg.name}.\")\n    return cfg",
      "asOf": "2026-11-20"
    },
    "F223": {
      "label": "Project source file, hydra-core",
      "display": "cramming/__init__.py",
      "asOf": "2026-11-20"
    },
    "F224": {
      "label": "Project full_name, hydra-core",
      "display": "JonasGeiping/cramming",
      "asOf": "2026-11-20"
    },
    "F225": {
      "label": "Project stargazers_count, hydra-core",
      "display": "1.4K",
      "asOf": "2026-11-20"
    },
    "F226": {
      "label": "Library name, django-environ",
      "display": "django-environ",
      "asOf": "2026-11-20"
    },
    "F227": {
      "label": "Monthly downloads, django-environ",
      "display": "9.1M",
      "asOf": "2026-11-20"
    },
    "F228": {
      "label": "License, django-environ",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F229": {
      "label": "Package release, django-environ",
      "display": "0.14.0",
      "asOf": "2026-11-20"
    },
    "F230": {
      "label": "Package release date, django-environ",
      "display": "Jun 2026",
      "asOf": "2026-11-20"
    },
    "F231": {
      "label": "Install, django-environ",
      "display": "python -m pip install django-environ==0.14.0",
      "asOf": "2026-11-20"
    },
    "F232": {
      "label": "Quickstart, django-environ",
      "display": "import environ\n\nenv = environ.Env(DEBUG=(bool, False))\nprint(env(\"DEBUG\"))\n",
      "asOf": "2026-11-20"
    },
    "F233": {
      "label": "Official description, django-environ",
      "display": "Configures Django applications from environment variables in the twelve-factor style.",
      "asOf": "2026-11-20"
    },
    "F234": {
      "label": "Quickstart source file, django-environ",
      "display": "quickstart.html",
      "asOf": "2026-11-20"
    },
    "F235": {
      "label": "Dotenv file loader, django-environ",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F236": {
      "label": "Nested configuration merge, django-environ",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F237": {
      "label": "Application CLI overrides, django-environ",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F238": {
      "label": "Documented interface and best-fit task, django-environ",
      "display": "Django settings environment loader with typed casts and database/cache/email URL helpers, including dotenv input. These framework URL helpers distinguish it from a generic env loader.",
      "asOf": "2026-11-20"
    },
    "F239": {
      "label": "Project function, django-environ",
      "display": "def generate_secret_key_if_missing(data_dir: str) -> str:\n    env_key = 'SECRET_KEY'\n    env = environ.Env()\n    env_filepath = os.path.join(data_dir, '.env')\n    restrict_env_file_permissions(env_filepath)\n    environ.Env.read_env(env_filepath)\n\n    if existing_secret := env.str(env_key, ''):\n        return existing_secret\n\n    logger.warning(f'Warning: {env_key} not found in environment variables. Will generate a random key.')\n    new_secret = get_random_secret_key()\n\n    if is_collectstatic():\n        logger.info(\n            'Random SECRET_KEY was generated, but it is not being persisted because this is a collectstatic run'\n        )\n        return new_secret\n\n    try:\n        # SECRET_KEY also signs JWTs, so the file must not be readable by other local users\n        fd = os.open(env_filepath, os.O_WRONLY | os.O_APPEND | os.O_CREAT, 0o600)\n        with os.fdopen(fd, 'a') as f:\n            f.write(f'\\n{env_key}={new_secret}\\n')  # nosec\n    except Exception as e:\n        logger.warning(\n            f'Warning: failed to write {env_key} to .env file: {e}, new key will be regenerated on every '\n            f'server restart. If this key is used for signing, it will invalidate all existing sessions '\n            f'or tokens. Please set {env_key} in your environment variables to avoid this warning.'\n        )\n\n    os.environ[env_key] = new_secret\n    return new_secret",
      "asOf": "2026-11-20"
    },
    "F240": {
      "label": "Project source file, django-environ",
      "display": "label_studio/core/utils/secret_key.py",
      "asOf": "2026-11-20"
    },
    "F241": {
      "label": "Project full_name, django-environ",
      "display": "HumanSignal/label-studio",
      "asOf": "2026-11-20"
    },
    "F242": {
      "label": "Project stargazers_count, django-environ",
      "display": "28.7K",
      "asOf": "2026-11-20"
    },
    "F243": {
      "label": "Library name, python-decouple",
      "display": "python-decouple",
      "asOf": "2026-11-20"
    },
    "F244": {
      "label": "Monthly downloads, python-decouple",
      "display": "7.3M",
      "asOf": "2026-11-20"
    },
    "F245": {
      "label": "License, python-decouple",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F246": {
      "label": "Package release, python-decouple",
      "display": "3.8",
      "asOf": "2026-11-20"
    },
    "F247": {
      "label": "Package release date, python-decouple",
      "display": "Mar 2023",
      "asOf": "2026-11-20"
    },
    "F248": {
      "label": "Install, python-decouple",
      "display": "python -m pip install python-decouple==3.8",
      "asOf": "2026-11-20"
    },
    "F249": {
      "label": "Quickstart, python-decouple",
      "display": "from decouple import config\n\nprint(config(\"DEBUG\", default=False, cast=bool))\n",
      "asOf": "2026-11-20"
    },
    "F250": {
      "label": "Dotenv file loader, python-decouple",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F251": {
      "label": "Nested configuration merge, python-decouple",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F252": {
      "label": "Application CLI overrides, python-decouple",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F253": {
      "label": "Documented interface and best-fit task, python-decouple",
      "display": "Small environment/INI/dotenv configuration reader with defaults and explicit casts; environment values take precedence. No native nested settings-object merge or command-line option parser.",
      "asOf": "2026-11-20"
    },
    "F254": {
      "label": "Project function, python-decouple",
      "display": "@shared_task(name=\"follow_send_payment\", time_limit=180, soft_time_limit=175)\ndef follow_send_payment(hash):\n    \"\"\"Sends sats to buyer, continuous update\"\"\"\n\n    from datetime import timedelta\n\n    from decouple import config\n    from django.utils import timezone\n\n    from api.lightning.node import LNNode\n    from api.models import LNPayment\n\n    if config(\"DEBUG_PERMISSIONED_PAYOUTS\", cast=bool, default=False):\n        return\n\n    lnpayment = LNPayment.objects.get(payment_hash=hash)\n    lnpayment.last_routing_time = timezone.now()\n    lnpayment.save(update_fields=[\"last_routing_time\"])\n\n    # Checked against the lightning node before every attempt; a payout that fails it\n    # is held (and retried in an hour) until the coordinator looks at it.\n    from api.logics import payout_problem\n\n    problem = payout_problem(lnpayment)\n    if problem:\n        print(f\"PAYOUT HELD {hash}: {problem}\", flush=True)\n        from api.models import Order\n\n        order = Order.objects.filter(payout=lnpayment).first()\n        if order and \"PAYOUT HELD\" not in (order.logs or \"\"):\n            order.log(f\"PAYOUT HELD: {problem}\", level=\"WARN\")\n        lnpayment.last_routing_time = timezone.now() + timedelta(hours=1)\n        lnpayment.save(update_fields=[\"last_routing_time\"])\n        return\n\n    # Default is 0ppm. Set by the user over API. Client's default is 1000 ppm.\n    fee_limit_sat = int(\n        float(lnpayment.num_satoshis) * float(lnpayment.routing_budget_ppm) / 1_000_000\n    )\n    timeout_seconds = config(\"PAYOUT_TIMEOUT_SECONDS\", cast=int, default=90)\n    try:\n        results = LNNode.follow_send_payment(lnpayment, fee_limit_sat, timeout_seconds)\n\n    except SoftTimeLimitExceeded:\n        # If the 175 seconds have been consumed without follow_send_payment()\n        # returning, we set the last routing time as 'in 10 minutes'\n        # so the next check happens in 10 minutes, instead of right now.\n        lnpayment.last_routing_time = timezone.now() + timedelta(minutes=10)\n        lnpayment.save(update_fields=[\"last_routing_time\"])\n        print(\n            f\"Order: {lnpayment.order_paid_LN.id} SOFT TIME LIMIT REACHED. Hash: {hash}\"\n        )\n        results = {}\n\n    return results",
      "asOf": "2026-11-20"
    },
    "F255": {
      "label": "Project source file, python-decouple",
      "display": "api/tasks.py",
      "asOf": "2026-11-20"
    },
    "F256": {
      "label": "Project full_name, python-decouple",
      "display": "RoboSats/robosats",
      "asOf": "2026-11-20"
    },
    "F257": {
      "label": "Project stargazers_count, python-decouple",
      "display": "1.0K",
      "asOf": "2026-11-20"
    }
  },
  "dataCheckedAt": "2026-11-20",
  "agent": {
    "exaCall": {
      "endpoint": "/search",
      "body": {
        "query": "Best Python configuration libraries Pydantic Settings Dynaconf OmegaConf python-decouple code examples",
        "numResults": 5
      },
      "docsUrl": "https://exa.ai/docs/reference/search"
    },
    "calls": []
  }
}
