Skip to content

Clients

MerakiClient

Client class for the Meraki dashboard API.

Parameters:

  • api_key (str | None, default: None ) –

    API key generated in dashboard; can also be set as an environment variable MERAKI_DASHBOARD_API_KEY.

  • base_url (BaseURL, default: DEFAULT ) –

    Base URL preceding all endpoint resources.

  • single_request_timeout (int, default: 30 ) –

    Maximum number of seconds for each API call. Defaults to 30.

  • total_request_timeout (int, default: 60 ) –

    Total time in seconds to wait for a request to complete including retries. Defaults to 60.

  • certificate_path (str | None, default: None ) –

    Path for TLS/SSL certificate verification if behind local proxy.

  • requests_proxy (str | None, default: None ) –

    Proxy server and port, if needed, for HTTPS.

  • wait_on_rate_limit (bool, default: True ) –

    Retry if 429 rate limit error encountered? Defaults to True.

  • maximum_retries (int, default: 2 ) –

    Retry up to this many times when encountering 429s or other server-side errors. Defaults to 2.

  • caller (str | None, default: None ) –

    Optional identifier for API usage tracking; can also be set as an environment variable MERAKI_PYTHON_SDK_CALLER.

AsyncMerakiClient

Asynchronous client class for the Meraki dashboard API.

Parameters:

  • api_key (str | None, default: None ) –

    API key generated in dashboard; can also be set as an environment variable MERAKI_DASHBOARD_API_KEY.

  • base_url (BaseURL, default: DEFAULT ) –

    Base URL preceding all endpoint resources.

  • single_request_timeout (int, default: 30 ) –

    Maximum number of seconds for each API call. Defaults to 30.

  • total_request_timeout (int, default: 60 ) –

    Total time in seconds to wait for a request to complete including retries. Defaults to 60.

  • certificate_path (str | None, default: None ) –

    Path for TLS/SSL certificate verification if behind local proxy.

  • requests_proxy (str | None, default: None ) –

    Proxy server and port, if needed, for HTTPS.

  • wait_on_rate_limit (bool, default: True ) –

    Retry if 429 rate limit error encountered? Defaults to True.

  • maximum_retries (int, default: 2 ) –

    Retry up to this many times when encountering 429s or other server-side errors. Defaults to 2.

  • caller (str | None, default: None ) –

    Optional identifier for API usage tracking; can also be set as an environment variable MERAKI_PYTHON_SDK_CALLER.

  • maximum_concurrent_requests (int, default: 8 ) –

    Number of concurrent API requests. Defaults to 8.

Pagination

PaginatedResponse

Bases: Iterator[T], Generic[T]

Lazy paginated response that can be iterated or collected.

Attributes:

  • meta (dict[str, Any] | None) –

    Metadata from the most recently fetched page, when present.

  • meta_pages (list[dict[str, Any]]) –

    Metadata from all fetched pages in order.

collect

Collect all remaining items into a list.

Configuration

BaseURL

Bases: StrEnum

Base URL for the Meraki dashboard API.

CANADA = 'https://api.meraki.ca/api/v1' class-attribute instance-attribute

CHINA = 'https://api.meraki.cn/api/v1' class-attribute instance-attribute

DEFAULT = 'https://api.meraki.com/api/v1' class-attribute instance-attribute

INDIA = 'https://api.meraki.in/api/v1' class-attribute instance-attribute

US_FEDRAMP = 'https://api.gov-meraki.com/api/v1' class-attribute instance-attribute