Service Fabric Yaml Merge Utility
raw JSON → 0.1.6 verified Sat May 09 auth: no python
A utility for merging Service Fabric YAML configuration files, part of the Azure CLI extensions. Currently at version 0.1.6, with low release cadence.
pip install sfmergeutility Common errors
error ImportError: cannot import name 'merge_yaml' from 'sfmergeutility' ↓
cause merge_yaml is not imported correctly due to package version mismatch or incorrect installation.
fix
Ensure you have installed the correct version: pip install sfmergeutility==0.1.6
error AttributeError: module 'sfmergeutility' has no attribute 'merge_yaml' ↓
cause Using an older version of the package that did not expose merge_yaml at package level.
fix
Upgrade to version 0.1.6: pip install --upgrade sfmergeutility
Warnings
deprecated The package is part of azure-cli-extensions and may be deprecated in favor of native ARM template or Bicep deployments. ↓
fix Consider migrating to Azure Resource Manager templates or Bicep for Service Fabric deployments.
gotcha merge_yaml performs deep merge but lists are overwritten, not concatenated. ↓
fix If you need to merge lists, handle them manually before calling merge_yaml.
Imports
- merge_yaml wrong
from sfmergeutility.utils import merge_yamlcorrectfrom sfmergeutility import merge_yaml
Quickstart
from sfmergeutility import merge_yaml
base = {'service': {'name': 'myapp'}}
override = {'service': {'replicas': 3}}
result = merge_yaml(base, override)
print(result)