Skip to main content

AutoRest: Python Client Runtime

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

Installation

To install:

$ pip install msrest

Release History

2018-03-07 Version 0.4.27

Features

  • Disable HTTP log by default (security), add enable_http_log to restore it #86

BugFixes

  • Fix incorrect date parsing if ms precision is over 6 digits #82

2018-01-30 Version 0.4.26

Features

  • Add TopicCredentials for EventGrid client

Bugfixes

  • Fix minimal dependency of isodate

  • Fix serialisation from dict if datetime provided

2018-01-08 Version 0.4.25

Features

  • Add LROPoller class. This is a customizable LRO engine. This is the poller engine of Autorest.Python 3.0, and is not used by code generated by previous Autorest version.

2018-01-03 Version 0.4.24

Bugfixes

  • Date parsing is now compliant with Autorest / Swagger 2.0 specification (less lenient)

Internal optimisation

  • Call that does not return a streamable object are now executed in requests stream mode False (was True whatever the type of the call). This should reduce the number of leaked opened session and allow urllib3 to manage connection pooling more efficiently. Only clients generated with Autorest.Python >= 2.1.31 (not impacted otherwise, fully backward compatible)

2017-12-21 Version 0.4.23

Bugfixes

  • Accept to deserialize enum of different type if content string match #75

  • Stop failing on deserialization if enum string is unkwon. Return the string instead.

Features

  • Model now accept kwargs in constructor for future kwargs models

2017-12-15 Version 0.4.22

Bugfixes

  • Do not validate additional_properties #73

  • Improve validation error if expected type is dict, but actual type is not #73

2017-12-14 Version 0.4.21

Bugfixes

  • Fix additional_properties if Swagger was flatten #72

2017-12-13 Version 0.4.20

Features

  • Add support for additional_properties

    • By default, all additional_properties are kept.

    • Additional properties are sent to the server only if it was specified in the Swagger, or if “enable_additional_properties_sending” is called on the model we want it. This is a class method that enables it for all instance of this model.

2017-11-20 Version 0.4.19

Features

  • The interpretation of Swagger 2.0 “discriminator” is now lenient. This means for these two scenarios:

    • Discriminator value is missing from the received payload

    • Discriminator value is not defined in the Swagger

    Instead of failing with an exception, this now returns the base type for this “discriminator”.

    Note that this is not a contradiction of the Swagger 2.0 spec, that specifies “validation SHOULD fail […] there may exist valid reasons in particular circumstances to ignore a particular item, but the full implications must be understood and carefully weighed before choosing a different course.”

    This cannot be configured for now and is the new default behvaior, but can be in the future if needed.

Bugfixes

  • Optional formdata parameters were raising an exception (#65)

  • “application/x-www-form-urlencoded” form was sent using “multipart/form-data”. This causes problems if the server does not support “multipart/form-data” (#66)

2017-10-26 Version 0.4.18

Features

  • Add ApiKeyCredentials class. This can be used to support OpenAPI ApiKey feature.

  • Add CognitiveServicesAuthentication class. Pre-declared ApiKeyCredentials class for Cognitive Services.

2017-10-12 Version 0.4.17

Features

This make Authentication classes more consistent:

  • OAuthTokenAuthentication is now a subclass of BasicTokenAuthentication (was Authentication)

  • BasicTokenAuthentication has now a “set_token” methods that does nothing.

This allows test like “isintance(o, BasicTokenAuthentication)” to be guaranted that the following attributes exists:

  • token

  • set_token()

  • signed_session()

This means for users of “msrestazure”, that they are guaranted that all AD classes somehow inherits from “BasicTokenAuthentication”

2017-10-05 Version 0.4.16

Bugfixes

  • Fix regression: accept “set<str>” as a valid “[str]” (#60)

2017-09-28 Version 0.4.15

Bugfixes

  • Always log response body (#16)

  • Improved exception message if error JSON is Odata v4 (#55)

  • Refuse “str” as a valid “[str]” type (#41)

  • Better exception handling if input from server is not JSON valid

Features

  • Add Configuration.session_configuration_callback to customize the requests.Session if necessary (#52)

  • Add a flag to Serializer to disable client-side-validation (#51)

  • Remove “import requests” from “exceptions.py” for apps that require fast loading time (#23)

Thank you to jayden-at-arista for his contribution

2017-08-23 Version 0.4.14

Bugfixes

  • Fix regression introduced in msrest 0.4.12 - dict syntax with enum modeled as string and enum used

2017-08-22 Version 0.4.13

Bugfixes

  • Fix regression introduced in msrest 0.4.12 - dict syntax using isodate.Duration (#42)

2017-08-21 Version 0.4.12

Features

  • Input is now more lenient

  • Model have a “validate” method to check content constraints

  • Model have now 4 new methods:

    • “serialize” that gives the RestAPI that will be sent

    • “as_dict” that returns a dict version of the Model. Callbacks are available.

    • “deserialize” the parses the RestAPI JSON into a Model

    • “from_dict” that parses several dict syntax into a Model. Callbacks are available.

More details and examples in the Wiki article on Github: https://github.com/Azure/msrest-for-python/wiki/msrest-0.4.12—Serialization-change

Bugfixes

  • Better Enum checking (#38)

2017-06-21 Version 0.4.11

Bugfixes

  • Fix incorrect dependency to “requests” 2.14.x, instead of 2.x meant in 0.4.8

2017-06-15 Version 0.4.10

Features

  • Add requests hooks to configuration

2017-06-08 Version 0.4.9

Bugfixes

  • Accept “null” value for paging array as an empty list and do not raise (#30)

2017-05-22 Version 0.4.8

Bugfixes

  • Fix random “pool is closed” error (#29)

  • Fix requests dependency to version 2.x, since version 3.x is annunced to be breaking.

2017-04-04 Version 0.4.7

BugFixes

  • Refactor paging #22:

    • “next” is renamed “advance_page” and “next” returns only 1 element (Python 2 expected behavior)

    • paging objects are now real generator and support the “next()” built-in function without need for “iter()”

  • Raise accurate DeserialisationError on incorrect RestAPI discriminator usage #27

  • Fix discriminator usage of the base class name #27

  • Remove default mutable arguments in Clients #20

  • Fix object comparison in some scenarios #24

2017-03-06 Version 0.4.6

Bugfixes

  • Allow Model sub-classes to be serialized if type is “object”

2017-02-13 Version 0.4.5

Bugfixes

  • Fix polymorphic deserialization #11

  • Fix regexp validation if ‘\w’ is used in Python 2.7 #13

  • Fix dict deserialization if keys are unicode in Python 2.7

Improvements

  • Add polymorphic serialisation from dict objects

  • Remove chardet and use HTTP charset declaration (fallback to utf8)

2016-09-14 Version 0.4.4

Bugfixes

Disclaimer

In order to get paging fixes for impacted clients, you need this package and Autorest > 0.17.0 Nightly 20160913

2016-09-01 Version 0.4.3

Bugfixes

2016-08-15 Version 0.4.2

Bugfixes

2016-08-08 Version 0.4.1

Bugfixes

2016-05-25 Version 0.4.0

This version has no bug fixes, but implements new features of Autorest: - Base64 url type - unixtime type - x-ms-enum modelAsString flag

Behaviour changes

  • Add Platform information in UserAgent

  • Needs Autorest > 0.17.0 Nightly 20160525

2016-04-26 Version 0.3.0

Bugfixes

Behaviour changes

  • Needs Autorest > 0.16.0 Nightly 20160426

2016-03-25 Version 0.2.0

Bugfixes

Behaviour changes

  • Needs Autorest > 0.16.0 Nightly 20160324

2016-03-21 Version 0.1.3

Bugfixes

2016-03-14 Version 0.1.2

Bugfixes

2016-03-04 Version 0.1.1

Bugfixes

2016-03-04 Version 0.1.0

Behavioural Changes

  • Removed custom logging set up and configuration. All loggers are now children of the root logger ‘msrest’ with no pre-defined configurations.

  • Replaced _required attribute in Model class with more extensive _validation dict.

Improvement

  • Removed hierarchy scanning for attribute maps from base Model class - relies on generator to populate attribute maps according to hierarchy.

  • Base class Paged now inherits from collections.Iterable.

  • Data validation during serialization using custom parameters (e.g. max, min etc).

  • Added ValidationError to be raised if invalid data encountered during serialization.

2016-02-29 Version 0.0.3

Bugfixes

2016-02-19 Version 0.0.2

Bugfixes

  • Fixed bug in exception logging before logger configured.

2016-02-19 Version 0.0.1

  • Initial release.

Metadata

Release files for msrest 0.4.27

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for msrest 0.4.27
File Size Uploaded
msrest-0.4.27.tar.gz 33.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for msrest 0.4.27
File Interpreter ABI Platform
msrest-0.4.27-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 79.1 kB

Release files / msrest-0.4.27.tar.gz

Download URL msrest-0.4.27.tar.gz
Size 33.8 kB
Tags Source
SHA-256 checksum
How to use checksums
cf45f02d73e45e5382f0e03b7552f530b090547cf77c4fb19f7dbe1990b3a739
BLAKE2b-256 checksum
How to use checksums
e5515c57754bfb2c097f5057c11a712d7b45f9a7f78191085085d3f34c809c4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / msrest-0.4.27-py2.py3-none-any.whl

Download URL msrest-0.4.27-py2.py3-none-any.whl
Size 45.3 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
f2312ff335a48f5ac2dbe2cb563ee4f7413052210067615f63973769df1a4718
BLAKE2b-256 checksum
How to use checksums
3581fc462af67dddcfc4d6a937d3fe69e9750cabe704a571bc223494c702ad27
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

0.7.1

2 release files

0.7.0

2 release files

0.6.21

2 release files

0.6.20

2 release files

0.6.18

2 release files

0.6.17

2 release files

0.6.14

2 release files

0.6.11

2 release files

0.6.9

2 release files

0.6.8

2 release files

0.6.7

2 release files

0.6.6

2 release files

0.6.4

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.5

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.29

2 release files

0.4.28

2 release files

This release

0.4.27 This release

2 release files

0.4.26

2 release files

0.4.23

2 release files

0.4.22

2 release files

0.4.21

2 release files

0.4.20

2 release files

0.4.19

2 release files

0.4.18

2 release files

0.4.17

2 release files

0.4.14

2 release files

0.4.13

2 release files

0.4.12

2 release files

0.4.11

2 release files

0.4.10

2 release files

0.4.9

2 release files

0.4.8

2 release files

0.4.7

2 release files

0.4.6

2 release files

0.4.5

2 release files

0.4.4

3 release files

0.4.3

3 release files

0.4.2

3 release files

0.4.1

3 release files

0.4.0

3 release files

0.3.0

3 release files

0.2.0

3 release files

0.1.3

3 release files

0.1.2

3 release files

0.1.1

3 release files

0.1.0

3 release files

0.0.3

3 release files

0.0.2

3 release files

0.0.1

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page