<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Setting and using variables in Python Extension in Extensions</title>
    <link>https://community.dynatrace.com/t5/Extensions/Setting-and-using-variables-in-Python-Extension/m-p/296777#M7158</link>
    <description>&lt;P&gt;Does anyone knows how to retrive a value of a variable set on "extension.yaml" inside a Python Code ?&lt;/P&gt;&lt;P&gt;I was able to get the values from activation configuration using "&lt;SPAN&gt;self&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;activation_config", but I´m not able to retrieve a value from the section "vars" in extension.yaml.&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;vars:
  - id: environment
    displayName: Environment
    type: enum
    availableValues:
      - value: prod
        displayName: Production
      - value: uat
        displayName: UAT
      - value: dev
        displayName: Development
    description: Environment to monitor (e.g. production, staging)
    defaultValue: "dev"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 26 Mar 2026 20:39:44 GMT</pubDate>
    <dc:creator>lfoltran</dc:creator>
    <dc:date>2026-03-26T20:39:44Z</dc:date>
    <item>
      <title>Setting and using variables in Python Extension</title>
      <link>https://community.dynatrace.com/t5/Extensions/Setting-and-using-variables-in-Python-Extension/m-p/296777#M7158</link>
      <description>&lt;P&gt;Does anyone knows how to retrive a value of a variable set on "extension.yaml" inside a Python Code ?&lt;/P&gt;&lt;P&gt;I was able to get the values from activation configuration using "&lt;SPAN&gt;self&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;activation_config", but I´m not able to retrieve a value from the section "vars" in extension.yaml.&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;vars:
  - id: environment
    displayName: Environment
    type: enum
    availableValues:
      - value: prod
        displayName: Production
      - value: uat
        displayName: UAT
      - value: dev
        displayName: Development
    description: Environment to monitor (e.g. production, staging)
    defaultValue: "dev"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Mar 2026 20:39:44 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/Setting-and-using-variables-in-Python-Extension/m-p/296777#M7158</guid>
      <dc:creator>lfoltran</dc:creator>
      <dc:date>2026-03-26T20:39:44Z</dc:date>
    </item>
    <item>
      <title>Re: Setting and using variables in Python Extension</title>
      <link>https://community.dynatrace.com/t5/Extensions/Setting-and-using-variables-in-Python-Extension/m-p/297296#M7178</link>
      <description>&lt;P&gt;you can check this reply it has a rich example&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.dynatrace.com/t5/Extensions/Extensions-2-0-Is-there-detailed-documentation-on-the/m-p/248226/highlight/true#M4594" target="_blank"&gt;https://community.dynatrace.com/t5/Extensions/Extensions-2-0-Is-there-detailed-documentation-on-the/m-p/248226/highlight/true#M4594&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Apr 2026 10:37:15 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/Setting-and-using-variables-in-Python-Extension/m-p/297296#M7178</guid>
      <dc:creator>MostafaHussein</dc:creator>
      <dc:date>2026-04-06T10:37:15Z</dc:date>
    </item>
  </channel>
</rss>

