<?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: Meraki Python SDK in Network Platform API</title>
    <link>https://community.cisco.com/t5/network-platform-api/meraki-python-sdk/m-p/5418655#M3101</link>
    <description>&lt;P&gt;SDK test.py now running whitout error after putting the testsdk.py on the same level as teh meraki folder.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MerakiSDK01.PNG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image.png"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/262094i81FDD11CC026169B/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 10 May 2019 14:58:08 GMT</pubDate>
    <dc:creator>adamba</dc:creator>
    <dc:date>2019-05-10T14:58:08Z</dc:date>
    <item>
      <title>Meraki Python SDK</title>
      <link>https://community.cisco.com/t5/network-platform-api/meraki-python-sdk/m-p/5418652#M3098</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm trying ti use Python SDK for Meraki configuration, but untill now without success. My Python configuration is done as the instruction in this link " &lt;A href="https://github.com/meraki/meraki-python-sdk#admins_controller" target="_blank" rel="noopener nofollow noreferrer"&gt;https://github.com/meraki/meraki-python-sdk#admins_controller&lt;/A&gt; ". My IDE is Visual Code Studio.&lt;/P&gt;&lt;P&gt;I also successfull tested the installation after the installation as:&lt;/P&gt;&lt;P&gt;E:\Python\Python37\meraki-python-sdk-master&amp;gt;&lt;STRONG&gt;nosetests&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;----------------------------------------------------------------------&lt;BR /&gt;Ran 0 tests in 0.141s&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;OK&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;All four folders have python file, but can some explain to me where to start, which python file in which folder should I use. ( see screenshot)&lt;BR /&gt;&lt;BR /&gt;I'm not a programmer, but I want to learn how to use those python API files. I also went  through lots of Meraki document without success.&lt;/P&gt;&lt;P&gt;Thank you.&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VsCode.PNG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image.png"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/262092i4AA49A064CAA0244/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 May 2019 12:54:15 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/meraki-python-sdk/m-p/5418652#M3098</guid>
      <dc:creator>adamba</dc:creator>
      <dc:date>2019-05-09T12:54:15Z</dc:date>
    </item>
    <item>
      <title>Re: Meraki Python SDK</title>
      <link>https://community.cisco.com/t5/network-platform-api/meraki-python-sdk/m-p/5418653#M3099</link>
      <description>&lt;P&gt;You have to import the meraki.py file and from there import "Meraki"&lt;/P&gt;&lt;P&gt;so if your Project File is not in same folder like the example in the image below then you would have to point to folder to file and then Meraki Ass follows:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class="pl-k"&gt;from&lt;/SPAN&gt; meraki.meraki &lt;SPAN class="pl-k"&gt;import&lt;/SPAN&gt; Meraki&lt;/PRE&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tempsnip.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image.png"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/262096i801C4F55CFE5C0B6/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt; Notice how my test.py script is not in the same folder as meraky.py. If it is in the same folder then use:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class="pl-k"&gt;from&lt;/SPAN&gt; meraki &lt;SPAN class="pl-k"&gt;import&lt;/SPAN&gt; Meraki&lt;/PRE&gt;&lt;P&gt; Try running just the import, when you run it you shouldn't get any errors, then it means it succeeded. You can then start playing with the functions in the SDK kit.&lt;/P&gt;</description>
      <pubDate>Thu, 09 May 2019 16:48:14 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/meraki-python-sdk/m-p/5418653#M3099</guid>
      <dc:creator>rgm</dc:creator>
      <dc:date>2019-05-09T16:48:14Z</dc:date>
    </item>
    <item>
      <title>Re: Meraki Python SDK</title>
      <link>https://community.cisco.com/t5/network-platform-api/meraki-python-sdk/m-p/5418654#M3100</link>
      <description>&lt;P&gt;Thank you RubenG.&lt;/P&gt;&lt;P&gt;Test script and meraki.py are in de same folder, but still get the error message shown below.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MerakiSDK.PNG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image.png"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/262095iE087ED8654DBE5CB/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2019 08:44:57 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/meraki-python-sdk/m-p/5418654#M3100</guid>
      <dc:creator>adamba</dc:creator>
      <dc:date>2019-05-10T08:44:57Z</dc:date>
    </item>
    <item>
      <title>Re: Meraki Python SDK</title>
      <link>https://community.cisco.com/t5/network-platform-api/meraki-python-sdk/m-p/5418655#M3101</link>
      <description>&lt;P&gt;SDK test.py now running whitout error after putting the testsdk.py on the same level as teh meraki folder.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MerakiSDK01.PNG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image.png"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/262094i81FDD11CC026169B/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2019 14:58:08 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/meraki-python-sdk/m-p/5418655#M3101</guid>
      <dc:creator>adamba</dc:creator>
      <dc:date>2019-05-10T14:58:08Z</dc:date>
    </item>
    <item>
      <title>Re: Meraki Python SDK</title>
      <link>https://community.cisco.com/t5/network-platform-api/meraki-python-sdk/m-p/5418656#M3102</link>
      <description>&lt;P&gt;Ok, the issue is that you can't have your script in the same folder as meraki.py.&lt;/P&gt;&lt;P&gt;I took a look at the code and the reason it failed the first time when you put it in the same folder as meraki.py is that the code assumes the remainder of the modules are under the meraki folder. &lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2019-05-13 at 1.23.31 PM.png" style="width: 770px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image.png"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/262097i7B2DAF6925B44AB3/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;By running your script on the same folder as meraki.py file then that means you are in the meraki folder and therefore the path of the script starts there. So you would have to change the path in order for it to work, because it references the folder it is in. Or you can just run it outside the folder. (I would recommend this so you don't have to change anything in the modules). That is why it failed and you get the error "No module named 'meraki.decorators'".&lt;/P&gt;&lt;P&gt;Apologies, oversight on my part.&lt;/P&gt;&lt;P&gt;Another thing I noticed when it did work for you, you are importing the file "meraki.py". What you really want to import is the Class object "Meraki" it is case sensitive. &lt;/P&gt;&lt;P&gt;So you have to import it as:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class="pl-k"&gt;from&lt;/SPAN&gt; meraki.meraki &lt;SPAN class="pl-k"&gt;import&lt;/SPAN&gt; Meraki&lt;/PRE&gt;&lt;P&gt;the first meraki tells the folder, the second tells the File name, the import functions states that it wants to import something from the file. And the "Meraki" states what you want to import.&lt;/P&gt;&lt;P&gt;Try running this in your testsdk.py:&lt;/P&gt;&lt;PRE&gt;from meraki import meraki&lt;BR /&gt;
x_cisco_meraki_api_key = 'x_cisco_meraki_api_key' ##CHANGE this to your Meraki API key
client = Meraki(x_cisco_meraki_api_key)
organization_id = 'organizationId' ##CHANGE this to an OrganizationID you are using to test
admins_controller = client.admins
result = admins_controller.get_organization_admins(organization_id)
print (result)
##You will see the admins of the Organization printed in a Dictionary format.&lt;/PRE&gt;&lt;P&gt;It will fail because the import is not correct. In order to utilize it in your "testsdk.py" script you will have to change the following line&lt;/P&gt;&lt;PRE&gt;client = Meraki(x_cisco_meraki_api_key)&lt;/PRE&gt;&lt;P&gt;to &lt;/P&gt;&lt;PRE&gt;client = meraki.Meraki(x_cisco_meraki_api_key)&lt;/PRE&gt;&lt;P&gt;since you need to call the Class Object in that file in order to create this variable. And anytime you utilize it you will have to call it with "meraki." leading that call. As shown above. &lt;/P&gt;&lt;P&gt;it is easier if you just use the following to import:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class="pl-k"&gt;from&lt;/SPAN&gt; meraki.meraki &lt;SPAN class="pl-k"&gt;import&lt;/SPAN&gt; Meraki&lt;/PRE&gt;&lt;P&gt;so you don't have to call "meraki.Meraki" every time you call the Meraki object. It is a matter of preference. &lt;/P&gt;&lt;P&gt;Try the following with the corrected import:&lt;/P&gt;&lt;PRE&gt;from meraki.meraki import Meraki

x_cisco_meraki_api_key = 'x_cisco_meraki_api_key' ##CHANGE this to your Meraki API key
client = Meraki(x_cisco_meraki_api_key)
organization_id = 'organizationId' ##CHANGE this to an OrganizationID you are using to test
admins_controller = client.admins
result = admins_controller.get_organization_admins(organization_id)
print (result)
##You will see the admins of the Organization in a Dictionary format.&lt;/PRE&gt;&lt;P&gt;You will see the admins of the organization.&lt;/P&gt;&lt;P&gt;It'll be easier getting the "organizationId" from postman.&lt;/P&gt;&lt;P&gt;Let me know if you have any other questions, sorry for the error earlier. I didnt realize the imports assumed it was being called from a different folder.&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2019 21:12:08 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/meraki-python-sdk/m-p/5418656#M3102</guid>
      <dc:creator>rgm</dc:creator>
      <dc:date>2019-05-13T21:12:08Z</dc:date>
    </item>
  </channel>
</rss>

