<?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 Re: Python extensions 2.0 migration in Extensions</title>
    <link>https://community.dynatrace.com/t5/Extensions/Python-extensions-2-0-migration/m-p/270434#M5956</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;any recommendations?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 04 Mar 2025 14:42:46 GMT</pubDate>
    <dc:creator>Eyad</dc:creator>
    <dc:date>2025-03-04T14:42:46Z</dc:date>
    <item>
      <title>Python extensions 2.0 migration</title>
      <link>https://community.dynatrace.com/t5/Extensions/Python-extensions-2-0-migration/m-p/270346#M5950</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;I am new to Python extensions and am currently working on a &lt;STRONG&gt;2.0 migration&lt;/STRONG&gt;. I am facing some issues and would like to identify the root cause of the problem.&lt;/P&gt;&lt;H3&gt;&lt;STRONG&gt;My Setup:&lt;/STRONG&gt;&lt;/H3&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;IDE&lt;/STRONG&gt;: VS Code&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Local Environment&lt;/STRONG&gt;: Windows with Python 3.10&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Deployment Environment&lt;/STRONG&gt;: Linux (Ubuntu 20.04.2) with Python 3.8&lt;/LI&gt;&lt;/UL&gt;&lt;H3&gt;&lt;STRONG&gt;Issue:&lt;/STRONG&gt;&lt;/H3&gt;&lt;P&gt;I am mainly encountering dependency issues, such as missing modules or the following error:&lt;BR /&gt;&lt;SPAN class=""&gt;ModuleNotFoundError:&lt;/SPAN&gt; No &lt;SPAN class=""&gt;module&lt;/SPAN&gt; named &lt;SPAN class=""&gt;'pymssql._pymssql' # this was in the pytho3_fastcheck.log&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;In the &lt;STRONG&gt;1.0 version&lt;/STRONG&gt;, my team was including dependencies in the plugin.json file. like this&amp;nbsp;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2025-02-18 094758.png" style="width: 553px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/26477i3D637EFDF821A84B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2025-02-18 094758.png" alt="Screenshot 2025-02-18 094758.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Can I include install_ requires in &lt;STRONG&gt;2.0 or can i have requirements.txt then from the Linux i install the libs where my Ext folder will be located in the VM&lt;/STRONG&gt;, and where should it be? Also, do I need to install Linux on my machine? Will Python 3.8 work with the &lt;STRONG&gt;2.0 extension&lt;/STRONG&gt;?&lt;/P&gt;&lt;P&gt;any direction will be helpful. Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2025 14:57:52 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/Python-extensions-2-0-migration/m-p/270346#M5950</guid>
      <dc:creator>Eyad</dc:creator>
      <dc:date>2025-02-18T14:57:52Z</dc:date>
    </item>
    <item>
      <title>Re: Python extensions 2.0 migration</title>
      <link>https://community.dynatrace.com/t5/Extensions/Python-extensions-2-0-migration/m-p/270351#M5951</link>
      <description>&lt;P&gt;The new extension package contains a setup.py file which contains this dependencies field, add them here.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;% tail sample_extension/setup.py
setup(name="sample_extension",
      version=find_version(),
      description="Sample_extension python EF2 extension",
      author="Dynatrace",
      packages=find_packages(),
      python_requires="&amp;gt;=3.10",
      include_package_data=True,
      install_requires=["dt-extensions-sdk"],
      extras_require={"dev": ["dt-extensions-sdk[cli]"]},
      )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Also in case you haven't done already when building extension from windows to *nix systems follow this guide to build for cross platform&amp;nbsp;&lt;A href="https://dynatrace-extensions.github.io/dt-extensions-python-sdk/guides/building.html#native-dependencies" target="_blank"&gt;https://dynatrace-extensions.github.io/dt-extensions-python-sdk/guides/building.html#native-dependencies&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2025 15:22:19 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/Python-extensions-2-0-migration/m-p/270351#M5951</guid>
      <dc:creator>mark_bley</dc:creator>
      <dc:date>2025-02-18T15:22:19Z</dc:date>
    </item>
    <item>
      <title>Re: Python extensions 2.0 migration</title>
      <link>https://community.dynatrace.com/t5/Extensions/Python-extensions-2-0-migration/m-p/270434#M5956</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;any recommendations?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Mar 2025 14:42:46 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/Python-extensions-2-0-migration/m-p/270434#M5956</guid>
      <dc:creator>Eyad</dc:creator>
      <dc:date>2025-03-04T14:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: Python extensions 2.0 migration</title>
      <link>https://community.dynatrace.com/t5/Extensions/Python-extensions-2-0-migration/m-p/270437#M5957</link>
      <description>&lt;P&gt;If you want to include a function from another python file you can do it like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;% head __main__.py
from dynatrace_extension import Extension, Status, StatusValue

import datetime
import croniter

from .templates import get_mz_template&lt;/LI-CODE&gt;&lt;P&gt;and the folder/file structure should look like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;% tree ./
./
├── __init__.py
├── __main__.py
└── templates.py&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;(adapt the paths to your needs, this is just an example and not intended to be a best practice)&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2025 14:54:56 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/Python-extensions-2-0-migration/m-p/270437#M5957</guid>
      <dc:creator>mark_bley</dc:creator>
      <dc:date>2025-02-19T14:54:56Z</dc:date>
    </item>
    <item>
      <title>Re: Python extensions 2.0 migration</title>
      <link>https://community.dynatrace.com/t5/Extensions/Python-extensions-2-0-migration/m-p/270445#M5958</link>
      <description>&lt;P&gt;I am still getting an error message ..&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;my code&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;from&lt;/SPAN&gt;&lt;SPAN&gt; .&lt;/SPAN&gt;&lt;SPAN&gt;iam_dynatrace_ad_service_user_keys&lt;/SPAN&gt; &lt;SPAN&gt;import&lt;/SPAN&gt;&lt;SPAN&gt; iam_dynatrace_ad_service_user_keys&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;from&lt;/SPAN&gt;&lt;SPAN&gt; .&lt;/SPAN&gt;&lt;SPAN&gt;iam_dynatrace_api_rest_client&lt;/SPAN&gt; &lt;SPAN&gt;import&lt;/SPAN&gt;&lt;SPAN&gt; iam_dynatrace_rest_client&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;cannot import name 'iam_dynatrace_ad_service_user_keys' from 'iam_ad_status_check.iam_dynatrace_ad_service_user_keys' (/var/lib/dynatrace/remotepluginmodule/agent/runtime/extensions/python_venvs/custom_iam-ad-status-check_0.0.5/lib/python3.10/site-packages/iam_ad_status_check/iam_dynatrace_ad_service_user_keys.py)&lt;/P&gt;</description>
      <pubDate>Tue, 04 Mar 2025 14:41:45 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/Python-extensions-2-0-migration/m-p/270445#M5958</guid>
      <dc:creator>Eyad</dc:creator>
      <dc:date>2025-03-04T14:41:45Z</dc:date>
    </item>
    <item>
      <title>Re: Python extensions 2.0 migration</title>
      <link>https://community.dynatrace.com/t5/Extensions/Python-extensions-2-0-migration/m-p/270465#M5959</link>
      <description>&lt;P&gt;In my example I was just importing a function.&lt;/P&gt;&lt;P&gt;Please review some python documentation on how to import function or classes e.g.:&amp;nbsp;&lt;A href="https://stackoverflow.com/questions/4383571/importing-files-from-different-folder" target="_blank"&gt;https://stackoverflow.com/questions/4383571/importing-files-from-different-folder&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Also try a dt-sdk run &amp;lt;extension_name&amp;gt; to test the extension locally.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2025 18:32:37 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/Python-extensions-2-0-migration/m-p/270465#M5959</guid>
      <dc:creator>mark_bley</dc:creator>
      <dc:date>2025-02-19T18:32:37Z</dc:date>
    </item>
  </channel>
</rss>

