Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Generate Python Mgmt SDK

Yuchao Yan edited this page Aug 21, 2023 · 3 revisions

Assume you have swagger PR for azure-rest-api-specs or azure-rest-api-specs-pr, this doc shows how to generate Python Mgmt SDK. Please make sure readme.md (here is sample readme.md) of your PR has added - repo: azure-sdk-for-python to swagger-to-sdk yaml section. And your PR must have readme.python.md (here is sample readme.python.md).

There are 2 ways to generate Mgmt SDK: online and local.

Online

With https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/private_package/get_private_package.md, you can get private package without any local work.

Local

If you want to generate SDK locally, follow the steps:

Prepare environment

generate code

Assume OpenApi repo and SDK repo are in folder D:\ and your service name is myservice, run:

D:\> autorest azure-rest-api-specs\specification\myservice\resource-manager\readme.md --python --python-sdks-folder=D:\dev\azure-sdk-for-python\sdk --use=@autorest/python@6.7.1 --use=@autorest/modelerfour@4.26.2 --version=3.9.7 --version-tolerant=False
Morty Proxy This is a proxified and sanitized view of the page, visit original site.