Skip to content

Instantly share code, notes, and snippets.

@lmazuel
Last active September 3, 2025 23:23
Show Gist options
  • Save lmazuel/924e4ebd73c2a5bc000fbd90c7ad909c to your computer and use it in GitHub Desktop.
Save lmazuel/924e4ebd73c2a5bc000fbd90c7ad909c to your computer and use it in GitHub Desktop.

Pre-requisite

  • You need to have Python installed

  • We recommend at least 3.11 to have access to more tool by default (more can be added later)

  • You may use the "uv" tool as it's convenient, fast and handle Python version and venv creation automatically, but it's optional

Initial setup

  • Go in the folder of the package you're working on, for instance sdk/contoso/azure-contoso

Setup with uv

  • uv venv
  • uv pip install -r dev_requirements.txt

Setup with pip/python

  • python -m venv .venv
  • source .venv/bin/activate # This is for WSL, also put guidance for Windows
  • pip install -r dev_requirements.txt

Using the CLI

With uv

# uv loads the venv for you when you prefix the command with uvx
- uvx azpysdk mypy

With venv

# You can call the command directly if you activated the venv
- azpysdk mypy

List of available tool

  • mypy
  • pyling
  • sphinx

Advanced scenario

Using different Python version

If you want to locally test different Python version, to be ssure you're compatible on all the required Python version, do that. Note that this is optional, and you can rely onn CI to test python versions.

With uv

uvx --python=3.9 azpysdk mypy

With python

You need to install pyenv (explain that)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment