The `azure-servicefabric` library provides a client for programmatically interacting directly with Microsoft Azure Service Fabric clusters using Python. It allows for management of applications, services, nodes, and other cluster resources. This library is part of the older Azure SDK for Python (Track 1) and was last updated in April 2021. It is currently in maintenance mode, receiving critical bug fixes but not active feature development.
pip install azure-servicefabricVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to initialize the `ServiceFabricClient` and connect to a secure Service Fabric cluster using client certificates, then list the nodes. Ensure you have the cluster endpoint, client certificate (.pem) and private key (.key) files accessible and their paths set in environment variables.
Refer to the `msrest` and `azure-servicefabric` documentation for `ServiceFabricCredential` and certificate setup. Ensure certificates are in the correct format (e.g., .pem, .key).
For direct cluster API interactions, `azure-servicefabric` is still functional. For ARM-level management (creating/updating clusters), use `pip install azure-mgmt-servicefabric` and the newer client. Differentiate between cluster management plane (ARM) and cluster runtime interactions (this library).
Design your application to handle synchronous I/O or wrap calls in a separate thread/process if non-blocking behavior is required.