Страница:
Generate Python Mgmt SDK
Страницы
Auto Release Pipeline
Azure SDKs Python version support policy
Azure packaging
Common issues about Python SDK
Contributing to the tests
Dataplane Codegen Quick Start For Swagger
Dataplane Codegen Quick Start for Test
Dataplane Codegen Quick Start with tools
Dataplane Codegen Quick Start
Direct access to "models" is deprecated
Generate Python Mgmt SDK from Typespec
Generate Python Mgmt SDK
Generate Swagger and TypeSpec in Package
Generate a Python SDK from a Swagger file
Generate docs for sdk with `sphinx`
Home
How to fix CI
Legacy tests
Management Plane Codegen Quick Start for Test
Prepare test proxy for Python SDK test
Release Process
Telemetry with Azure SDKs
What to do after generating the SDK code with MPG
What to do after generating the SDK code with codegen
[TestProxy] Run test with testproxy for mgmt SDK
3
Generate Python Mgmt SDK
Yuchao Yan редактировал(а) эту страницу 2023-08-21 14:10:35 +08:00
Содержание
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
- install autorest with npm
- install Python 3.7 or later
- clone OpenApi repo azure-rest-api-specs locally (make sure it contains your swagger content)
- clone SDK repo azure-sdk-for-python locally
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