If you are using the Meraki Python library, using AsyncIO will generally speed things up significantly, for 1,000 calls I'd expect it to complete in just a few minutes - current API rate limit is 10 calls/second.
I cut/pasted chunks of some scripts to give an outline...
import meraki.aio
import asyncio
import sys
#####import whatever else is needed
#get your api key and org id from wherever you keep them
ORG_ID = ...
API_KEY = ...
# this is a function to get the firmware info for a network and output it
async def processNetwork(aiomeraki: meraki.aio.AsyncDashboardAPI, net):
#blah blah blah, see example on github, something like this...
#you probably need to add logic to skip SM networks as I think the endpoint will not be there
try:
info = await aiomeraki.networks.getNetworkFirmwareUpgrades(net['id'])
except meraki.AsyncAPIError as e:
print(f'pn Meraki API error: {e}', file=sys.stderr)
sys.exit(0)
except Exception as e:
print(f'pn some other error: {e}', file=sys.stderr)
sys.exit(0)
else:
#process info and output
async def main():
async with meraki.aio.AsyncDashboardAPI(
api_key=API_KEY,
base_url='https://api.meraki.com/api/v1/',
print_console=False,
output_log=False,
suppress_logging=True,
wait_on_rate_limit=True,
maximum_retries=100,
aio_maximum_concurrent_requests=10
) as aiomeraki:
# get list of networks in the target organization
try:
networks = await aiomeraki.organizations.getOrganizationNetworks(ORG_ID, perPage=1000, total_pages="all")
except meraki.AsyncAPIError as e:
print(f'script Meraki API error: {e}', file=sys.stderr)
sys.exit(0)
except Exception as e:
print(f'script some other error: {e}', file=sys.stderr)
sys.exit(0)
#then pass the list to your function, processing networks concurrently
networkTasks = [processNetwork(aiomeraki, net) for net in networks]
for task in asyncio.as_completed(networkTasks):
await task
sys.exit(0)
if __name__ == '__main__':
asyncio.run(main())
See readme and example etc. on github https://github.com/meraki/dashboard-api-python/blob/main/README.md