Adds tasks to simplify using Python in Visual Studio Team Services build definitions.
Note that these tasks only work on Windows build agents. For non-Windows platforms, add the Use Python Version task to select the version you need and configure your command
The Install Python task will install Python using a package from nuget.org and add it to
Most other tasks assume you have already run this task to install the desired runtime. The folder where they are installed is customizable, but be aware that you may need to update subsequent task configuration if you change this.
The recommended configuration for using this task with multiple versions of Python is to enable multi-configuration on the phase and specify the version number as a Multiplier. See the documentation for information about parallel execution.
(Note that the first-party Use Python Version task is preferable on the Hosted queues and works on all platforms, though as of 02 May 2018 is not fully available.)
Run Python command
The Run Python command task will let you enter any script or command to run with Python.
Consider using the Python Script task for inline code.
Run Python tests
The Run Python tests task will install and use PyTest to run your test suite. The pytest-azurepipelines plugin is used to publish results. If you enable code coverage, you will need to add a "Publish Code Coverage Results" task referencing
Build Python wheels with pip
The Build Python wheels with pip task uses the
As the Python packaging ecosystem moves forward, the
Build Python wheels
The Build Python wheels task uses a
Build Python sdist
The Build Python sdist task uses a
Upload Python package
The Upload Python package task uses
Update version variables
The Update version variables task will search Python files for a
Create Conda Environment
The experimental Create Conda Environment task will create an environment and install packages using conda.
You must provide a list of packages to install that includes Python itself, for example:
Run Jupyter Notebook
The experimental Run Jupyter Notebook task will use Jupyter to execute an
For best results, it is recommended to create a conda environment that includes at least