<?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 Script for All Networks in Network Platform API</title>
    <link>https://community.cisco.com/t5/network-platform-api/python-script-for-all-networks/m-p/5407092#M1433</link>
    <description>&lt;P&gt;I use openpyxl to create excel files, instructions and tutorial are here...&lt;/P&gt;&lt;P&gt;&lt;A href="https://openpyxl.readthedocs.io/en/stable/" target="_blank" rel="nofollow noopener noreferrer"&gt;https://openpyxl.readthedocs.io/en/stable/&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 14 Jun 2022 14:02:40 GMT</pubDate>
    <dc:creator>sungod</dc:creator>
    <dc:date>2022-06-14T14:02:40Z</dc:date>
    <item>
      <title>Python Script for All Networks</title>
      <link>https://community.cisco.com/t5/network-platform-api/python-script-for-all-networks/m-p/5407091#M1432</link>
      <description>&lt;P&gt;Does anyone know what they best way is to grab all of the networks in an organization and print or write them to an excel file all within a python script? &lt;/P&gt;&lt;P&gt;I am trying to grab a list of Network Names and their Network IDs and write them to a excel file to represent a dictionary key:value pair. &lt;/P&gt;&lt;P&gt;I can grab the Networks using the dashboard.organizations.getOrganizationNetworks(organization_id, total_pages='all') string, but I am having trouble sending this data to an excel file. &lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2022 13:57:01 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/python-script-for-all-networks/m-p/5407091#M1432</guid>
      <dc:creator>KRobert</dc:creator>
      <dc:date>2022-06-14T13:57:01Z</dc:date>
    </item>
    <item>
      <title>Re: Python Script for All Networks</title>
      <link>https://community.cisco.com/t5/network-platform-api/python-script-for-all-networks/m-p/5407092#M1433</link>
      <description>&lt;P&gt;I use openpyxl to create excel files, instructions and tutorial are here...&lt;/P&gt;&lt;P&gt;&lt;A href="https://openpyxl.readthedocs.io/en/stable/" target="_blank" rel="nofollow noopener noreferrer"&gt;https://openpyxl.readthedocs.io/en/stable/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2022 14:02:40 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/python-script-for-all-networks/m-p/5407092#M1433</guid>
      <dc:creator>sungod</dc:creator>
      <dc:date>2022-06-14T14:02:40Z</dc:date>
    </item>
    <item>
      <title>Re: Python Script for All Networks</title>
      <link>https://community.cisco.com/t5/network-platform-api/python-script-for-all-networks/m-p/5407093#M1434</link>
      <description>&lt;P&gt;Hello good sir, I recorded a video that explains exactly how to do this for the API course I made. Here's the link:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.youtube.com/watch?v=kfTtEUotXCI&amp;amp;t=125s&amp;amp;ab_channel=BoundlessDigital" target="_blank" rel="nofollow noopener noreferrer"&gt;https://www.youtube.com/watch?v=kfTtEUotXCI&amp;amp;t=125s&amp;amp;ab_channel=BoundlessDigital&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2022 17:08:24 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/python-script-for-all-networks/m-p/5407093#M1434</guid>
      <dc:creator>AutomationDude</dc:creator>
      <dc:date>2022-06-14T17:08:24Z</dc:date>
    </item>
    <item>
      <title>Re: Python Script for All Networks</title>
      <link>https://community.cisco.com/t5/network-platform-api/python-script-for-all-networks/m-p/5407094#M1435</link>
      <description>&lt;P&gt;Hey &lt;A href="https://community.meraki.com/t5/user/viewprofilepage/user-id/54907"&gt;@AutomationDude&lt;/A&gt; That was what I was looking for! Thank you. Now any idea on what script I can write to read the file? I am trying to create a program that allows you to input a Network Name and correlate the network name to it's Network ID in a dictionary Key:Value pair. Once the program has the Network ID, it can start making changes to the network. In the csv that was created, I need the program to understand that a user input (Key) should equal Column C (Name) and the program should print the Network ID as the value, Column A. &lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2022 18:02:25 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/python-script-for-all-networks/m-p/5407094#M1435</guid>
      <dc:creator>KRobert</dc:creator>
      <dc:date>2022-06-14T18:02:25Z</dc:date>
    </item>
    <item>
      <title>Re: Python Script for All Networks</title>
      <link>https://community.cisco.com/t5/network-platform-api/python-script-for-all-networks/m-p/5407095#M1436</link>
      <description>&lt;P&gt;Hey &lt;A href="https://community.meraki.com/t5/user/viewprofilepage/user-id/11437"&gt;@KRobert1&lt;/A&gt;, you're welcome!&lt;/P&gt;&lt;P&gt;I've never written anything for exactly what you described but did have this video that creates new networks from a csv file:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.youtube.com/watch?v=Jbb3sxcxQ0A&amp;amp;t=312s&amp;amp;ab_channel=BoundlessDigital" target="_blank" rel="nofollow noopener noreferrer"&gt;https://www.youtube.com/watch?v=Jbb3sxcxQ0A&amp;amp;t=312s&amp;amp;ab_channel=BoundlessDigital&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I'm guessing you were having some trouble working with variables that were read from the csv so this should hopefully give you some insights that move you in the right direction. Best of luck!&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2022 10:27:40 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/python-script-for-all-networks/m-p/5407095#M1436</guid>
      <dc:creator>AutomationDude</dc:creator>
      <dc:date>2022-06-15T10:27:40Z</dc:date>
    </item>
    <item>
      <title>Re: Python Script for All Networks</title>
      <link>https://community.cisco.com/t5/network-platform-api/python-script-for-all-networks/m-p/5407096#M1437</link>
      <description>&lt;P&gt;&lt;A href="https://community.meraki.com/t5/user/viewprofilepage/user-id/54907"&gt;@AutomationDude&lt;/A&gt; we are getting closer! With the following, I am able to print the "name" and "id" field of the network list csv. This narrows the data to just those two fields, which I need for the script. &lt;/P&gt;&lt;PRE class="lia-code-sample language-python"&gt;&lt;CODE&gt;with open('networks.csv', 'w') as new_file:
    csv_writer = csv.DictWriter(new_file, Networks[0].keys())
    csv_writer.writeheader()
    csv_writer.writerows(Networks)


with open('networks.csv', 'r') as read_file:
    csv_reader = csv.DictReader(read_file)
    for line in csv_reader:
        print(line['name'],line['id'])&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Now I need to find a way to correlate the data so that when a user input types 'name', it prints 'id'.&lt;/P&gt;&lt;P&gt;Any ideas on how to do that? &lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 16:37:26 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/python-script-for-all-networks/m-p/5407096#M1437</guid>
      <dc:creator>KRobert</dc:creator>
      <dc:date>2022-06-16T16:37:26Z</dc:date>
    </item>
    <item>
      <title>Re: Python Script for All Networks</title>
      <link>https://community.cisco.com/t5/network-platform-api/python-script-for-all-networks/m-p/5407097#M1438</link>
      <description>&lt;P&gt;Hmm, not sure what you're missing here since you've got all the data. Could you try rephrasing the use case or the issue?&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2022 12:52:17 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/python-script-for-all-networks/m-p/5407097#M1438</guid>
      <dc:creator>AutomationDude</dc:creator>
      <dc:date>2022-06-17T12:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: Python Script for All Networks</title>
      <link>https://community.cisco.com/t5/network-platform-api/python-script-for-all-networks/m-p/5407098#M1439</link>
      <description>&lt;P&gt;A user is supposed to input data. When the user inputs a network name, let's just say "Test123" the program then takes the name "Test 123" and checks the list of network names in the csv. If it finds "Test123" in the csv, it prints the corresponding network id for Test123. My goal is to rather than print the network id, save it as a variable to use later in the script &lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2022 12:59:24 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/python-script-for-all-networks/m-p/5407098#M1439</guid>
      <dc:creator>KRobert</dc:creator>
      <dc:date>2022-06-17T12:59:24Z</dc:date>
    </item>
    <item>
      <title>Re: Python Script for All Networks</title>
      <link>https://community.cisco.com/t5/network-platform-api/python-script-for-all-networks/m-p/5407099#M1440</link>
      <description>&lt;P&gt;&lt;A href="https://community.meraki.com/t5/user/viewprofilepage/user-id/54907"&gt;@AutomationDude&lt;/A&gt; I published a clean version to my GitHub. It is a framework, but I am trying to replace the Dictionary Steps with the CSV setup you helped me with. &lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/routercuriosity/MerakiNetworkUpdater" target="_blank" rel="nofollow noopener noreferrer"&gt;https://github.com/routercuriosity/MerakiNetworkUpdater&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jun 2022 16:09:23 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/python-script-for-all-networks/m-p/5407099#M1440</guid>
      <dc:creator>KRobert</dc:creator>
      <dc:date>2022-06-20T16:09:23Z</dc:date>
    </item>
    <item>
      <title>Re: Python Script for All Networks</title>
      <link>https://community.cisco.com/t5/network-platform-api/python-script-for-all-networks/m-p/5407100#M1441</link>
      <description>&lt;P&gt;&lt;A href="https://community.meraki.com/t5/user/viewprofilepage/user-id/11437"&gt;@KRobert1&lt;/A&gt; Try this script &lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/NesAlba21/Meraki_Tshoot" target="_blank" rel="nofollow noopener noreferrer"&gt;https://github.com/NesAlba21/Meraki_Tshoot&lt;/A&gt;&lt;/P&gt;&lt;P&gt; I think this is what you are looking for&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jun 2022 15:32:25 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/python-script-for-all-networks/m-p/5407100#M1441</guid>
      <dc:creator>nalbacas</dc:creator>
      <dc:date>2022-06-24T15:32:25Z</dc:date>
    </item>
  </channel>
</rss>

