Skip to main content

AutoRest swagger generator Python client runtime. Azure-specific module.

Project description

https://travis-ci.org/Azure/msrestazure-for-python.svg?branch=master https://codecov.io/gh/azure/msrestazure-for-python/branch/master/graph/badge.svg

Installation

To install:

$ pip install msrestazure

Release History

2018-04-17 Version 0.4.26

Bugfixes

  • IMDS/MSI: Retry on more error codes (#87)

  • IMDS/MSI: fix a boundary case on timeout (#86)

2018-03-29 Version 0.4.25

Features

  • MSIAuthentication now uses IMDS endpoint if available

  • MSIAuthentication can be used in any environment that defines MSI_ENDPOINT env variable

2018-03-26 Version 0.4.24

Bugfix

  • Fix parse_resource_id() tool to be case-insensitive to keywords when matching #81

  • Add missing baseclass init call for AdalAuthentication #82

2018-03-19 Version 0.4.23

Bugfix

  • Fix LRO result if POST uses AsyncOperation header (Autorest.Python 3.0 only) #79

2018-02-27 Version 0.4.22

Bugfix

  • Remove a possible infinite loop with MSIAuthentication #77

Disclaimer

From this version, MSIAuthentication will fail instantly if you try to get MSI token from a VM where the extension is not installed, or not yet ready. You need to do your own retry mechanism if you think the extension is provisioning and the call might succeed later. This behavior is consistent with other Azure SDK implementation of MSI scenarios.

2018-01-26 Version 0.4.21

  • Update allowed ADAL dependency to 0.5.x

2018-01-08 Version 0.4.20

Features

  • CloudError now includes the “innererror” attribute to match OData v4 #73

  • Introduces ARMPolling implementation of Azure Resource Management LRO. Requires msrest 0.4.25 (new dependency). This is used by code generated with Autorest.Python 3.0, and is not used by code generated by previous Autorest version.

  • Change msrest dependency to “>=0.4.25,<2.0.0” to allow (future) msrest 1.0.0 as compatible dependency.

Thank you to demyanenko for his contribution.

2017-12-14 Version 0.4.19

Feature

  • Improve MSIAuthentication to support User Assigned Identity #70

Bugfixes

  • Fix session obj for cloudmetadata endpoint #67

  • Fix authentication resource node for AzureSatck #65

  • Better detection of AppService with MSIAuthentication #70

2017-12-01 Version 0.4.18

Bugfixes

  • get_cloud_from_metadata_endpoint incorrect on AzureStack #62

  • get_cloud_from_metadata_endpoint certificate issue #61

2017-11-22 Version 0.4.17

Bugfixes

  • Fix AttributeError if error JSON from ARM does not follow ODatav4 (as it should)

2017-10-31 Version 0.4.16

Bugfixes

  • Fix AttributeError if input JSON is not a dict (#54)

2017-10-13 Version 0.4.15

Features

  • Add support for WebApp/Functions in MSIAuthentication classes

  • Add parse_resource_id(), resource_id(), validate_resource_id() to parse ARM ids

  • Retry strategy now n reach 24 seconds (instead of 12 seconds)

2017-09-11 Version 0.4.14

Features

  • Add Managed Service Integrated (MSI) authentication

Bug fix

  • Fix AdalError handling in some scenarios (#44)

Thank you to Hexadite-Omer for his contribution

2017-08-24 Version 0.4.13

Features

  • “keyring” is now completely optional

2017-08-23 Version 0.4.12

Features

  • add “timeout” to ServicePrincipalCredentials and UserPasswordCredentials

  • Threads created by AzureOperationPoller have now a name prefixed by “AzureOperationPoller” to help identify them

Bugfixes

  • Do not fail if keyring is badly installed

  • Update Azure Gov login endpoint

  • Update metadata ARM endpoint parser

Breaking changes

  • Remove InteractiveCredentials. This class was deprecated and unusable. Use ADAL device code instead.

2017-06-29 Version 0.4.11

Features

  • Add cloud definitions for public Azure, German Azure, China Azure and Azure Gov

  • Add get_cloud_from_metadata_endpoint to automatically create a Cloud object from an ARM endpoint

  • Add cloud_environment to all Credentials objects (except AdalAuthentication)

Note

  • This deprecates “china=True”, to be replaced by “cloud_environment=AZURE_CHINA_CLOUD”

Example:

from msrestazure.azure_cloud import AZURE_CHINA_CLOUD
from msrestazure.azure_active_directory import UserPassCredentials

credentials = UserPassCredentials(
    login,
    password,
    cloud_environment=AZURE_CHINA_CLOUD
)

base_url of SDK client can be pointed to “cloud_environment.endpoints.resource_manager” for basic scenario:

Example:

from msrestazure.azure_cloud import AZURE_CHINA_CLOUD
from msrestazure.azure_active_directory import UserPassCredentials
from azure.mgmt.resource import ResourceManagementClient

credentials = UserPassCredentials(
    login,
    password,
    cloud_environment=AZURE_CHINA_CLOUD
)
client = ResourceManagementClient(
    credentials,
    subscription_id,
    base_url=AZURE_CHINA_CLOUD.endpoints.resource_manager
)

Azure Stack connection can be done:

from msrestazure.azure_cloud import get_cloud_from_metadata_endpoint
from msrestazure.azure_active_directory import UserPassCredentials
from azure.mgmt.resource import ResourceManagementClient

mystack_cloud = get_cloud_from_metadata_endpoint("https://myazurestack-arm-endpoint.com")
credentials = UserPassCredentials(
    login,
    password,
    cloud_environment=mystack_cloud
)
client = ResourceManagementClient(
    credentials,
    subscription_id,
    base_url=mystack_cloud.endpoints.resource_manager
)

2017-06-27 Version 0.4.10

Bugfixes

  • Accept PATCH/201 as LRO valid state

  • Close token session on exit (ServicePrincipal and UserPassword credentials)

2017-06-19 Version 0.4.9

Features

  • Add proxies parameters to ServicePrincipal and UserPassword credentials class #29

  • Add automatic Azure provider registration if needed (requires msrest 0.4.10) #28

Thank you to likel for his contribution

2017-05-31 Version 0.4.8

Bugfixes

  • Fix LRO if first call never returns 200, but ends on 201 (#26)

  • FiX LRO AttributeError if timeout is short (#21)

Features

  • Expose a “status()” method in AzureOperationPoller (#18)

2017-01-23 Version 0.4.7

Bugfixes

  • Adding accept_language and generate_client_request_id default values

2016-12-12 Version 0.4.6

Bugfixes

Refactor Long Running Operation algorithm.

  • There is no breaking changes, however you might need to record again your offline HTTP records if you use unittests with VCRpy.

  • Fix a couple of latent bugs

2016-11-30 Version 0.4.5

New features

2016-10-17 Version 0.4.4

Bugfixes

2016-09-14 Version 0.4.3

Bugfixes

2016-09-01 Version 0.4.2

Bugfixes

This version needs msrest >= 0.4.3

2016-06-08 Version 0.4.1

Bugfixes

2016-05-25 Version 0.4.0

Update msrest dependency to 0.4.0

Bugfixes

Behaviour changes

  • Needs Autorest > 0.17.0 Nightly 20160525

2016-04-26 Version 0.3.0

Update msrest dependency to 0.3.0

Bugfixes

Behaviour changes

  • Needs Autorest > 0.16.0 Nightly 20160426

2016-03-31 Version 0.2.1

Bugfixes

2016-03-25 Version 0.2.0

Update msrest dependency to 0.2.0

Behaviour change

  • async methods called with raw=True don’t return anymore AzureOperationPoller but ClientRawResponse

  • Needs Autorest > 0.16.0 Nightly 20160324

2016-03-21 Version 0.1.2

Update msrest dependency to 0.1.3

Bugfixes

2016-03-04 Version 0.1.1

Bugfixes

2016-03-04 Version 0.1.0

Behaviour change

  • Replaced _required attribute in CloudErrorData class with _validation dict.

2016-02-29 Version 0.0.2

Bugfixes

2016-02-19 Version 0.0.1

  • Initial release.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

msrestazure-0.4.26.tar.gz (27.5 kB view details)

Uploaded Source

Built Distribution

msrestazure-0.4.26-py2.py3-none-any.whl (35.5 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file msrestazure-0.4.26.tar.gz.

File metadata

File hashes

Hashes for msrestazure-0.4.26.tar.gz
Algorithm Hash digest
SHA256 ab49c00b53b089713fc9e0176b2420be90a1c8583a45f58eb0d8252b1d414f4c
MD5 07504e5f09b4eb98442c4db4981c9c3c
BLAKE2b-256 d898a6cca95394336d900a5bc4d3d1822df2fbfd4f9e57c30d9e2ac59a40a6c4

See more details on using hashes here.

File details

Details for the file msrestazure-0.4.26-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for msrestazure-0.4.26-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 12ec979af4cbc8edd29ea14bafb87ea93d336719e7c2659ece50d1ab547c8b70
MD5 7560679a87bb6f76e45075234cda6c3b
BLAKE2b-256 06fc27dc2b8510e317fac23b743204da37e26dbb1df41d3581b1eaed2ed7b281

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page