Skip to content

Generate Python SDK with Cadl (Preview)

Yuchao Yan edited this page Aug 31, 2022 · 4 revisions

Prerequisite

Install Node.js 16 or above. (Verify by node --version)

Install Python 3.7+. (Verify by python --version)

Install pnpm with cmd npm install -g pnpm

Clone autorest.python.

Build cadl-python locally

Step into repo autorest.python and run:

pnpm install
pnpm build

Generate SDK

  1. Step into packages/cadl-python under repo autorest.python
  2. Copy Cadl project here and run
cadl compile {your-cadl-files}/.  --emit=@azure-tools/cadl-python

The generated SDK code will be in cadl-output

Clone this wiki locally