{"id":5317,"library":"meraki","title":"Meraki Dashboard API Python Library","description":"The Meraki Dashboard API Python library provides all current Meraki Dashboard API calls to interface with the Cisco Meraki cloud-managed platform. It handles error handling, logging, automatic retries for rate limits, and pagination. Generated from the OpenAPI specification, it aims to stay up-to-date with API releases. The library currently requires Python 3.10+ and is actively maintained with frequent updates.","status":"active","version":"2.2.0","language":"en","source_language":"en","source_url":"https://github.com/meraki/dashboard-api-python","tags":["network","meraki","cisco","api","dashboard","networking"],"install":[{"cmd":"pip install meraki","lang":"bash","label":"Install stable version"}],"dependencies":[{"reason":"Core HTTP client for synchronous API calls.","package":"requests","optional":false},{"reason":"Used internally for HTTP request utilities.","package":"requests-toolbelt","optional":false},{"reason":"HTTP client library, a dependency of 'requests'.","package":"urllib3","optional":false},{"reason":"HTTP client for asynchronous API calls (used by `meraki.aio`).","package":"httpx","optional":true}],"imports":[{"note":"The `from meraki import meraki` pattern was used in legacy v0.x.y versions of the library (0.34 and prior) and is no longer supported.","wrong":"from meraki import meraki","symbol":"DashboardAPI","correct":"import meraki\ndashboard = meraki.DashboardAPI()"},{"note":"For asynchronous operations, import from `meraki.aio`.","symbol":"AsyncDashboardAPI","correct":"import meraki.aio\nasync_dashboard = meraki.aio.AsyncDashboardAPI()"},{"note":"The `meraki_sdk` package is an older, deprecated client library and is not the current official Meraki Python library.","wrong":"from meraki_sdk.meraki_sdk_client import MerakiSdkClient","symbol":"MerakiSdkClient","correct":"import meraki\ndashboard = meraki.DashboardAPI()"}],"quickstart":{"code":"import os\nimport meraki\n\nAPI_KEY = os.environ.get('MERAKI_DASHBOARD_API_KEY', 'YOUR_API_KEY_HERE')\n\nif API_KEY == 'YOUR_API_KEY_HERE':\n    print(\"Warning: MERAKI_DASHBOARD_API_KEY not set. Using placeholder.\")\n\ntry:\n    dashboard = meraki.DashboardAPI(api_key=API_KEY, suppress_logging=True)\n    organizations = dashboard.organizations.getOrganizations()\n    \n    if organizations:\n        print(\"Successfully connected to Meraki Dashboard.\")\n        print(\"Organizations found:\")\n        for org in organizations:\n            print(f\"  - {org['name']} (ID: {org['id']})\")\n    else:\n        print(\"No organizations found or API key is invalid.\")\n\nexcept meraki.exceptions.APIError as e:\n    print(f\"Meraki API Error: {e}\")\nexcept Exception as e:\n    print(f\"An unexpected error occurred: {e}\")","lang":"python","description":"This quickstart initializes the Meraki Dashboard API client using an API key from an environment variable. It then fetches and prints the names and IDs of all organizations accessible with the provided API key. Ensure `MERAKI_DASHBOARD_API_KEY` is set in your environment."},"warnings":[{"fix":"Review the official Meraki Python Library documentation for updated method names and parameters, especially if migrating from versions prior to 2.0.0.","message":"Version 2.0.0 decoupled the library version from the API version, which included changes to operation IDs that were breaking for the library's method calls. This could require updates to existing scripts.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Upgrade to version 2.0.1 or a later stable release: `pip install --upgrade meraki`.","message":"Version 2.0.1 addressed a substantial issue (severity of #290) in the retry handler and user agent string. Users on version 2.0.0 should upgrade immediately to 2.0.1 or later to avoid potential request failures or incorrect behavior.","severity":"breaking","affected_versions":"2.0.0"},{"fix":"Upgrade to the latest stable version of the library (`pip install --upgrade meraki`) and update your import statements to `import meraki`.","message":"Versions of the library starting with `0.x.y` (e.g., 0.34) are end-of-life and are not supported or recommended. These legacy versions used a different import pattern (`from meraki import meraki`).","severity":"deprecated","affected_versions":"<1.0.0"},{"fix":"Always use environment variables (e.g., `MERAKI_DASHBOARD_API_KEY`) to store and access your API key. Do not commit API keys to version control. Be aware that a 404 response might indicate an authentication issue.","message":"Meraki API keys provide authentication to all organizations accessible by the associated Dashboard administrator account. Storing the API key directly in source code is insecure. Also, the Meraki API returns a 404 (Not Found) for a missing or incorrect API key, rather than a 403 (Forbidden), to prevent leaking information about resource existence.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Upgrade to version 2.0.0 or later to benefit from the fix for this pagination issue.","message":"Prior to version 2.0.0, the library could encounter a `KeyError` when paginating through API endpoints whose response payloads were JSON objects using the `items/meta` pattern.","severity":"gotcha","affected_versions":"<2.0.0"}],"env_vars":null,"last_verified":"2026-04-13T00:00:00.000Z","next_check":"2026-07-12T00:00:00.000Z"}