Package: pyazureutils
pyazureutilspyazureutils is a collection of utilities for interacting with Microsoft Azure.Overviewpyazureutils is available:install using pip from pypi:https://pypi.org/project/pyazureutilsbrowse source code on github:https://github.com/microchip-pic-avr-tools/pyazureutilsread API documentation on github:https://microchip-pic-avr-tools.github.io/pyazureutilsread the changelog on github:https://github.com/microchip-pic-avr-tools/pyazureutils/blob/main/CHANGELOG.mdUsagepyazureutils is intended as a library as well as a stand-alone CLI.
Its primary consumer is iotprovision.
The CLI requires that the Azure CLI ('az') is installed.Command-line interfacepyazureutils CLI is invoked with one command, one action and optional switches.  See help and examples below for more details.Getting help:pyazureutils--helpGetting command-specific help (iotcentral command):pyazureutilsiotcentral--helppyazureutils can optionally select the subscription to use:Example:pyazureutils--subscription"My Azure"iotcentralregister-deviceiotcentral commandThe iotcentral command supports device registration with Azure IoT CentralExample:pyazureutilsiotcentralregister-deviceDevice registration can optionally include the switches:--application-name <application name (URL) to register with>
--display-name <display name to use for the device registration>
--certificate-file <certificate to use for registration, if not read from a kit>
--device-template-name <device template to use for registration>Example:pyazureutils--subscription"My Azure"iotcentralregister-device--appcustom-227clcx93h8--template"PIC-IoT WM"--display-name"My PIC-IoT Kit"LoggingThis package uses the Python logging module for publishing log messages to library users.
A basic configuration can be used (see example below), but for best results a more thorough configuration is
recommended in order to control the verbosity of output from dependencies in the stack which also use logging.importlogginglogging.basicConfig(format="%(levelname)s:%(message)s",level=logging.WARNING)DependenciesThis package uses pyedbglib through other libraries for USB communications.  For more information see:https://pypi.org/project/pyedbglib/.Versioningpyazureutils version can be determined by:frompyazureutilsimport__version__aspyazureutils_versionprint(f"pyazureutils version{pyazureutils_version}")Changelog[1.1] - December 2023AddedDSG-5753 CLI catch-all and return codeFixedDSG-5640 Clean up unused pyedbglib dependencies / requirementsDSG-5754 Removed erroneous relic: AzureCustomProvisioner[1.0.0] - July 2022FixedDSG-4387 corrections to pyazureutils library helpDSG-4718 Attempt iotcentral enrollment even if app name is not visible in subscriptionDSG-5151 Support for setting the default subscription before enrollmentAddedDSG-4398 Link to github readme to github docs for pyazureutilsDSG-4471 Link to changelogDSG-4727 Argument aliases for enrollment (--app, --application-name, --application-url)[0.8.2] - December 2021FixedDSG-4296 Better feedback when multiple subscriptions or IoT Central applications foundDSG-4293 Better device template handlingChangedDSG-4355 Improved help[0.7.1] - November 2021AddedDSG-4029 Publication to GitHub + pypiDSG-4001 Support for multiple subscriptionsDSG-3442 iotcentral enrollmentFixedDSG-4004 cross-platform subprocess callsDSG-4000 packages dependencies correctedChangedDSG-3363 refactored provisioning[0.6.3] - June 2021AddedDSG-3565 pypi release[0.5.0] - January 2021First public release to PyPi