Python SDK
Install and start using the Python SDK.
Intro
The Mist API SDK provides access to the Mist API REST APIs.
Version: 2610.1.0
Date: October 1, 2026
Some important API changes will be introduced. Please make sure to read the announcements
Additional Documentation
Helpful Resources
- API Sandbox and Exercises
- Postman Collection, Runners and Webhook Samples
- Python Script Examples
- API Demo Apps
- Juniper Blog
Mist Web Browser Extension:
- Google Chrome, Microsoft Edge and other Chromium-based browser: Chrome Web Store
- Firefox: Firefox Add-ons
Installation
Add the SDK to your project from its folder, with whichever package manager your project uses. Give each tool a path containing a slash, such as ../mist-api — a bare folder name is looked up on PyPI instead, and resolves to whatever project holds that name there:
pip install <path-to-sdk>uv add <path-to-sdk>poetry add <path-to-sdk>Quick Start
Synchronous client
Construct MistApiClient with keyword arguments, and call close() when you are done. Every argument is optional.
from mist_api import MistApiClient
client = MistApiClient(api_token="YOUR_API_KEY", csrf_token="YOUR_API_KEY", environment="mist_global_01")
client.close()Alternatively, scope it — with MistApiClient(...) as client: closes the pool on exit.
Asynchronous client
AsyncMistApiClient mirrors MistApiClient with identical method names, and every endpoint method is a coroutine. It takes the same arguments, with some differences — for example, the transport argument is custom_async_http_client.
from asyncio import run
from mist_api import AsyncMistApiClient
async def main() -> None:
client = AsyncMistApiClient(api_token="YOUR_API_KEY", csrf_token="YOUR_API_KEY", environment="mist_global_01")
await client.aclose()
run(main())Alternatively, scope it — async with AsyncMistApiClient(...) as client: closes the pool on exit.