diff --git a/src/python_inspector/resolution.py b/src/python_inspector/resolution.py index e9e520e..1a7dbd2 100644 --- a/src/python_inspector/resolution.py +++ b/src/python_inspector/resolution.py @@ -303,7 +303,7 @@ def get_requirements_from_python_manifest( else: # Do not raise exception here as we may have a setup.py that does not # have any dependencies. - with (open(setup_py_location)) as sf: + with open(setup_py_location) as sf: file_contents = sf.read() node = ast.parse(file_contents) setup_fct = [ diff --git a/tests/data/azure-devops.req-310-expected.json b/tests/data/azure-devops.req-310-expected.json index b2ce457..885ebf3 100644 --- a/tests/data/azure-devops.req-310-expected.json +++ b/tests/data/azure-devops.req-310-expected.json @@ -4,7 +4,7 @@ "tool_homepageurl": "https://github.com/nexB/python-inspector", "tool_version": "0.9.8", "options": [ - "--requirement /home/tg1999/Desktop/example/tools/python-inspector/tests/data/azure-devops.req.txt", + "--requirement /home/frank/sources/github/nexB/python-inspector/tests/data/azure-devops.req.txt", "--index-url https://pypi.org/simple", "--python-version 310", "--operating-system linux", @@ -17,7 +17,7 @@ "files": [ { "type": "file", - "path": "/home/tg1999/Desktop/example/tools/python-inspector/tests/data/azure-devops.req.txt", + "path": "/home/frank/sources/github/nexB/python-inspector/tests/data/azure-devops.req.txt", "package_data": [ { "type": "pypi", @@ -127,12 +127,12 @@ "type": "pypi", "namespace": null, "name": "azure-core", - "version": "1.28.0", + "version": "1.29.4", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "Microsoft Azure Core Library for Python\n# Azure Core shared client library for Python\n\nAzure core provides shared exceptions and modules for Python SDK client libraries.\nThese libraries follow the [Azure SDK Design Guidelines for Python](https://azure.github.io/azure-sdk/python/guidelines/index.html) .\n\nIf you are a client library developer, please reference [client library developer reference](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md) for more information.\n\n[Source code](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/) \n| [Package (Pypi)][package]\n| [Package (Conda)](https://anaconda.org/microsoft/azure-core/)\n| [API reference documentation](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/)\n\n## _Disclaimer_\n\n_Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For more information and questions, please refer to _\n\n## Getting started\n\nTypically, you will not need to install azure core;\nit will be installed when you install one of the client libraries using it.\nIn case you want to install it explicitly (to implement your own client library, for example),\nyou can find it [here](https://pypi.org/project/azure-core/).\n\n## Key concepts\n\n### Azure Core Library Exceptions\n\n#### AzureError\n\nAzureError is the base exception for all errors.\n\n```python\nclass AzureError(Exception):\n def __init__(self, message, *args, **kwargs):\n self.inner_exception = kwargs.get(\"error\")\n self.exc_type, self.exc_value, self.exc_traceback = sys.exc_info()\n self.exc_type = self.exc_type.__name__ if self.exc_type else type(self.inner_exception)\n self.exc_msg = \"{}, {}: {}\".format(message, self.exc_type, self.exc_value) # type: ignore\n self.message = str(message)\n self.continuation_token = kwargs.get(\"continuation_token\")\n super(AzureError, self).__init__(self.message, *args)\n```\n\n*message* is any message (str) to be associated with the exception.\n\n*args* are any additional args to be included with exception.\n\n*kwargs* are keyword arguments to include with the exception. Use the keyword *error* to pass in an internal exception and *continuation_token* for a token reference to continue an incomplete operation.\n\n**The following exceptions inherit from AzureError:**\n\n#### ServiceRequestError\n\nAn error occurred while attempt to make a request to the service. No request was sent.\n\n#### ServiceResponseError\n\nThe request was sent, but the client failed to understand the response.\nThe connection may have timed out. These errors can be retried for idempotent or safe operations.\n\n#### HttpResponseError\n\nA request was made, and a non-success status code was received from the service.\n\n```python\nclass HttpResponseError(AzureError):\n def __init__(self, message=None, response=None, **kwargs):\n self.reason = None\n self.response = response\n if response:\n self.reason = response.reason\n self.status_code = response.status_code\n self.error = self._parse_odata_body(ODataV4Format, response) # type: Optional[ODataV4Format]\n if self.error:\n message = str(self.error)\n else:\n message = message or \"Operation returned an invalid status '{}'\".format(\n self.reason\n )\n\n super(HttpResponseError, self).__init__(message=message, **kwargs)\n```\n\n*message* is the HTTP response error message (optional)\n\n*response* is the HTTP response (optional).\n\n*kwargs* are keyword arguments to include with the exception.\n\n**The following exceptions inherit from HttpResponseError:**\n\n#### DecodeError\n\nAn error raised during response de-serialization.\n\n#### IncompleteReadError\n\nAn error raised if peer closes the connection before we have received the complete message body.\n\n#### ResourceExistsError\n\nAn error response with status code 4xx. This will not be raised directly by the Azure core pipeline.\n\n#### ResourceNotFoundError\n\nAn error response, typically triggered by a 412 response (for update) or 404 (for get/post).\n\n#### ResourceModifiedError\n\nAn error response with status code 4xx, typically 412 Conflict. This will not be raised directly by the Azure core pipeline.\n\n#### ResourceNotModifiedError\n\nAn error response with status code 304. This will not be raised directly by the Azure core pipeline.\n\n#### ClientAuthenticationError\n\nAn error response with status code 4xx. This will not be raised directly by the Azure core pipeline.\n\n#### TooManyRedirectsError\n\nAn error raised when the maximum number of redirect attempts is reached. The maximum amount of redirects can be configured in the RedirectPolicy.\n\n```python\nclass TooManyRedirectsError(HttpResponseError):\n def __init__(self, history, *args, **kwargs):\n self.history = history\n message = \"Reached maximum redirect attempts.\"\n super(TooManyRedirectsError, self).__init__(message, *args, **kwargs)\n```\n\n*history* is used to document the requests/responses that resulted in redirected requests.\n\n*args* are any additional args to be included with exception.\n\n*kwargs* are keyword arguments to include with the exception.\n\n#### StreamConsumedError\n\nAn error thrown if you try to access the stream of `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` once\nthe response stream has been consumed.\n\n#### StreamClosedError\n\nAn error thrown if you try to access the stream of the `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` once\nthe response stream has been closed.\n\n#### ResponseNotReadError\n\nAn error thrown if you try to access the `content` of `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` before\nreading in the response's bytes first.\n\n### Configurations\n\nWhen calling the methods, some properties can be configured by passing in as kwargs arguments.\n\n| Parameters | Description |\n| --- | --- |\n| headers | The HTTP Request headers. |\n| request_id | The request id to be added into header. |\n| user_agent | If specified, this will be added in front of the user agent string. |\n| logging_enable| Use to enable per operation. Defaults to `False`. |\n| logger | If specified, it will be used to log information. |\n| response_encoding | The encoding to use if known for this service (will disable auto-detection). |\n| proxies | Maps protocol or protocol and hostname to the URL of the proxy. |\n| raw_request_hook | Callback function. Will be invoked on request. |\n| raw_response_hook | Callback function. Will be invoked on response. |\n| network_span_namer | A callable to customize the span name. |\n| tracing_attributes | Attributes to set on all created spans. |\n| permit_redirects | Whether the client allows redirects. Defaults to `True`. |\n| redirect_max | The maximum allowed redirects. Defaults to `30`. |\n| retry_total | Total number of retries to allow. Takes precedence over other counts. Default value is `10`. |\n| retry_connect | How many connection-related errors to retry on. These are errors raised before the request is sent to the remote server, which we assume has not triggered the server to process the request. Default value is `3`. |\n| retry_read | How many times to retry on read errors. These errors are raised after the request was sent to the server, so the request may have side-effects. Default value is `3`. |\n| retry_status | How many times to retry on bad status codes. Default value is `3`. |\n| retry_backoff_factor | A backoff factor to apply between attempts after the second try (most errors are resolved immediately by a second try without a delay). Retry policy will sleep for: `{backoff factor} * (2 ** ({number of total retries} - 1))` seconds. If the backoff_factor is 0.1, then the retry will sleep for [0.0s, 0.2s, 0.4s, ...] between retries. The default value is `0.8`. |\n| retry_backoff_max | The maximum back off time. Default value is `120` seconds (2 minutes). |\n| retry_mode | Fixed or exponential delay between attempts, default is `Exponential`. |\n| timeout | Timeout setting for the operation in seconds, default is `604800`s (7 days). |\n| connection_timeout | A single float in seconds for the connection timeout. Defaults to `300` seconds. |\n| read_timeout | A single float in seconds for the read timeout. Defaults to `300` seconds. |\n| connection_verify | SSL certificate verification. Enabled by default. Set to False to disable, alternatively can be set to the path to a CA_BUNDLE file or directory with certificates of trusted CAs. |\n| connection_cert | Client-side certificates. You can specify a local cert to use as client side certificate, as a single file (containing the private key and the certificate) or as a tuple of both files' paths. |\n| proxies | Dictionary mapping protocol or protocol and hostname to the URL of the proxy. |\n| cookies | Dict or CookieJar object to send with the `Request`. |\n| connection_data_block_size | The block size of data sent over the connection. Defaults to `4096` bytes. |\n\n### Async transport\n\nThe async transport is designed to be opt-in. [AioHttp](https://pypi.org/project/aiohttp/) is one of the supported implementations of async transport. It is not installed by default. You need to install it separately.\n\n### Shared modules\n\n#### MatchConditions\n\nMatchConditions is an enum to describe match conditions.\n\n```python\nclass MatchConditions(Enum):\n Unconditionally = 1 # Matches any condition\n IfNotModified = 2 # If the target object is not modified. Usually it maps to etag=\n IfModified = 3 # Only if the target object is modified. Usually it maps to etag!=\n IfPresent = 4 # If the target object exists. Usually it maps to etag='*'\n IfMissing = 5 # If the target object does not exist. Usually it maps to etag!='*'\n```\n\n#### CaseInsensitiveEnumMeta\n\nA metaclass to support case-insensitive enums.\n\n```python\nfrom enum import Enum\n\nfrom azure.core import CaseInsensitiveEnumMeta\n\nclass MyCustomEnum(str, Enum, metaclass=CaseInsensitiveEnumMeta):\n FOO = 'foo'\n BAR = 'bar'\n```\n\n#### Null Sentinel Value\n\nA falsy sentinel object which is supposed to be used to specify attributes\nwith no data. This gets serialized to `null` on the wire.\n\n```python\nfrom azure.core.serialization import NULL\n\nassert bool(NULL) is False\n\nfoo = Foo(\n attr=NULL\n)\n```\n\n## Contributing\n\nThis project welcomes contributions and suggestions. Most contributions require\nyou to agree to a Contributor License Agreement (CLA) declaring that you have\nthe right to, and actually do, grant us the rights to use your contribution.\nFor details, visit [https://cla.microsoft.com](https://cla.microsoft.com).\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether\nyou need to provide a CLA and decorate the PR appropriately (e.g., label,\ncomment). Simply follow the instructions provided by the bot. You will only\nneed to do this once across all repos using our CLA.\n\nThis project has adopted the\n[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).\nFor more information, see the\n[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)\nor contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any\nadditional questions or comments.\n\n\n[package]: https://pypi.org/project/azure-core/\n\n\n# Release History\n\n## 1.28.0 (2023-07-06)\n\n### Features Added\n\n- Added header name parameter to `RequestIdPolicy`. #30772\n- Added `SensitiveHeaderCleanupPolicy` that cleans up sensitive headers if a redirect happens and the new destination is in another domain. #28349\n\n### Other Changes\n\n- Catch aiohttp errors and translate them into azure-core errors.\n\n## 1.27.1 (2023-06-13)\n\n### Bugs Fixed\n\n- Fix url building for some complex query parameters scenarios #30707\n\n## 1.27.0 (2023-06-01)\n\n### Features Added\n\n- Added support to use sync credentials in `AsyncBearerTokenCredentialPolicy`. #30381\n- Added \"prefix\" parameter to AzureKeyCredentialPolicy #29901\n\n### Bugs Fixed\n\n- Improve error message when providing the wrong credential type for AzureKeyCredential #30380\n\n## 1.26.4 (2023-04-06)\n\n### Features Added\n\n- Updated settings to include OpenTelemetry as a tracer provider. #29095\n\n### Other Changes\n\n- Improved typing\n\n## 1.26.3 (2023-02-02)\n\n### Bugs Fixed\n\n- Fixed deflate decompression for aiohttp #28483\n\n## 1.26.2 (2023-01-05)\n\n### Bugs Fixed\n\n- Fix 'ClientSession' object has no attribute 'auto_decompress' (thanks to @mghextreme for the contribution)\n\n### Other Changes\n\n- Add \"x-ms-error-code\" as secure header to log\n- Rename \"DEFAULT_HEADERS_WHITELIST\" to \"DEFAULT_HEADERS_ALLOWLIST\". Added a backward compatible alias.\n\n## 1.26.1 (2022-11-03)\n\n### Other Changes\n\n- Added example of RequestsTransport with custom session. (thanks to @inirudebwoy for the contribution) #26768\n- Added Python 3.11 support.\n\n## 1.26.0 (2022-10-06)\n\n### Other Changes\n\n- LRO polling will not wait anymore before doing the first status check #26376\n- Added extra dependency for [aio]. pip install azure-core[aio] installs aiohttp too.\n\n## 1.25.1 (2022-09-01)\n\n### Bugs Fixed\n\n- Added @runtime_checkable to `TokenCredential` protocol definitions #25187\n\n## 1.25.0 (2022-08-04)\n\nAzure-core is supported on Python 3.7 or later. For more details, please read our page on [Azure SDK for Python version support policy](https://github.com/Azure/azure-sdk-for-python/wiki/Azure-SDKs-Python-version-support-policy).\n\n### Features Added\n\n- Added `CaseInsensitiveDict` implementation in `azure.core.utils` removing dependency on `requests` and `aiohttp`\n\n## 1.24.2 (2022-06-30)\n\n### Bugs Fixed\n\n- Fixed the bug that azure-core could not be imported under Python 3.11.0b3 #24928\n- `ContentDecodePolicy` can now correctly deserialize more JSON bodies with different mime types #22410\n\n## 1.24.1 (2022-06-01)\n\n### Bugs Fixed\n\n- Declare method level span as INTERNAL by default #24492\n- Fixed type hints for `azure.core.paging.ItemPaged` #24548\n\n## 1.24.0 (2022-05-06)\n\n### Features Added\n\n- Add `SerializationError` and `DeserializationError` in `azure.core.exceptions` for errors raised during serialization / deserialization #24312\n\n## 1.23.1 (2022-03-31)\n\n### Bugs Fixed\n\n- Allow stream inputs to the `content` kwarg of `azure.core.rest.HttpRequest` from objects with a `read` method #23578\n\n## 1.23.0 (2022-03-03)\n\n### Features Added\n\n- Improve intellisense type hinting for service client methods. #22891\n\n- Add a case insensitive dict `case_insensitive_dict` in `azure.core.utils`. #23206\n\n### Bugs Fixed\n\n- Use \"\\n\" rather than \"/n\" for new line in log. #23261\n\n### Other Changes\n\n- Log \"WWW-Authenticate\" header in `HttpLoggingPolicy` #22990\n- Added dependency on `typing-extensions` >= 4.0.1\n\n## 1.22.1 (2022-02-09)\n\n### Bugs Fixed\n\n- Limiting `final-state-via` scope to POST until consuming SDKs has been fixed to use this option properly on PUT. #22989\n\n## 1.22.0 (2022-02-03)\n_[**This version is deprecated.**]_\n\n### Features Added\n\n- Add support for `final-state-via` LRO option in core. #22713\n\n### Bugs Fixed\n\n- Add response body to string representation of `HttpResponseError` if we're not able to parse out information #22302\n- Raise `AttributeError` when calling azure.core.pipeline.transport.\\_\\_bases__ #22469\n\n### Other Changes\n\n- Python 2.7 is no longer supported. Please use Python version 3.6 or later.\n\n## 1.21.1 (2021-12-06)\n\n### Other Changes\n\n- Revert change in str method #22023\n\n## 1.21.0 (2021-12-02)\n\n### Breaking Changes\n\n- Sync stream downloading now raises `azure.core.exceptions.DecodeError` rather than `requests.exceptions.ContentDecodingError`\n\n### Bugs Fixed\n\n- Add response body to string representation of `HttpResponseError` if we're not able to parse out information #21800\n\n## 1.20.1 (2021-11-08)\n\n### Bugs Fixed\n\n- Correctly set response's content to decompressed body when users are using aiohttp transport with decompression headers #21620\n\n## 1.20.0 (2021-11-04)\n\n### Features Added\n\n- GA `send_request` onto the `azure.core.PipelineClient` and `azure.core.AsyncPipelineClient`. This method takes in\nrequests and sends them through our pipelines.\n- GA `azure.core.rest`. `azure.core.rest` is our new public simple HTTP library in `azure.core` that users will use to create requests, and consume responses.\n- GA errors `StreamConsumedError`, `StreamClosedError`, and `ResponseNotReadError` to `azure.core.exceptions`. These errors\nare thrown if you mishandle streamed responses from the `azure.core.rest` module\n- add kwargs to the methods for `iter_raw` and `iter_bytes` #21529\n- no longer raise JSON errors if users pass in file descriptors of JSON to the `json` kwarg in `HttpRequest` #21504\n- Added new error type `IncompleteReadError` which is raised if peer closes the connection before we have received the complete message body.\n\n### Breaking Changes\n\n- SansIOHTTPPolicy.on_exception returns None instead of bool.\n\n### Bugs Fixed\n\n- The `Content-Length` header in a http response is strictly checked against the actual number of bytes in the body,\n rather than silently truncating data in case the underlying tcp connection is closed prematurely.\n (thanks to @jochen-ott-by for the contribution) #20412\n- UnboundLocalError when SansIOHTTPPolicy handles an exception #15222\n- Add default content type header of `text/plain` and content length header for users who pass unicode strings to the `content` kwarg of `HttpRequest` in 2.7 #21550\n\n## 1.19.1 (2021-11-01)\n\n### Bugs Fixed\n\n- respect text encoding specified in argument (thanks to @ryohji for the contribution) #20796\n- Fix \"coroutine x.read() was never awaited\" warning from `ContentDecodePolicy` #21318\n- fix type check for `data` input to `azure.core.rest` for python 2.7 users #21341\n- use `charset_normalizer` if `chardet` is not installed to migrate aiohttp 3.8.0 changes.\n\n### Other Changes\n\n- Refactor AzureJSONEncoder (thanks to @Codejune for the contribution) #21028\n\n## 1.19.0 (2021-09-30)\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse` are now abstract base classes. They should not be initialized directly, instead\nyour transport responses should inherit from them and implement them.\n- The properties of the `azure.core.rest` responses are now all read-only\n\n- HttpLoggingPolicy integrates logs into one record #19925\n\n## 1.18.0 (2021-09-02)\n\n### Features Added\n\n- `azure.core.serialization.AzureJSONEncoder` (introduced in 1.17.0) serializes `datetime.datetime` objects in ISO 8601 format, conforming to RFC 3339's specification. #20190\n- We now use `azure.core.serialization.AzureJSONEncoder` to serialize `json` input to `azure.core.rest.HttpRequest`.\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- The `text` property on `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse` has changed to a method, which also takes\nan `encoding` parameter.\n- Removed `iter_text` and `iter_lines` from `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse`\n\n### Bugs Fixed\n\n- The behaviour of the headers returned in `azure.core.rest` responses now aligns across sync and async. Items can now be checked case-insensitively and without raising an error for format.\n\n## 1.17.0 (2021-08-05)\n\n### Features Added\n\n- Cut hard dependency on requests library\n- Added a `from_json` method which now accepts storage QueueMessage, eventhub's EventData or ServiceBusMessage or simply json bytes to return a `CloudEvent`\n\n### Fixed\n\n- Not override \"x-ms-client-request-id\" if it already exists in the header. #17757\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- `azure.core.rest` will not try to guess the `charset` anymore if it was impossible to extract it from `HttpResponse` analysis. This removes our dependency on `charset`.\n\n## 1.16.0 (2021-07-01)\n\n### Features Added\n\n- Add new ***provisional*** methods `send_request` onto the `azure.core.PipelineClient` and `azure.core.AsyncPipelineClient`. This method takes in\nrequests and sends them through our pipelines.\n- Add new ***provisional*** module `azure.core.rest`. `azure.core.rest` is our new public simple HTTP library in `azure.core` that users will use to create requests, and consume responses.\n- Add new ***provisional*** errors `StreamConsumedError`, `StreamClosedError`, and `ResponseNotReadError` to `azure.core.exceptions`. These errors\nare thrown if you mishandle streamed responses from the provisional `azure.core.rest` module\n\n### Fixed\n\n- Improved error message in the `from_dict` method of `CloudEvent` when a wrong schema is sent.\n\n## 1.15.0 (2021-06-04)\n\n### New Features\n\n- Added `BearerTokenCredentialPolicy.on_challenge` and `.authorize_request` to allow subclasses to optionally handle authentication challenges\n\n### Bug Fixes\n\n- Retry policies don't sleep after operations time out\n- The `from_dict` methhod in the `CloudEvent` can now convert a datetime string to datetime object when microsecond exceeds the python limitation\n\n## 1.14.0 (2021-05-13)\n\n### New Features\n\n- Added `azure.core.credentials.AzureNamedKeyCredential` credential #17548.\n- Added `decompress` parameter for `stream_download` method. If it is set to `False`, will not do decompression upon the stream. #17920\n\n## 1.13.0 (2021-04-02)\n\nAzure core requires Python 2.7 or Python 3.6+ since this release.\n\n### New Features\n\n- Added `azure.core.utils.parse_connection_string` function to parse connection strings across SDKs, with common validation and support for case insensitive keys.\n- Supported adding custom policies #16519\n- Added `~azure.core.tracing.Link` that should be used while passing `Links` to `AbstractSpan`.\n- `AbstractSpan` constructor can now take in additional keyword only args.\n\n### Bug fixes\n\n- Make NetworkTraceLoggingPolicy show the auth token in plain text. #14191\n- Fixed RetryPolicy overriding default connection timeout with an extreme value #17481\n\n## 1.12.0 (2021-03-08)\n\nThis version will be the last version to officially support Python 3.5, future versions will require Python 2.7 or Python 3.6+.\n\n### Features\n\n- Added `azure.core.messaging.CloudEvent` model that follows the cloud event spec.\n- Added `azure.core.serialization.NULL` sentinel value\n- Improve `repr`s for `HttpRequest` and `HttpResponse`s #16972\n\n### Bug Fixes\n\n- Disable retry in stream downloading. (thanks to @jochen-ott-by @hoffmann for the contribution) #16723\n\n## 1.11.0 (2021-02-08)\n\n### Features\n\n- Added `CaseInsensitiveEnumMeta` class for case-insensitive enums. #16316\n- Add `raise_for_status` method onto `HttpResponse`. Calling `response.raise_for_status()` on a response with an error code\nwill raise an `HttpResponseError`. Calling it on a good response will do nothing #16399\n\n### Bug Fixes\n\n- Update conn.conn_kw rather than overriding it when setting block size. (thanks for @jiasli for the contribution) #16587\n\n## 1.10.0 (2021-01-11)\n\n### Features\n\n- Added `AzureSasCredential` and its respective policy. #15946\n\n## 1.9.0 (2020-11-09)\n\n### Features\n\n- Add a `continuation_token` attribute to the base `AzureError` exception, and set this value for errors raised\n during paged or long-running operations.\n\n### Bug Fixes\n\n- Set retry_interval to 1 second instead of 1000 seconds (thanks **vbarbaresi** for contributing) #14357\n\n\n## 1.8.2 (2020-10-05)\n\n### Bug Fixes\n\n- Fixed bug to allow polling in the case of parameterized endpoints with relative polling urls #14097\n\n\n## 1.8.1 (2020-09-08)\n\n### Bug fixes\n\n- SAS credential replicated \"/\" fix #13159\n\n## 1.8.0 (2020-08-10)\n\n### Features\n\n- Support params as list for exploding parameters #12410\n\n\n## 1.7.0 (2020-07-06)\n\n### Bug fixes\n\n- `AzureKeyCredentialPolicy` will now accept (and ignore) passed in kwargs #11963\n- Better error messages if passed endpoint is incorrect #12106\n- Do not JSON encore a string if content type is \"text\" #12137\n\n### Features\n\n- Added `http_logging_policy` property on the `Configuration` object, allowing users to individually\nset the http logging policy of the config #12218\n\n## 1.6.0 (2020-06-03)\n\n### Bug fixes\n\n- Fixed deadlocks in AsyncBearerTokenCredentialPolicy #11543\n- Fix AttributeException in StreamDownloadGenerator #11462\n\n### Features\n\n- Added support for changesets as part of multipart message support #10485\n- Add AsyncLROPoller in azure.core.polling #10801\n- Add get_continuation_token/from_continuation_token/polling_method methods in pollers (sync and async) #10801\n- HttpResponse and PipelineContext objects are now pickable #10801\n\n## 1.5.0 (2020-05-04)\n\n### Features\n\n- Support \"x-ms-retry-after-ms\" in response header #10743\n- `link` and `link_from_headers` now accepts attributes #10765\n\n### Bug fixes\n\n- Not retry if the status code is less than 400 #10778\n- \"x-ms-request-id\" is not considered safe header for logging #10967\n\n## 1.4.0 (2020-04-06)\n\n### Features\n\n- Support a default error type in map_error #9773\n- Added `AzureKeyCredential` and its respective policy. #10509\n- Added `azure.core.polling.base_polling` module with a \"Microsoft One API\" polling implementation #10090\n Also contains the async version in `azure.core.polling.async_base_polling`\n- Support kwarg `enforce_https` to disable HTTPS check on authentication #9821\n- Support additional kwargs in `HttpRequest.set_multipart_mixed` that will be passed into pipeline context.\n\n## 1.3.0 (2020-03-09)\n\n### Bug fixes\n\n- Appended RequestIdPolicy to the default pipeline #9841\n- Rewind the body position in async_retry #10117\n\n### Features\n\n- Add raw_request_hook support in custom_hook_policy #9958\n- Add timeout support in retry_policy #10011\n- Add OdataV4 error format auto-parsing in all exceptions ('error' attribute) #9738\n\n## 1.2.2 (2020-02-10)\n\n### Bug fixes\n\n- Fixed a bug that sends None as request_id #9545\n- Enable mypy for customers #9572\n- Handle TypeError in deep copy #9620\n- Fix text/plain content-type in decoder #9589\n\n## 1.2.1 (2020-01-14)\n\n### Bug fixes\n\n- Fixed a regression in 1.2.0 that was incompatible with azure-keyvault-* 4.0.0\n[#9462](https://github.com/Azure/azure-sdk-for-python/issues/9462)\n\n\n## 1.2.0 (2020-01-14)\n\n### Features\n\n- Add user_agent & sdk_moniker kwargs in UserAgentPolicy init #9355\n- Support OPTIONS HTTP verb #9322\n- Add tracing_attributes to tracing decorator #9297\n- Support auto_request_id in RequestIdPolicy #9163\n- Support fixed retry #6419\n- Support \"retry-after-ms\" in response header #9240\n\n### Bug fixes\n\n- Removed `__enter__` and `__exit__` from async context managers #9313\n\n## 1.1.1 (2019-12-03)\n\n### Bug fixes\n\n- Bearer token authorization requires HTTPS\n- Rewind the body position in retry #8307\n\n## 1.1.0 (2019-11-25)\n\n### Features\n\n- New RequestIdPolicy #8437\n- Enable logging policy in default pipeline #8053\n- Normalize transport timeout. #8000\n Now we have:\n * 'connection_timeout' - a single float in seconds for the connection timeout. Default 5min\n * 'read_timeout' - a single float in seconds for the read timeout. Default 5min\n\n### Bug fixes\n\n- RequestHistory: deepcopy fails if request contains a stream #7732\n- Retry: retry raises error if response does not have http_response #8629\n- Client kwargs are now passed to DistributedTracingPolicy correctly #8051\n- NetworkLoggingPolicy now logs correctly all requests in case of retry #8262\n\n## 1.0.0 (2019-10-29)\n\n### Features\n\n- Tracing: DistributedTracingPolicy now accepts kwargs network_span_namer to change network span name #7773\n- Tracing: Implementation of AbstractSpan can now use the mixin HttpSpanMixin to get HTTP span update automatically #7773\n- Tracing: AbstractSpan contract \"change_context\" introduced #7773\n- Introduce new policy HttpLoggingPolicy #7988\n\n### Bug fixes\n\n- Fix AsyncioRequestsTransport if input stream is an async generator #7743\n- Fix form-data with aiohttp transport #7749\n\n### Breaking changes\n\n- Tracing: AbstractSpan.set_current_span is longer supported. Use change_context instead. #7773\n- azure.core.pipeline.policies.ContentDecodePolicy.deserialize_from_text changed\n\n## 1.0.0b4 (2019-10-07)\n\n### Features\n\n- Tracing: network span context is available with the TRACING_CONTEXT in pipeline response #7252\n- Tracing: Span contract now has `kind`, `traceparent` and is a context manager #7252\n- SansIOHTTPPolicy methods can now be coroutines #7497\n- Add multipart/mixed support #7083:\n\n - HttpRequest now has a \"set_multipart_mixed\" method to set the parts of this request\n - HttpRequest now has a \"prepare_multipart_body\" method to build final body.\n - HttpResponse now has a \"parts\" method to return an iterator of parts\n - AsyncHttpResponse now has a \"parts\" methods to return an async iterator of parts\n - Note that multipart/mixed is a Python 3.x only feature\n\n### Bug fixes\n\n- Tracing: policy cannot fail the pipeline, even in the worst condition #7252\n- Tracing: policy pass correctly status message if exception #7252\n- Tracing: incorrect span if exception raised from decorated function #7133\n- Fixed urllib3 ConnectTimeoutError being raised by Requests during a socket timeout. Now this exception is caught and wrapped as a `ServiceRequestError` #7542\n\n### Breaking changes\n\n- Tracing: `azure.core.tracing.context` removed\n- Tracing: `azure.core.tracing.context.tracing_context.with_current_context` renamed to `azure.core.tracing.common.with_current_context` #7252\n- Tracing: `link` renamed `link_from_headers` and `link` takes now a string\n- Tracing: opencensus implementation has been moved to the package `azure-core-tracing-opencensus`\n- Some modules and classes that were importables from several different places have been removed:\n\n - `azure.core.HttpResponseError` is now only `azure.core.exceptions.HttpResponseError`\n - `azure.core.Configuration` is now only `azure.core.configuration.Configuration`\n - `azure.core.HttpRequest` is now only `azure.core.pipeline.transport.HttpRequest`\n - `azure.core.version` module has been removed. Use `azure.core.__version__` to get version number.\n - `azure.core.pipeline_client` has been removed. Import from `azure.core` instead.\n - `azure.core.pipeline_client_async` has been removed. Import from `azure.core` instead.\n - `azure.core.pipeline.base` has been removed. Import from `azure.core.pipeline` instead.\n - `azure.core.pipeline.base_async` has been removed. Import from `azure.core.pipeline` instead.\n - `azure.core.pipeline.policies.base` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.base_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.authentication` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.authentication_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.custom_hook` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.redirect` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.redirect_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.retry` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.retry_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.distributed_tracing` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.universal` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.tracing.abstract_span` has been removed. Import from `azure.core.tracing` instead.\n - `azure.core.pipeline.transport.base` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.base_async` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_basic` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_asyncio` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_trio` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.aiohttp` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.polling.poller` has been removed. Import from `azure.core.polling` instead.\n - `azure.core.polling.async_poller` has been removed. Import from `azure.core.polling` instead.\n\n## 1.0.0b3 (2019-09-09)\n\n### Bug fixes\n\n- Fix aiohttp auto-headers #6992\n- Add tracing to policies module init #6951\n\n## 1.0.0b2 (2019-08-05)\n\n### Breaking changes\n\n- Transport classes don't take `config` parameter anymore (use kwargs instead) #6372\n- `azure.core.paging` has been completely refactored #6420\n- HttpResponse.content_type attribute is now a string (was a list) #6490\n- For `StreamDownloadGenerator` subclasses, `response` is now an `HttpResponse`, and not a transport response like `aiohttp.ClientResponse` or `requests.Response`. The transport response is available in `internal_response` attribute #6490\n\n### Bug fixes\n\n- aiohttp is not required to import async pipelines classes #6496\n- `AsyncioRequestsTransport.sleep` is now a coroutine as expected #6490\n- `RequestsTransport` is not tight to `ProxyPolicy` implementation details anymore #6372\n- `AiohttpTransport` does not raise on unexpected kwargs #6355\n\n### Features\n\n- New paging base classes that support `continuation_token` and `by_page()` #6420\n- Proxy support for `AiohttpTransport` #6372\n\n## 1.0.0b1 (2019-06-26)\n\n- Preview 1 release", - "release_date": "2023-07-10T17:07:57", + "description": "Microsoft Azure Core Library for Python\n# Azure Core shared client library for Python\n\nAzure core provides shared exceptions and modules for Python SDK client libraries.\nThese libraries follow the [Azure SDK Design Guidelines for Python](https://azure.github.io/azure-sdk/python/guidelines/index.html) .\n\nIf you are a client library developer, please reference [client library developer reference](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md) for more information.\n\n[Source code](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/) \n| [Package (Pypi)][package]\n| [Package (Conda)](https://anaconda.org/microsoft/azure-core/)\n| [API reference documentation](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/)\n\n## _Disclaimer_\n\n_Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For more information and questions, please refer to _\n\n## Getting started\n\nTypically, you will not need to install azure core;\nit will be installed when you install one of the client libraries using it.\nIn case you want to install it explicitly (to implement your own client library, for example),\nyou can find it [here](https://pypi.org/project/azure-core/).\n\n## Key concepts\n\n### Azure Core Library Exceptions\n\n#### AzureError\n\nAzureError is the base exception for all errors.\n\n```python\nclass AzureError(Exception):\n def __init__(self, message, *args, **kwargs):\n self.inner_exception = kwargs.get(\"error\")\n self.exc_type, self.exc_value, self.exc_traceback = sys.exc_info()\n self.exc_type = self.exc_type.__name__ if self.exc_type else type(self.inner_exception)\n self.exc_msg = \"{}, {}: {}\".format(message, self.exc_type, self.exc_value) # type: ignore\n self.message = str(message)\n self.continuation_token = kwargs.get(\"continuation_token\")\n super(AzureError, self).__init__(self.message, *args)\n```\n\n*message* is any message (str) to be associated with the exception.\n\n*args* are any additional args to be included with exception.\n\n*kwargs* are keyword arguments to include with the exception. Use the keyword *error* to pass in an internal exception and *continuation_token* for a token reference to continue an incomplete operation.\n\n**The following exceptions inherit from AzureError:**\n\n#### ServiceRequestError\n\nAn error occurred while attempt to make a request to the service. No request was sent.\n\n#### ServiceResponseError\n\nThe request was sent, but the client failed to understand the response.\nThe connection may have timed out. These errors can be retried for idempotent or safe operations.\n\n#### HttpResponseError\n\nA request was made, and a non-success status code was received from the service.\n\n```python\nclass HttpResponseError(AzureError):\n def __init__(self, message=None, response=None, **kwargs):\n self.reason = None\n self.response = response\n if response:\n self.reason = response.reason\n self.status_code = response.status_code\n self.error = self._parse_odata_body(ODataV4Format, response) # type: Optional[ODataV4Format]\n if self.error:\n message = str(self.error)\n else:\n message = message or \"Operation returned an invalid status '{}'\".format(\n self.reason\n )\n\n super(HttpResponseError, self).__init__(message=message, **kwargs)\n```\n\n*message* is the HTTP response error message (optional)\n\n*response* is the HTTP response (optional).\n\n*kwargs* are keyword arguments to include with the exception.\n\n**The following exceptions inherit from HttpResponseError:**\n\n#### DecodeError\n\nAn error raised during response de-serialization.\n\n#### IncompleteReadError\n\nAn error raised if peer closes the connection before we have received the complete message body.\n\n#### ResourceExistsError\n\nAn error response with status code 4xx. This will not be raised directly by the Azure core pipeline.\n\n#### ResourceNotFoundError\n\nAn error response, typically triggered by a 412 response (for update) or 404 (for get/post).\n\n#### ResourceModifiedError\n\nAn error response with status code 4xx, typically 412 Conflict. This will not be raised directly by the Azure core pipeline.\n\n#### ResourceNotModifiedError\n\nAn error response with status code 304. This will not be raised directly by the Azure core pipeline.\n\n#### ClientAuthenticationError\n\nAn error response with status code 4xx. This will not be raised directly by the Azure core pipeline.\n\n#### TooManyRedirectsError\n\nAn error raised when the maximum number of redirect attempts is reached. The maximum amount of redirects can be configured in the RedirectPolicy.\n\n```python\nclass TooManyRedirectsError(HttpResponseError):\n def __init__(self, history, *args, **kwargs):\n self.history = history\n message = \"Reached maximum redirect attempts.\"\n super(TooManyRedirectsError, self).__init__(message, *args, **kwargs)\n```\n\n*history* is used to document the requests/responses that resulted in redirected requests.\n\n*args* are any additional args to be included with exception.\n\n*kwargs* are keyword arguments to include with the exception.\n\n#### StreamConsumedError\n\nAn error thrown if you try to access the stream of `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` once\nthe response stream has been consumed.\n\n#### StreamClosedError\n\nAn error thrown if you try to access the stream of the `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` once\nthe response stream has been closed.\n\n#### ResponseNotReadError\n\nAn error thrown if you try to access the `content` of `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` before\nreading in the response's bytes first.\n\n### Configurations\n\nWhen calling the methods, some properties can be configured by passing in as kwargs arguments.\n\n| Parameters | Description |\n| --- | --- |\n| headers | The HTTP Request headers. |\n| request_id | The request id to be added into header. |\n| user_agent | If specified, this will be added in front of the user agent string. |\n| logging_enable| Use to enable per operation. Defaults to `False`. |\n| logger | If specified, it will be used to log information. |\n| response_encoding | The encoding to use if known for this service (will disable auto-detection). |\n| proxies | Maps protocol or protocol and hostname to the URL of the proxy. |\n| raw_request_hook | Callback function. Will be invoked on request. |\n| raw_response_hook | Callback function. Will be invoked on response. |\n| network_span_namer | A callable to customize the span name. |\n| tracing_attributes | Attributes to set on all created spans. |\n| permit_redirects | Whether the client allows redirects. Defaults to `True`. |\n| redirect_max | The maximum allowed redirects. Defaults to `30`. |\n| retry_total | Total number of retries to allow. Takes precedence over other counts. Default value is `10`. |\n| retry_connect | How many connection-related errors to retry on. These are errors raised before the request is sent to the remote server, which we assume has not triggered the server to process the request. Default value is `3`. |\n| retry_read | How many times to retry on read errors. These errors are raised after the request was sent to the server, so the request may have side-effects. Default value is `3`. |\n| retry_status | How many times to retry on bad status codes. Default value is `3`. |\n| retry_backoff_factor | A backoff factor to apply between attempts after the second try (most errors are resolved immediately by a second try without a delay). Retry policy will sleep for: `{backoff factor} * (2 ** ({number of total retries} - 1))` seconds. If the backoff_factor is 0.1, then the retry will sleep for [0.0s, 0.2s, 0.4s, ...] between retries. The default value is `0.8`. |\n| retry_backoff_max | The maximum back off time. Default value is `120` seconds (2 minutes). |\n| retry_mode | Fixed or exponential delay between attempts, default is `Exponential`. |\n| timeout | Timeout setting for the operation in seconds, default is `604800`s (7 days). |\n| connection_timeout | A single float in seconds for the connection timeout. Defaults to `300` seconds. |\n| read_timeout | A single float in seconds for the read timeout. Defaults to `300` seconds. |\n| connection_verify | SSL certificate verification. Enabled by default. Set to False to disable, alternatively can be set to the path to a CA_BUNDLE file or directory with certificates of trusted CAs. |\n| connection_cert | Client-side certificates. You can specify a local cert to use as client side certificate, as a single file (containing the private key and the certificate) or as a tuple of both files' paths. |\n| proxies | Dictionary mapping protocol or protocol and hostname to the URL of the proxy. |\n| cookies | Dict or CookieJar object to send with the `Request`. |\n| connection_data_block_size | The block size of data sent over the connection. Defaults to `4096` bytes. |\n\n### Async transport\n\nThe async transport is designed to be opt-in. [AioHttp](https://pypi.org/project/aiohttp/) is one of the supported implementations of async transport. It is not installed by default. You need to install it separately.\n\n### Shared modules\n\n#### MatchConditions\n\nMatchConditions is an enum to describe match conditions.\n\n```python\nclass MatchConditions(Enum):\n Unconditionally = 1 # Matches any condition\n IfNotModified = 2 # If the target object is not modified. Usually it maps to etag=\n IfModified = 3 # Only if the target object is modified. Usually it maps to etag!=\n IfPresent = 4 # If the target object exists. Usually it maps to etag='*'\n IfMissing = 5 # If the target object does not exist. Usually it maps to etag!='*'\n```\n\n#### CaseInsensitiveEnumMeta\n\nA metaclass to support case-insensitive enums.\n\n```python\nfrom enum import Enum\n\nfrom azure.core import CaseInsensitiveEnumMeta\n\nclass MyCustomEnum(str, Enum, metaclass=CaseInsensitiveEnumMeta):\n FOO = 'foo'\n BAR = 'bar'\n```\n\n#### Null Sentinel Value\n\nA falsy sentinel object which is supposed to be used to specify attributes\nwith no data. This gets serialized to `null` on the wire.\n\n```python\nfrom azure.core.serialization import NULL\n\nassert bool(NULL) is False\n\nfoo = Foo(\n attr=NULL\n)\n```\n\n## Contributing\n\nThis project welcomes contributions and suggestions. Most contributions require\nyou to agree to a Contributor License Agreement (CLA) declaring that you have\nthe right to, and actually do, grant us the rights to use your contribution.\nFor details, visit [https://cla.microsoft.com](https://cla.microsoft.com).\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether\nyou need to provide a CLA and decorate the PR appropriately (e.g., label,\ncomment). Simply follow the instructions provided by the bot. You will only\nneed to do this once across all repos using our CLA.\n\nThis project has adopted the\n[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).\nFor more information, see the\n[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)\nor contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any\nadditional questions or comments.\n\n\n[package]: https://pypi.org/project/azure-core/\n\n\n# Release History\n\n## 1.29.4 (2023-09-07)\n\n### Bugs Fixed\n\n- Fixed the issue that some urls trigger an infinite loop. #31346\n- Fixed issue where IndexError was raised if multipart responses did not match the number of requests. #31471\n- Fixed issue unbound variable exception if dict is invalid in CloudEvent.from_dict. #31835\n- Fixed issue asyncBearerTokenCredentialPolicy is not backward compatible with SansIOHTTPPolicy. #31836\n- Fixed issue mypy complains with new version of azure-core. #31564\n\n## 1.29.3 (2023-08-22)\n\n### Bugs Fixed\n\n- Typing fix: `message` cannot be `None` in `AzureError`. #31564\n\n## 1.29.2 (2023-08-14)\n\n### Bugs Fixed\n\n- Added a default implementation for `AsyncTokenCredential.__aexit__()` #31573\n\n### Other Changes\n\n- Bumped `typing-extensions` version to 4.6.0.\n\n## 1.29.1 (2023-08-09)\n\n### Bugs Fixed\n\n- Not pass `enabled_cae` unless it is explicitly enabled.\n\n## 1.29.0 (2023-08-03)\n\n### Features Added\n\n- A keyword argument `enable_cae` was added to the `get_token` method of the `TokenCredential` protocol. #31012\n- `BearerTokenCredentialPolicy` and `AsyncBearerTokenCredentialPolicy` now accept `enable_cae` keyword arguments in their constructors. This is used in determining if [Continuous Access Evaluation (CAE)](https://learn.microsoft.com/azure/active-directory/conditional-access/concept-continuous-access-evaluation) should be enabled for each `get_token` request. #31012\n\n## 1.28.0 (2023-07-06)\n\n### Features Added\n\n- Added header name parameter to `RequestIdPolicy`. #30772\n- Added `SensitiveHeaderCleanupPolicy` that cleans up sensitive headers if a redirect happens and the new destination is in another domain. #28349\n\n### Other Changes\n\n- Catch aiohttp errors and translate them into azure-core errors.\n\n## 1.27.1 (2023-06-13)\n\n### Bugs Fixed\n\n- Fix url building for some complex query parameters scenarios #30707\n\n## 1.27.0 (2023-06-01)\n\n### Features Added\n\n- Added support to use sync credentials in `AsyncBearerTokenCredentialPolicy`. #30381\n- Added \"prefix\" parameter to AzureKeyCredentialPolicy #29901\n\n### Bugs Fixed\n\n- Improve error message when providing the wrong credential type for AzureKeyCredential #30380\n\n## 1.26.4 (2023-04-06)\n\n### Features Added\n\n- Updated settings to include OpenTelemetry as a tracer provider. #29095\n\n### Other Changes\n\n- Improved typing\n\n## 1.26.3 (2023-02-02)\n\n### Bugs Fixed\n\n- Fixed deflate decompression for aiohttp #28483\n\n## 1.26.2 (2023-01-05)\n\n### Bugs Fixed\n\n- Fix 'ClientSession' object has no attribute 'auto_decompress' (thanks to @mghextreme for the contribution)\n\n### Other Changes\n\n- Add \"x-ms-error-code\" as secure header to log\n- Rename \"DEFAULT_HEADERS_WHITELIST\" to \"DEFAULT_HEADERS_ALLOWLIST\". Added a backward compatible alias.\n\n## 1.26.1 (2022-11-03)\n\n### Other Changes\n\n- Added example of RequestsTransport with custom session. (thanks to @inirudebwoy for the contribution) #26768\n- Added Python 3.11 support.\n\n## 1.26.0 (2022-10-06)\n\n### Other Changes\n\n- LRO polling will not wait anymore before doing the first status check #26376\n- Added extra dependency for [aio]. pip install azure-core[aio] installs aiohttp too.\n\n## 1.25.1 (2022-09-01)\n\n### Bugs Fixed\n\n- Added @runtime_checkable to `TokenCredential` protocol definitions #25187\n\n## 1.25.0 (2022-08-04)\n\nAzure-core is supported on Python 3.7 or later. For more details, please read our page on [Azure SDK for Python version support policy](https://github.com/Azure/azure-sdk-for-python/wiki/Azure-SDKs-Python-version-support-policy).\n\n### Features Added\n\n- Added `CaseInsensitiveDict` implementation in `azure.core.utils` removing dependency on `requests` and `aiohttp`\n\n## 1.24.2 (2022-06-30)\n\n### Bugs Fixed\n\n- Fixed the bug that azure-core could not be imported under Python 3.11.0b3 #24928\n- `ContentDecodePolicy` can now correctly deserialize more JSON bodies with different mime types #22410\n\n## 1.24.1 (2022-06-01)\n\n### Bugs Fixed\n\n- Declare method level span as INTERNAL by default #24492\n- Fixed type hints for `azure.core.paging.ItemPaged` #24548\n\n## 1.24.0 (2022-05-06)\n\n### Features Added\n\n- Add `SerializationError` and `DeserializationError` in `azure.core.exceptions` for errors raised during serialization / deserialization #24312\n\n## 1.23.1 (2022-03-31)\n\n### Bugs Fixed\n\n- Allow stream inputs to the `content` kwarg of `azure.core.rest.HttpRequest` from objects with a `read` method #23578\n\n## 1.23.0 (2022-03-03)\n\n### Features Added\n\n- Improve intellisense type hinting for service client methods. #22891\n\n- Add a case insensitive dict `case_insensitive_dict` in `azure.core.utils`. #23206\n\n### Bugs Fixed\n\n- Use \"\\n\" rather than \"/n\" for new line in log. #23261\n\n### Other Changes\n\n- Log \"WWW-Authenticate\" header in `HttpLoggingPolicy` #22990\n- Added dependency on `typing-extensions` >= 4.0.1\n\n## 1.22.1 (2022-02-09)\n\n### Bugs Fixed\n\n- Limiting `final-state-via` scope to POST until consuming SDKs has been fixed to use this option properly on PUT. #22989\n\n## 1.22.0 (2022-02-03)\n_[**This version is deprecated.**]_\n\n### Features Added\n\n- Add support for `final-state-via` LRO option in core. #22713\n\n### Bugs Fixed\n\n- Add response body to string representation of `HttpResponseError` if we're not able to parse out information #22302\n- Raise `AttributeError` when calling azure.core.pipeline.transport.\\_\\_bases__ #22469\n\n### Other Changes\n\n- Python 2.7 is no longer supported. Please use Python version 3.6 or later.\n\n## 1.21.1 (2021-12-06)\n\n### Other Changes\n\n- Revert change in str method #22023\n\n## 1.21.0 (2021-12-02)\n\n### Breaking Changes\n\n- Sync stream downloading now raises `azure.core.exceptions.DecodeError` rather than `requests.exceptions.ContentDecodingError`\n\n### Bugs Fixed\n\n- Add response body to string representation of `HttpResponseError` if we're not able to parse out information #21800\n\n## 1.20.1 (2021-11-08)\n\n### Bugs Fixed\n\n- Correctly set response's content to decompressed body when users are using aiohttp transport with decompression headers #21620\n\n## 1.20.0 (2021-11-04)\n\n### Features Added\n\n- GA `send_request` onto the `azure.core.PipelineClient` and `azure.core.AsyncPipelineClient`. This method takes in\nrequests and sends them through our pipelines.\n- GA `azure.core.rest`. `azure.core.rest` is our new public simple HTTP library in `azure.core` that users will use to create requests, and consume responses.\n- GA errors `StreamConsumedError`, `StreamClosedError`, and `ResponseNotReadError` to `azure.core.exceptions`. These errors\nare thrown if you mishandle streamed responses from the `azure.core.rest` module\n- add kwargs to the methods for `iter_raw` and `iter_bytes` #21529\n- no longer raise JSON errors if users pass in file descriptors of JSON to the `json` kwarg in `HttpRequest` #21504\n- Added new error type `IncompleteReadError` which is raised if peer closes the connection before we have received the complete message body.\n\n### Breaking Changes\n\n- SansIOHTTPPolicy.on_exception returns None instead of bool.\n\n### Bugs Fixed\n\n- The `Content-Length` header in a http response is strictly checked against the actual number of bytes in the body,\n rather than silently truncating data in case the underlying tcp connection is closed prematurely.\n (thanks to @jochen-ott-by for the contribution) #20412\n- UnboundLocalError when SansIOHTTPPolicy handles an exception #15222\n- Add default content type header of `text/plain` and content length header for users who pass unicode strings to the `content` kwarg of `HttpRequest` in 2.7 #21550\n\n## 1.19.1 (2021-11-01)\n\n### Bugs Fixed\n\n- respect text encoding specified in argument (thanks to @ryohji for the contribution) #20796\n- Fix \"coroutine x.read() was never awaited\" warning from `ContentDecodePolicy` #21318\n- fix type check for `data` input to `azure.core.rest` for python 2.7 users #21341\n- use `charset_normalizer` if `chardet` is not installed to migrate aiohttp 3.8.0 changes.\n\n### Other Changes\n\n- Refactor AzureJSONEncoder (thanks to @Codejune for the contribution) #21028\n\n## 1.19.0 (2021-09-30)\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse` are now abstract base classes. They should not be initialized directly, instead\nyour transport responses should inherit from them and implement them.\n- The properties of the `azure.core.rest` responses are now all read-only\n\n- HttpLoggingPolicy integrates logs into one record #19925\n\n## 1.18.0 (2021-09-02)\n\n### Features Added\n\n- `azure.core.serialization.AzureJSONEncoder` (introduced in 1.17.0) serializes `datetime.datetime` objects in ISO 8601 format, conforming to RFC 3339's specification. #20190\n- We now use `azure.core.serialization.AzureJSONEncoder` to serialize `json` input to `azure.core.rest.HttpRequest`.\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- The `text` property on `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse` has changed to a method, which also takes\nan `encoding` parameter.\n- Removed `iter_text` and `iter_lines` from `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse`\n\n### Bugs Fixed\n\n- The behaviour of the headers returned in `azure.core.rest` responses now aligns across sync and async. Items can now be checked case-insensitively and without raising an error for format.\n\n## 1.17.0 (2021-08-05)\n\n### Features Added\n\n- Cut hard dependency on requests library\n- Added a `from_json` method which now accepts storage QueueMessage, eventhub's EventData or ServiceBusMessage or simply json bytes to return a `CloudEvent`\n\n### Fixed\n\n- Not override \"x-ms-client-request-id\" if it already exists in the header. #17757\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- `azure.core.rest` will not try to guess the `charset` anymore if it was impossible to extract it from `HttpResponse` analysis. This removes our dependency on `charset`.\n\n## 1.16.0 (2021-07-01)\n\n### Features Added\n\n- Add new ***provisional*** methods `send_request` onto the `azure.core.PipelineClient` and `azure.core.AsyncPipelineClient`. This method takes in\nrequests and sends them through our pipelines.\n- Add new ***provisional*** module `azure.core.rest`. `azure.core.rest` is our new public simple HTTP library in `azure.core` that users will use to create requests, and consume responses.\n- Add new ***provisional*** errors `StreamConsumedError`, `StreamClosedError`, and `ResponseNotReadError` to `azure.core.exceptions`. These errors\nare thrown if you mishandle streamed responses from the provisional `azure.core.rest` module\n\n### Fixed\n\n- Improved error message in the `from_dict` method of `CloudEvent` when a wrong schema is sent.\n\n## 1.15.0 (2021-06-04)\n\n### New Features\n\n- Added `BearerTokenCredentialPolicy.on_challenge` and `.authorize_request` to allow subclasses to optionally handle authentication challenges\n\n### Bug Fixes\n\n- Retry policies don't sleep after operations time out\n- The `from_dict` methhod in the `CloudEvent` can now convert a datetime string to datetime object when microsecond exceeds the python limitation\n\n## 1.14.0 (2021-05-13)\n\n### New Features\n\n- Added `azure.core.credentials.AzureNamedKeyCredential` credential #17548.\n- Added `decompress` parameter for `stream_download` method. If it is set to `False`, will not do decompression upon the stream. #17920\n\n## 1.13.0 (2021-04-02)\n\nAzure core requires Python 2.7 or Python 3.6+ since this release.\n\n### New Features\n\n- Added `azure.core.utils.parse_connection_string` function to parse connection strings across SDKs, with common validation and support for case insensitive keys.\n- Supported adding custom policies #16519\n- Added `~azure.core.tracing.Link` that should be used while passing `Links` to `AbstractSpan`.\n- `AbstractSpan` constructor can now take in additional keyword only args.\n\n### Bug fixes\n\n- Make NetworkTraceLoggingPolicy show the auth token in plain text. #14191\n- Fixed RetryPolicy overriding default connection timeout with an extreme value #17481\n\n## 1.12.0 (2021-03-08)\n\nThis version will be the last version to officially support Python 3.5, future versions will require Python 2.7 or Python 3.6+.\n\n### Features\n\n- Added `azure.core.messaging.CloudEvent` model that follows the cloud event spec.\n- Added `azure.core.serialization.NULL` sentinel value\n- Improve `repr`s for `HttpRequest` and `HttpResponse`s #16972\n\n### Bug Fixes\n\n- Disable retry in stream downloading. (thanks to @jochen-ott-by @hoffmann for the contribution) #16723\n\n## 1.11.0 (2021-02-08)\n\n### Features\n\n- Added `CaseInsensitiveEnumMeta` class for case-insensitive enums. #16316\n- Add `raise_for_status` method onto `HttpResponse`. Calling `response.raise_for_status()` on a response with an error code\nwill raise an `HttpResponseError`. Calling it on a good response will do nothing #16399\n\n### Bug Fixes\n\n- Update conn.conn_kw rather than overriding it when setting block size. (thanks for @jiasli for the contribution) #16587\n\n## 1.10.0 (2021-01-11)\n\n### Features\n\n- Added `AzureSasCredential` and its respective policy. #15946\n\n## 1.9.0 (2020-11-09)\n\n### Features\n\n- Add a `continuation_token` attribute to the base `AzureError` exception, and set this value for errors raised\n during paged or long-running operations.\n\n### Bug Fixes\n\n- Set retry_interval to 1 second instead of 1000 seconds (thanks **vbarbaresi** for contributing) #14357\n\n\n## 1.8.2 (2020-10-05)\n\n### Bug Fixes\n\n- Fixed bug to allow polling in the case of parameterized endpoints with relative polling urls #14097\n\n\n## 1.8.1 (2020-09-08)\n\n### Bug fixes\n\n- SAS credential replicated \"/\" fix #13159\n\n## 1.8.0 (2020-08-10)\n\n### Features\n\n- Support params as list for exploding parameters #12410\n\n\n## 1.7.0 (2020-07-06)\n\n### Bug fixes\n\n- `AzureKeyCredentialPolicy` will now accept (and ignore) passed in kwargs #11963\n- Better error messages if passed endpoint is incorrect #12106\n- Do not JSON encore a string if content type is \"text\" #12137\n\n### Features\n\n- Added `http_logging_policy` property on the `Configuration` object, allowing users to individually\nset the http logging policy of the config #12218\n\n## 1.6.0 (2020-06-03)\n\n### Bug fixes\n\n- Fixed deadlocks in AsyncBearerTokenCredentialPolicy #11543\n- Fix AttributeException in StreamDownloadGenerator #11462\n\n### Features\n\n- Added support for changesets as part of multipart message support #10485\n- Add AsyncLROPoller in azure.core.polling #10801\n- Add get_continuation_token/from_continuation_token/polling_method methods in pollers (sync and async) #10801\n- HttpResponse and PipelineContext objects are now pickable #10801\n\n## 1.5.0 (2020-05-04)\n\n### Features\n\n- Support \"x-ms-retry-after-ms\" in response header #10743\n- `link` and `link_from_headers` now accepts attributes #10765\n\n### Bug fixes\n\n- Not retry if the status code is less than 400 #10778\n- \"x-ms-request-id\" is not considered safe header for logging #10967\n\n## 1.4.0 (2020-04-06)\n\n### Features\n\n- Support a default error type in map_error #9773\n- Added `AzureKeyCredential` and its respective policy. #10509\n- Added `azure.core.polling.base_polling` module with a \"Microsoft One API\" polling implementation #10090\n Also contains the async version in `azure.core.polling.async_base_polling`\n- Support kwarg `enforce_https` to disable HTTPS check on authentication #9821\n- Support additional kwargs in `HttpRequest.set_multipart_mixed` that will be passed into pipeline context.\n\n## 1.3.0 (2020-03-09)\n\n### Bug fixes\n\n- Appended RequestIdPolicy to the default pipeline #9841\n- Rewind the body position in async_retry #10117\n\n### Features\n\n- Add raw_request_hook support in custom_hook_policy #9958\n- Add timeout support in retry_policy #10011\n- Add OdataV4 error format auto-parsing in all exceptions ('error' attribute) #9738\n\n## 1.2.2 (2020-02-10)\n\n### Bug fixes\n\n- Fixed a bug that sends None as request_id #9545\n- Enable mypy for customers #9572\n- Handle TypeError in deep copy #9620\n- Fix text/plain content-type in decoder #9589\n\n## 1.2.1 (2020-01-14)\n\n### Bug fixes\n\n- Fixed a regression in 1.2.0 that was incompatible with azure-keyvault-* 4.0.0\n[#9462](https://github.com/Azure/azure-sdk-for-python/issues/9462)\n\n\n## 1.2.0 (2020-01-14)\n\n### Features\n\n- Add user_agent & sdk_moniker kwargs in UserAgentPolicy init #9355\n- Support OPTIONS HTTP verb #9322\n- Add tracing_attributes to tracing decorator #9297\n- Support auto_request_id in RequestIdPolicy #9163\n- Support fixed retry #6419\n- Support \"retry-after-ms\" in response header #9240\n\n### Bug fixes\n\n- Removed `__enter__` and `__exit__` from async context managers #9313\n\n## 1.1.1 (2019-12-03)\n\n### Bug fixes\n\n- Bearer token authorization requires HTTPS\n- Rewind the body position in retry #8307\n\n## 1.1.0 (2019-11-25)\n\n### Features\n\n- New RequestIdPolicy #8437\n- Enable logging policy in default pipeline #8053\n- Normalize transport timeout. #8000\n Now we have:\n * 'connection_timeout' - a single float in seconds for the connection timeout. Default 5min\n * 'read_timeout' - a single float in seconds for the read timeout. Default 5min\n\n### Bug fixes\n\n- RequestHistory: deepcopy fails if request contains a stream #7732\n- Retry: retry raises error if response does not have http_response #8629\n- Client kwargs are now passed to DistributedTracingPolicy correctly #8051\n- NetworkLoggingPolicy now logs correctly all requests in case of retry #8262\n\n## 1.0.0 (2019-10-29)\n\n### Features\n\n- Tracing: DistributedTracingPolicy now accepts kwargs network_span_namer to change network span name #7773\n- Tracing: Implementation of AbstractSpan can now use the mixin HttpSpanMixin to get HTTP span update automatically #7773\n- Tracing: AbstractSpan contract \"change_context\" introduced #7773\n- Introduce new policy HttpLoggingPolicy #7988\n\n### Bug fixes\n\n- Fix AsyncioRequestsTransport if input stream is an async generator #7743\n- Fix form-data with aiohttp transport #7749\n\n### Breaking changes\n\n- Tracing: AbstractSpan.set_current_span is longer supported. Use change_context instead. #7773\n- azure.core.pipeline.policies.ContentDecodePolicy.deserialize_from_text changed\n\n## 1.0.0b4 (2019-10-07)\n\n### Features\n\n- Tracing: network span context is available with the TRACING_CONTEXT in pipeline response #7252\n- Tracing: Span contract now has `kind`, `traceparent` and is a context manager #7252\n- SansIOHTTPPolicy methods can now be coroutines #7497\n- Add multipart/mixed support #7083:\n\n - HttpRequest now has a \"set_multipart_mixed\" method to set the parts of this request\n - HttpRequest now has a \"prepare_multipart_body\" method to build final body.\n - HttpResponse now has a \"parts\" method to return an iterator of parts\n - AsyncHttpResponse now has a \"parts\" methods to return an async iterator of parts\n - Note that multipart/mixed is a Python 3.x only feature\n\n### Bug fixes\n\n- Tracing: policy cannot fail the pipeline, even in the worst condition #7252\n- Tracing: policy pass correctly status message if exception #7252\n- Tracing: incorrect span if exception raised from decorated function #7133\n- Fixed urllib3 ConnectTimeoutError being raised by Requests during a socket timeout. Now this exception is caught and wrapped as a `ServiceRequestError` #7542\n\n### Breaking changes\n\n- Tracing: `azure.core.tracing.context` removed\n- Tracing: `azure.core.tracing.context.tracing_context.with_current_context` renamed to `azure.core.tracing.common.with_current_context` #7252\n- Tracing: `link` renamed `link_from_headers` and `link` takes now a string\n- Tracing: opencensus implementation has been moved to the package `azure-core-tracing-opencensus`\n- Some modules and classes that were importables from several different places have been removed:\n\n - `azure.core.HttpResponseError` is now only `azure.core.exceptions.HttpResponseError`\n - `azure.core.Configuration` is now only `azure.core.configuration.Configuration`\n - `azure.core.HttpRequest` is now only `azure.core.pipeline.transport.HttpRequest`\n - `azure.core.version` module has been removed. Use `azure.core.__version__` to get version number.\n - `azure.core.pipeline_client` has been removed. Import from `azure.core` instead.\n - `azure.core.pipeline_client_async` has been removed. Import from `azure.core` instead.\n - `azure.core.pipeline.base` has been removed. Import from `azure.core.pipeline` instead.\n - `azure.core.pipeline.base_async` has been removed. Import from `azure.core.pipeline` instead.\n - `azure.core.pipeline.policies.base` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.base_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.authentication` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.authentication_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.custom_hook` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.redirect` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.redirect_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.retry` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.retry_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.distributed_tracing` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.universal` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.tracing.abstract_span` has been removed. Import from `azure.core.tracing` instead.\n - `azure.core.pipeline.transport.base` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.base_async` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_basic` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_asyncio` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_trio` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.aiohttp` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.polling.poller` has been removed. Import from `azure.core.polling` instead.\n - `azure.core.polling.async_poller` has been removed. Import from `azure.core.polling` instead.\n\n## 1.0.0b3 (2019-09-09)\n\n### Bug fixes\n\n- Fix aiohttp auto-headers #6992\n- Add tracing to policies module init #6951\n\n## 1.0.0b2 (2019-08-05)\n\n### Breaking changes\n\n- Transport classes don't take `config` parameter anymore (use kwargs instead) #6372\n- `azure.core.paging` has been completely refactored #6420\n- HttpResponse.content_type attribute is now a string (was a list) #6490\n- For `StreamDownloadGenerator` subclasses, `response` is now an `HttpResponse`, and not a transport response like `aiohttp.ClientResponse` or `requests.Response`. The transport response is available in `internal_response` attribute #6490\n\n### Bug fixes\n\n- aiohttp is not required to import async pipelines classes #6496\n- `AsyncioRequestsTransport.sleep` is now a coroutine as expected #6490\n- `RequestsTransport` is not tight to `ProxyPolicy` implementation details anymore #6372\n- `AiohttpTransport` does not raise on unexpected kwargs #6355\n\n### Features\n\n- New paging base classes that support `continuation_token` and `by_page()` #6420\n- Proxy support for `AiohttpTransport` #6372\n\n## 1.0.0b1 (2019-06-26)\n\n- Preview 1 release", + "release_date": "2023-09-07T19:49:16", "parties": [ { "type": "person", @@ -143,6 +143,8 @@ } ], "keywords": [ + "azure", + "azure sdk", "Development Status :: 5 - Production/Stable", "Programming Language :: Python", "Programming Language :: Python :: 3", @@ -154,11 +156,11 @@ "Programming Language :: Python :: 3.9" ], "homepage_url": "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/core/azure-core", - "download_url": "https://files.pythonhosted.org/packages/c3/0a/32b17d776a6bf5ddaa9dbad0e88de9d28a55bec1d37b8d408cc7d2e5e28d/azure_core-1.28.0-py3-none-any.whl", - "size": 185416, + "download_url": "https://files.pythonhosted.org/packages/98/3a/d53e2b8a75c448ef45d7ae4b0659eb6c0d48978f25a709e2a39894a48704/azure_core-1.29.4-py3-none-any.whl", + "size": 192407, "sha1": null, - "md5": "6779fa216aba34d22d1c6d9def843d94", - "sha256": "dec36dfc8eb0b052a853f30c07437effec2f9e3e1fc8f703d9bdaa5cfc0043d9", + "md5": "1f0d717524f9955ec5872834ae75c71a", + "sha256": "b03261bcba22c0b9290faf9999cedd23e849ed2577feee90515694cea6bc74bf", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -178,20 +180,20 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/azure-core/1.28.0/json", + "api_data_url": "https://pypi.org/pypi/azure-core/1.29.4/json", "datasource_id": null, - "purl": "pkg:pypi/azure-core@1.28.0" + "purl": "pkg:pypi/azure-core@1.29.4" }, { "type": "pypi", "namespace": null, "name": "azure-core", - "version": "1.28.0", + "version": "1.29.4", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "Microsoft Azure Core Library for Python\n# Azure Core shared client library for Python\n\nAzure core provides shared exceptions and modules for Python SDK client libraries.\nThese libraries follow the [Azure SDK Design Guidelines for Python](https://azure.github.io/azure-sdk/python/guidelines/index.html) .\n\nIf you are a client library developer, please reference [client library developer reference](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md) for more information.\n\n[Source code](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/) \n| [Package (Pypi)][package]\n| [Package (Conda)](https://anaconda.org/microsoft/azure-core/)\n| [API reference documentation](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/)\n\n## _Disclaimer_\n\n_Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For more information and questions, please refer to _\n\n## Getting started\n\nTypically, you will not need to install azure core;\nit will be installed when you install one of the client libraries using it.\nIn case you want to install it explicitly (to implement your own client library, for example),\nyou can find it [here](https://pypi.org/project/azure-core/).\n\n## Key concepts\n\n### Azure Core Library Exceptions\n\n#### AzureError\n\nAzureError is the base exception for all errors.\n\n```python\nclass AzureError(Exception):\n def __init__(self, message, *args, **kwargs):\n self.inner_exception = kwargs.get(\"error\")\n self.exc_type, self.exc_value, self.exc_traceback = sys.exc_info()\n self.exc_type = self.exc_type.__name__ if self.exc_type else type(self.inner_exception)\n self.exc_msg = \"{}, {}: {}\".format(message, self.exc_type, self.exc_value) # type: ignore\n self.message = str(message)\n self.continuation_token = kwargs.get(\"continuation_token\")\n super(AzureError, self).__init__(self.message, *args)\n```\n\n*message* is any message (str) to be associated with the exception.\n\n*args* are any additional args to be included with exception.\n\n*kwargs* are keyword arguments to include with the exception. Use the keyword *error* to pass in an internal exception and *continuation_token* for a token reference to continue an incomplete operation.\n\n**The following exceptions inherit from AzureError:**\n\n#### ServiceRequestError\n\nAn error occurred while attempt to make a request to the service. No request was sent.\n\n#### ServiceResponseError\n\nThe request was sent, but the client failed to understand the response.\nThe connection may have timed out. These errors can be retried for idempotent or safe operations.\n\n#### HttpResponseError\n\nA request was made, and a non-success status code was received from the service.\n\n```python\nclass HttpResponseError(AzureError):\n def __init__(self, message=None, response=None, **kwargs):\n self.reason = None\n self.response = response\n if response:\n self.reason = response.reason\n self.status_code = response.status_code\n self.error = self._parse_odata_body(ODataV4Format, response) # type: Optional[ODataV4Format]\n if self.error:\n message = str(self.error)\n else:\n message = message or \"Operation returned an invalid status '{}'\".format(\n self.reason\n )\n\n super(HttpResponseError, self).__init__(message=message, **kwargs)\n```\n\n*message* is the HTTP response error message (optional)\n\n*response* is the HTTP response (optional).\n\n*kwargs* are keyword arguments to include with the exception.\n\n**The following exceptions inherit from HttpResponseError:**\n\n#### DecodeError\n\nAn error raised during response de-serialization.\n\n#### IncompleteReadError\n\nAn error raised if peer closes the connection before we have received the complete message body.\n\n#### ResourceExistsError\n\nAn error response with status code 4xx. This will not be raised directly by the Azure core pipeline.\n\n#### ResourceNotFoundError\n\nAn error response, typically triggered by a 412 response (for update) or 404 (for get/post).\n\n#### ResourceModifiedError\n\nAn error response with status code 4xx, typically 412 Conflict. This will not be raised directly by the Azure core pipeline.\n\n#### ResourceNotModifiedError\n\nAn error response with status code 304. This will not be raised directly by the Azure core pipeline.\n\n#### ClientAuthenticationError\n\nAn error response with status code 4xx. This will not be raised directly by the Azure core pipeline.\n\n#### TooManyRedirectsError\n\nAn error raised when the maximum number of redirect attempts is reached. The maximum amount of redirects can be configured in the RedirectPolicy.\n\n```python\nclass TooManyRedirectsError(HttpResponseError):\n def __init__(self, history, *args, **kwargs):\n self.history = history\n message = \"Reached maximum redirect attempts.\"\n super(TooManyRedirectsError, self).__init__(message, *args, **kwargs)\n```\n\n*history* is used to document the requests/responses that resulted in redirected requests.\n\n*args* are any additional args to be included with exception.\n\n*kwargs* are keyword arguments to include with the exception.\n\n#### StreamConsumedError\n\nAn error thrown if you try to access the stream of `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` once\nthe response stream has been consumed.\n\n#### StreamClosedError\n\nAn error thrown if you try to access the stream of the `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` once\nthe response stream has been closed.\n\n#### ResponseNotReadError\n\nAn error thrown if you try to access the `content` of `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` before\nreading in the response's bytes first.\n\n### Configurations\n\nWhen calling the methods, some properties can be configured by passing in as kwargs arguments.\n\n| Parameters | Description |\n| --- | --- |\n| headers | The HTTP Request headers. |\n| request_id | The request id to be added into header. |\n| user_agent | If specified, this will be added in front of the user agent string. |\n| logging_enable| Use to enable per operation. Defaults to `False`. |\n| logger | If specified, it will be used to log information. |\n| response_encoding | The encoding to use if known for this service (will disable auto-detection). |\n| proxies | Maps protocol or protocol and hostname to the URL of the proxy. |\n| raw_request_hook | Callback function. Will be invoked on request. |\n| raw_response_hook | Callback function. Will be invoked on response. |\n| network_span_namer | A callable to customize the span name. |\n| tracing_attributes | Attributes to set on all created spans. |\n| permit_redirects | Whether the client allows redirects. Defaults to `True`. |\n| redirect_max | The maximum allowed redirects. Defaults to `30`. |\n| retry_total | Total number of retries to allow. Takes precedence over other counts. Default value is `10`. |\n| retry_connect | How many connection-related errors to retry on. These are errors raised before the request is sent to the remote server, which we assume has not triggered the server to process the request. Default value is `3`. |\n| retry_read | How many times to retry on read errors. These errors are raised after the request was sent to the server, so the request may have side-effects. Default value is `3`. |\n| retry_status | How many times to retry on bad status codes. Default value is `3`. |\n| retry_backoff_factor | A backoff factor to apply between attempts after the second try (most errors are resolved immediately by a second try without a delay). Retry policy will sleep for: `{backoff factor} * (2 ** ({number of total retries} - 1))` seconds. If the backoff_factor is 0.1, then the retry will sleep for [0.0s, 0.2s, 0.4s, ...] between retries. The default value is `0.8`. |\n| retry_backoff_max | The maximum back off time. Default value is `120` seconds (2 minutes). |\n| retry_mode | Fixed or exponential delay between attempts, default is `Exponential`. |\n| timeout | Timeout setting for the operation in seconds, default is `604800`s (7 days). |\n| connection_timeout | A single float in seconds for the connection timeout. Defaults to `300` seconds. |\n| read_timeout | A single float in seconds for the read timeout. Defaults to `300` seconds. |\n| connection_verify | SSL certificate verification. Enabled by default. Set to False to disable, alternatively can be set to the path to a CA_BUNDLE file or directory with certificates of trusted CAs. |\n| connection_cert | Client-side certificates. You can specify a local cert to use as client side certificate, as a single file (containing the private key and the certificate) or as a tuple of both files' paths. |\n| proxies | Dictionary mapping protocol or protocol and hostname to the URL of the proxy. |\n| cookies | Dict or CookieJar object to send with the `Request`. |\n| connection_data_block_size | The block size of data sent over the connection. Defaults to `4096` bytes. |\n\n### Async transport\n\nThe async transport is designed to be opt-in. [AioHttp](https://pypi.org/project/aiohttp/) is one of the supported implementations of async transport. It is not installed by default. You need to install it separately.\n\n### Shared modules\n\n#### MatchConditions\n\nMatchConditions is an enum to describe match conditions.\n\n```python\nclass MatchConditions(Enum):\n Unconditionally = 1 # Matches any condition\n IfNotModified = 2 # If the target object is not modified. Usually it maps to etag=\n IfModified = 3 # Only if the target object is modified. Usually it maps to etag!=\n IfPresent = 4 # If the target object exists. Usually it maps to etag='*'\n IfMissing = 5 # If the target object does not exist. Usually it maps to etag!='*'\n```\n\n#### CaseInsensitiveEnumMeta\n\nA metaclass to support case-insensitive enums.\n\n```python\nfrom enum import Enum\n\nfrom azure.core import CaseInsensitiveEnumMeta\n\nclass MyCustomEnum(str, Enum, metaclass=CaseInsensitiveEnumMeta):\n FOO = 'foo'\n BAR = 'bar'\n```\n\n#### Null Sentinel Value\n\nA falsy sentinel object which is supposed to be used to specify attributes\nwith no data. This gets serialized to `null` on the wire.\n\n```python\nfrom azure.core.serialization import NULL\n\nassert bool(NULL) is False\n\nfoo = Foo(\n attr=NULL\n)\n```\n\n## Contributing\n\nThis project welcomes contributions and suggestions. Most contributions require\nyou to agree to a Contributor License Agreement (CLA) declaring that you have\nthe right to, and actually do, grant us the rights to use your contribution.\nFor details, visit [https://cla.microsoft.com](https://cla.microsoft.com).\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether\nyou need to provide a CLA and decorate the PR appropriately (e.g., label,\ncomment). Simply follow the instructions provided by the bot. You will only\nneed to do this once across all repos using our CLA.\n\nThis project has adopted the\n[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).\nFor more information, see the\n[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)\nor contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any\nadditional questions or comments.\n\n\n[package]: https://pypi.org/project/azure-core/\n\n\n# Release History\n\n## 1.28.0 (2023-07-06)\n\n### Features Added\n\n- Added header name parameter to `RequestIdPolicy`. #30772\n- Added `SensitiveHeaderCleanupPolicy` that cleans up sensitive headers if a redirect happens and the new destination is in another domain. #28349\n\n### Other Changes\n\n- Catch aiohttp errors and translate them into azure-core errors.\n\n## 1.27.1 (2023-06-13)\n\n### Bugs Fixed\n\n- Fix url building for some complex query parameters scenarios #30707\n\n## 1.27.0 (2023-06-01)\n\n### Features Added\n\n- Added support to use sync credentials in `AsyncBearerTokenCredentialPolicy`. #30381\n- Added \"prefix\" parameter to AzureKeyCredentialPolicy #29901\n\n### Bugs Fixed\n\n- Improve error message when providing the wrong credential type for AzureKeyCredential #30380\n\n## 1.26.4 (2023-04-06)\n\n### Features Added\n\n- Updated settings to include OpenTelemetry as a tracer provider. #29095\n\n### Other Changes\n\n- Improved typing\n\n## 1.26.3 (2023-02-02)\n\n### Bugs Fixed\n\n- Fixed deflate decompression for aiohttp #28483\n\n## 1.26.2 (2023-01-05)\n\n### Bugs Fixed\n\n- Fix 'ClientSession' object has no attribute 'auto_decompress' (thanks to @mghextreme for the contribution)\n\n### Other Changes\n\n- Add \"x-ms-error-code\" as secure header to log\n- Rename \"DEFAULT_HEADERS_WHITELIST\" to \"DEFAULT_HEADERS_ALLOWLIST\". Added a backward compatible alias.\n\n## 1.26.1 (2022-11-03)\n\n### Other Changes\n\n- Added example of RequestsTransport with custom session. (thanks to @inirudebwoy for the contribution) #26768\n- Added Python 3.11 support.\n\n## 1.26.0 (2022-10-06)\n\n### Other Changes\n\n- LRO polling will not wait anymore before doing the first status check #26376\n- Added extra dependency for [aio]. pip install azure-core[aio] installs aiohttp too.\n\n## 1.25.1 (2022-09-01)\n\n### Bugs Fixed\n\n- Added @runtime_checkable to `TokenCredential` protocol definitions #25187\n\n## 1.25.0 (2022-08-04)\n\nAzure-core is supported on Python 3.7 or later. For more details, please read our page on [Azure SDK for Python version support policy](https://github.com/Azure/azure-sdk-for-python/wiki/Azure-SDKs-Python-version-support-policy).\n\n### Features Added\n\n- Added `CaseInsensitiveDict` implementation in `azure.core.utils` removing dependency on `requests` and `aiohttp`\n\n## 1.24.2 (2022-06-30)\n\n### Bugs Fixed\n\n- Fixed the bug that azure-core could not be imported under Python 3.11.0b3 #24928\n- `ContentDecodePolicy` can now correctly deserialize more JSON bodies with different mime types #22410\n\n## 1.24.1 (2022-06-01)\n\n### Bugs Fixed\n\n- Declare method level span as INTERNAL by default #24492\n- Fixed type hints for `azure.core.paging.ItemPaged` #24548\n\n## 1.24.0 (2022-05-06)\n\n### Features Added\n\n- Add `SerializationError` and `DeserializationError` in `azure.core.exceptions` for errors raised during serialization / deserialization #24312\n\n## 1.23.1 (2022-03-31)\n\n### Bugs Fixed\n\n- Allow stream inputs to the `content` kwarg of `azure.core.rest.HttpRequest` from objects with a `read` method #23578\n\n## 1.23.0 (2022-03-03)\n\n### Features Added\n\n- Improve intellisense type hinting for service client methods. #22891\n\n- Add a case insensitive dict `case_insensitive_dict` in `azure.core.utils`. #23206\n\n### Bugs Fixed\n\n- Use \"\\n\" rather than \"/n\" for new line in log. #23261\n\n### Other Changes\n\n- Log \"WWW-Authenticate\" header in `HttpLoggingPolicy` #22990\n- Added dependency on `typing-extensions` >= 4.0.1\n\n## 1.22.1 (2022-02-09)\n\n### Bugs Fixed\n\n- Limiting `final-state-via` scope to POST until consuming SDKs has been fixed to use this option properly on PUT. #22989\n\n## 1.22.0 (2022-02-03)\n_[**This version is deprecated.**]_\n\n### Features Added\n\n- Add support for `final-state-via` LRO option in core. #22713\n\n### Bugs Fixed\n\n- Add response body to string representation of `HttpResponseError` if we're not able to parse out information #22302\n- Raise `AttributeError` when calling azure.core.pipeline.transport.\\_\\_bases__ #22469\n\n### Other Changes\n\n- Python 2.7 is no longer supported. Please use Python version 3.6 or later.\n\n## 1.21.1 (2021-12-06)\n\n### Other Changes\n\n- Revert change in str method #22023\n\n## 1.21.0 (2021-12-02)\n\n### Breaking Changes\n\n- Sync stream downloading now raises `azure.core.exceptions.DecodeError` rather than `requests.exceptions.ContentDecodingError`\n\n### Bugs Fixed\n\n- Add response body to string representation of `HttpResponseError` if we're not able to parse out information #21800\n\n## 1.20.1 (2021-11-08)\n\n### Bugs Fixed\n\n- Correctly set response's content to decompressed body when users are using aiohttp transport with decompression headers #21620\n\n## 1.20.0 (2021-11-04)\n\n### Features Added\n\n- GA `send_request` onto the `azure.core.PipelineClient` and `azure.core.AsyncPipelineClient`. This method takes in\nrequests and sends them through our pipelines.\n- GA `azure.core.rest`. `azure.core.rest` is our new public simple HTTP library in `azure.core` that users will use to create requests, and consume responses.\n- GA errors `StreamConsumedError`, `StreamClosedError`, and `ResponseNotReadError` to `azure.core.exceptions`. These errors\nare thrown if you mishandle streamed responses from the `azure.core.rest` module\n- add kwargs to the methods for `iter_raw` and `iter_bytes` #21529\n- no longer raise JSON errors if users pass in file descriptors of JSON to the `json` kwarg in `HttpRequest` #21504\n- Added new error type `IncompleteReadError` which is raised if peer closes the connection before we have received the complete message body.\n\n### Breaking Changes\n\n- SansIOHTTPPolicy.on_exception returns None instead of bool.\n\n### Bugs Fixed\n\n- The `Content-Length` header in a http response is strictly checked against the actual number of bytes in the body,\n rather than silently truncating data in case the underlying tcp connection is closed prematurely.\n (thanks to @jochen-ott-by for the contribution) #20412\n- UnboundLocalError when SansIOHTTPPolicy handles an exception #15222\n- Add default content type header of `text/plain` and content length header for users who pass unicode strings to the `content` kwarg of `HttpRequest` in 2.7 #21550\n\n## 1.19.1 (2021-11-01)\n\n### Bugs Fixed\n\n- respect text encoding specified in argument (thanks to @ryohji for the contribution) #20796\n- Fix \"coroutine x.read() was never awaited\" warning from `ContentDecodePolicy` #21318\n- fix type check for `data` input to `azure.core.rest` for python 2.7 users #21341\n- use `charset_normalizer` if `chardet` is not installed to migrate aiohttp 3.8.0 changes.\n\n### Other Changes\n\n- Refactor AzureJSONEncoder (thanks to @Codejune for the contribution) #21028\n\n## 1.19.0 (2021-09-30)\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse` are now abstract base classes. They should not be initialized directly, instead\nyour transport responses should inherit from them and implement them.\n- The properties of the `azure.core.rest` responses are now all read-only\n\n- HttpLoggingPolicy integrates logs into one record #19925\n\n## 1.18.0 (2021-09-02)\n\n### Features Added\n\n- `azure.core.serialization.AzureJSONEncoder` (introduced in 1.17.0) serializes `datetime.datetime` objects in ISO 8601 format, conforming to RFC 3339's specification. #20190\n- We now use `azure.core.serialization.AzureJSONEncoder` to serialize `json` input to `azure.core.rest.HttpRequest`.\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- The `text` property on `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse` has changed to a method, which also takes\nan `encoding` parameter.\n- Removed `iter_text` and `iter_lines` from `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse`\n\n### Bugs Fixed\n\n- The behaviour of the headers returned in `azure.core.rest` responses now aligns across sync and async. Items can now be checked case-insensitively and without raising an error for format.\n\n## 1.17.0 (2021-08-05)\n\n### Features Added\n\n- Cut hard dependency on requests library\n- Added a `from_json` method which now accepts storage QueueMessage, eventhub's EventData or ServiceBusMessage or simply json bytes to return a `CloudEvent`\n\n### Fixed\n\n- Not override \"x-ms-client-request-id\" if it already exists in the header. #17757\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- `azure.core.rest` will not try to guess the `charset` anymore if it was impossible to extract it from `HttpResponse` analysis. This removes our dependency on `charset`.\n\n## 1.16.0 (2021-07-01)\n\n### Features Added\n\n- Add new ***provisional*** methods `send_request` onto the `azure.core.PipelineClient` and `azure.core.AsyncPipelineClient`. This method takes in\nrequests and sends them through our pipelines.\n- Add new ***provisional*** module `azure.core.rest`. `azure.core.rest` is our new public simple HTTP library in `azure.core` that users will use to create requests, and consume responses.\n- Add new ***provisional*** errors `StreamConsumedError`, `StreamClosedError`, and `ResponseNotReadError` to `azure.core.exceptions`. These errors\nare thrown if you mishandle streamed responses from the provisional `azure.core.rest` module\n\n### Fixed\n\n- Improved error message in the `from_dict` method of `CloudEvent` when a wrong schema is sent.\n\n## 1.15.0 (2021-06-04)\n\n### New Features\n\n- Added `BearerTokenCredentialPolicy.on_challenge` and `.authorize_request` to allow subclasses to optionally handle authentication challenges\n\n### Bug Fixes\n\n- Retry policies don't sleep after operations time out\n- The `from_dict` methhod in the `CloudEvent` can now convert a datetime string to datetime object when microsecond exceeds the python limitation\n\n## 1.14.0 (2021-05-13)\n\n### New Features\n\n- Added `azure.core.credentials.AzureNamedKeyCredential` credential #17548.\n- Added `decompress` parameter for `stream_download` method. If it is set to `False`, will not do decompression upon the stream. #17920\n\n## 1.13.0 (2021-04-02)\n\nAzure core requires Python 2.7 or Python 3.6+ since this release.\n\n### New Features\n\n- Added `azure.core.utils.parse_connection_string` function to parse connection strings across SDKs, with common validation and support for case insensitive keys.\n- Supported adding custom policies #16519\n- Added `~azure.core.tracing.Link` that should be used while passing `Links` to `AbstractSpan`.\n- `AbstractSpan` constructor can now take in additional keyword only args.\n\n### Bug fixes\n\n- Make NetworkTraceLoggingPolicy show the auth token in plain text. #14191\n- Fixed RetryPolicy overriding default connection timeout with an extreme value #17481\n\n## 1.12.0 (2021-03-08)\n\nThis version will be the last version to officially support Python 3.5, future versions will require Python 2.7 or Python 3.6+.\n\n### Features\n\n- Added `azure.core.messaging.CloudEvent` model that follows the cloud event spec.\n- Added `azure.core.serialization.NULL` sentinel value\n- Improve `repr`s for `HttpRequest` and `HttpResponse`s #16972\n\n### Bug Fixes\n\n- Disable retry in stream downloading. (thanks to @jochen-ott-by @hoffmann for the contribution) #16723\n\n## 1.11.0 (2021-02-08)\n\n### Features\n\n- Added `CaseInsensitiveEnumMeta` class for case-insensitive enums. #16316\n- Add `raise_for_status` method onto `HttpResponse`. Calling `response.raise_for_status()` on a response with an error code\nwill raise an `HttpResponseError`. Calling it on a good response will do nothing #16399\n\n### Bug Fixes\n\n- Update conn.conn_kw rather than overriding it when setting block size. (thanks for @jiasli for the contribution) #16587\n\n## 1.10.0 (2021-01-11)\n\n### Features\n\n- Added `AzureSasCredential` and its respective policy. #15946\n\n## 1.9.0 (2020-11-09)\n\n### Features\n\n- Add a `continuation_token` attribute to the base `AzureError` exception, and set this value for errors raised\n during paged or long-running operations.\n\n### Bug Fixes\n\n- Set retry_interval to 1 second instead of 1000 seconds (thanks **vbarbaresi** for contributing) #14357\n\n\n## 1.8.2 (2020-10-05)\n\n### Bug Fixes\n\n- Fixed bug to allow polling in the case of parameterized endpoints with relative polling urls #14097\n\n\n## 1.8.1 (2020-09-08)\n\n### Bug fixes\n\n- SAS credential replicated \"/\" fix #13159\n\n## 1.8.0 (2020-08-10)\n\n### Features\n\n- Support params as list for exploding parameters #12410\n\n\n## 1.7.0 (2020-07-06)\n\n### Bug fixes\n\n- `AzureKeyCredentialPolicy` will now accept (and ignore) passed in kwargs #11963\n- Better error messages if passed endpoint is incorrect #12106\n- Do not JSON encore a string if content type is \"text\" #12137\n\n### Features\n\n- Added `http_logging_policy` property on the `Configuration` object, allowing users to individually\nset the http logging policy of the config #12218\n\n## 1.6.0 (2020-06-03)\n\n### Bug fixes\n\n- Fixed deadlocks in AsyncBearerTokenCredentialPolicy #11543\n- Fix AttributeException in StreamDownloadGenerator #11462\n\n### Features\n\n- Added support for changesets as part of multipart message support #10485\n- Add AsyncLROPoller in azure.core.polling #10801\n- Add get_continuation_token/from_continuation_token/polling_method methods in pollers (sync and async) #10801\n- HttpResponse and PipelineContext objects are now pickable #10801\n\n## 1.5.0 (2020-05-04)\n\n### Features\n\n- Support \"x-ms-retry-after-ms\" in response header #10743\n- `link` and `link_from_headers` now accepts attributes #10765\n\n### Bug fixes\n\n- Not retry if the status code is less than 400 #10778\n- \"x-ms-request-id\" is not considered safe header for logging #10967\n\n## 1.4.0 (2020-04-06)\n\n### Features\n\n- Support a default error type in map_error #9773\n- Added `AzureKeyCredential` and its respective policy. #10509\n- Added `azure.core.polling.base_polling` module with a \"Microsoft One API\" polling implementation #10090\n Also contains the async version in `azure.core.polling.async_base_polling`\n- Support kwarg `enforce_https` to disable HTTPS check on authentication #9821\n- Support additional kwargs in `HttpRequest.set_multipart_mixed` that will be passed into pipeline context.\n\n## 1.3.0 (2020-03-09)\n\n### Bug fixes\n\n- Appended RequestIdPolicy to the default pipeline #9841\n- Rewind the body position in async_retry #10117\n\n### Features\n\n- Add raw_request_hook support in custom_hook_policy #9958\n- Add timeout support in retry_policy #10011\n- Add OdataV4 error format auto-parsing in all exceptions ('error' attribute) #9738\n\n## 1.2.2 (2020-02-10)\n\n### Bug fixes\n\n- Fixed a bug that sends None as request_id #9545\n- Enable mypy for customers #9572\n- Handle TypeError in deep copy #9620\n- Fix text/plain content-type in decoder #9589\n\n## 1.2.1 (2020-01-14)\n\n### Bug fixes\n\n- Fixed a regression in 1.2.0 that was incompatible with azure-keyvault-* 4.0.0\n[#9462](https://github.com/Azure/azure-sdk-for-python/issues/9462)\n\n\n## 1.2.0 (2020-01-14)\n\n### Features\n\n- Add user_agent & sdk_moniker kwargs in UserAgentPolicy init #9355\n- Support OPTIONS HTTP verb #9322\n- Add tracing_attributes to tracing decorator #9297\n- Support auto_request_id in RequestIdPolicy #9163\n- Support fixed retry #6419\n- Support \"retry-after-ms\" in response header #9240\n\n### Bug fixes\n\n- Removed `__enter__` and `__exit__` from async context managers #9313\n\n## 1.1.1 (2019-12-03)\n\n### Bug fixes\n\n- Bearer token authorization requires HTTPS\n- Rewind the body position in retry #8307\n\n## 1.1.0 (2019-11-25)\n\n### Features\n\n- New RequestIdPolicy #8437\n- Enable logging policy in default pipeline #8053\n- Normalize transport timeout. #8000\n Now we have:\n * 'connection_timeout' - a single float in seconds for the connection timeout. Default 5min\n * 'read_timeout' - a single float in seconds for the read timeout. Default 5min\n\n### Bug fixes\n\n- RequestHistory: deepcopy fails if request contains a stream #7732\n- Retry: retry raises error if response does not have http_response #8629\n- Client kwargs are now passed to DistributedTracingPolicy correctly #8051\n- NetworkLoggingPolicy now logs correctly all requests in case of retry #8262\n\n## 1.0.0 (2019-10-29)\n\n### Features\n\n- Tracing: DistributedTracingPolicy now accepts kwargs network_span_namer to change network span name #7773\n- Tracing: Implementation of AbstractSpan can now use the mixin HttpSpanMixin to get HTTP span update automatically #7773\n- Tracing: AbstractSpan contract \"change_context\" introduced #7773\n- Introduce new policy HttpLoggingPolicy #7988\n\n### Bug fixes\n\n- Fix AsyncioRequestsTransport if input stream is an async generator #7743\n- Fix form-data with aiohttp transport #7749\n\n### Breaking changes\n\n- Tracing: AbstractSpan.set_current_span is longer supported. Use change_context instead. #7773\n- azure.core.pipeline.policies.ContentDecodePolicy.deserialize_from_text changed\n\n## 1.0.0b4 (2019-10-07)\n\n### Features\n\n- Tracing: network span context is available with the TRACING_CONTEXT in pipeline response #7252\n- Tracing: Span contract now has `kind`, `traceparent` and is a context manager #7252\n- SansIOHTTPPolicy methods can now be coroutines #7497\n- Add multipart/mixed support #7083:\n\n - HttpRequest now has a \"set_multipart_mixed\" method to set the parts of this request\n - HttpRequest now has a \"prepare_multipart_body\" method to build final body.\n - HttpResponse now has a \"parts\" method to return an iterator of parts\n - AsyncHttpResponse now has a \"parts\" methods to return an async iterator of parts\n - Note that multipart/mixed is a Python 3.x only feature\n\n### Bug fixes\n\n- Tracing: policy cannot fail the pipeline, even in the worst condition #7252\n- Tracing: policy pass correctly status message if exception #7252\n- Tracing: incorrect span if exception raised from decorated function #7133\n- Fixed urllib3 ConnectTimeoutError being raised by Requests during a socket timeout. Now this exception is caught and wrapped as a `ServiceRequestError` #7542\n\n### Breaking changes\n\n- Tracing: `azure.core.tracing.context` removed\n- Tracing: `azure.core.tracing.context.tracing_context.with_current_context` renamed to `azure.core.tracing.common.with_current_context` #7252\n- Tracing: `link` renamed `link_from_headers` and `link` takes now a string\n- Tracing: opencensus implementation has been moved to the package `azure-core-tracing-opencensus`\n- Some modules and classes that were importables from several different places have been removed:\n\n - `azure.core.HttpResponseError` is now only `azure.core.exceptions.HttpResponseError`\n - `azure.core.Configuration` is now only `azure.core.configuration.Configuration`\n - `azure.core.HttpRequest` is now only `azure.core.pipeline.transport.HttpRequest`\n - `azure.core.version` module has been removed. Use `azure.core.__version__` to get version number.\n - `azure.core.pipeline_client` has been removed. Import from `azure.core` instead.\n - `azure.core.pipeline_client_async` has been removed. Import from `azure.core` instead.\n - `azure.core.pipeline.base` has been removed. Import from `azure.core.pipeline` instead.\n - `azure.core.pipeline.base_async` has been removed. Import from `azure.core.pipeline` instead.\n - `azure.core.pipeline.policies.base` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.base_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.authentication` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.authentication_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.custom_hook` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.redirect` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.redirect_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.retry` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.retry_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.distributed_tracing` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.universal` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.tracing.abstract_span` has been removed. Import from `azure.core.tracing` instead.\n - `azure.core.pipeline.transport.base` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.base_async` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_basic` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_asyncio` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_trio` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.aiohttp` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.polling.poller` has been removed. Import from `azure.core.polling` instead.\n - `azure.core.polling.async_poller` has been removed. Import from `azure.core.polling` instead.\n\n## 1.0.0b3 (2019-09-09)\n\n### Bug fixes\n\n- Fix aiohttp auto-headers #6992\n- Add tracing to policies module init #6951\n\n## 1.0.0b2 (2019-08-05)\n\n### Breaking changes\n\n- Transport classes don't take `config` parameter anymore (use kwargs instead) #6372\n- `azure.core.paging` has been completely refactored #6420\n- HttpResponse.content_type attribute is now a string (was a list) #6490\n- For `StreamDownloadGenerator` subclasses, `response` is now an `HttpResponse`, and not a transport response like `aiohttp.ClientResponse` or `requests.Response`. The transport response is available in `internal_response` attribute #6490\n\n### Bug fixes\n\n- aiohttp is not required to import async pipelines classes #6496\n- `AsyncioRequestsTransport.sleep` is now a coroutine as expected #6490\n- `RequestsTransport` is not tight to `ProxyPolicy` implementation details anymore #6372\n- `AiohttpTransport` does not raise on unexpected kwargs #6355\n\n### Features\n\n- New paging base classes that support `continuation_token` and `by_page()` #6420\n- Proxy support for `AiohttpTransport` #6372\n\n## 1.0.0b1 (2019-06-26)\n\n- Preview 1 release", - "release_date": "2023-07-10T17:07:55", + "description": "Microsoft Azure Core Library for Python\n# Azure Core shared client library for Python\n\nAzure core provides shared exceptions and modules for Python SDK client libraries.\nThese libraries follow the [Azure SDK Design Guidelines for Python](https://azure.github.io/azure-sdk/python/guidelines/index.html) .\n\nIf you are a client library developer, please reference [client library developer reference](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md) for more information.\n\n[Source code](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/) \n| [Package (Pypi)][package]\n| [Package (Conda)](https://anaconda.org/microsoft/azure-core/)\n| [API reference documentation](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/)\n\n## _Disclaimer_\n\n_Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For more information and questions, please refer to _\n\n## Getting started\n\nTypically, you will not need to install azure core;\nit will be installed when you install one of the client libraries using it.\nIn case you want to install it explicitly (to implement your own client library, for example),\nyou can find it [here](https://pypi.org/project/azure-core/).\n\n## Key concepts\n\n### Azure Core Library Exceptions\n\n#### AzureError\n\nAzureError is the base exception for all errors.\n\n```python\nclass AzureError(Exception):\n def __init__(self, message, *args, **kwargs):\n self.inner_exception = kwargs.get(\"error\")\n self.exc_type, self.exc_value, self.exc_traceback = sys.exc_info()\n self.exc_type = self.exc_type.__name__ if self.exc_type else type(self.inner_exception)\n self.exc_msg = \"{}, {}: {}\".format(message, self.exc_type, self.exc_value) # type: ignore\n self.message = str(message)\n self.continuation_token = kwargs.get(\"continuation_token\")\n super(AzureError, self).__init__(self.message, *args)\n```\n\n*message* is any message (str) to be associated with the exception.\n\n*args* are any additional args to be included with exception.\n\n*kwargs* are keyword arguments to include with the exception. Use the keyword *error* to pass in an internal exception and *continuation_token* for a token reference to continue an incomplete operation.\n\n**The following exceptions inherit from AzureError:**\n\n#### ServiceRequestError\n\nAn error occurred while attempt to make a request to the service. No request was sent.\n\n#### ServiceResponseError\n\nThe request was sent, but the client failed to understand the response.\nThe connection may have timed out. These errors can be retried for idempotent or safe operations.\n\n#### HttpResponseError\n\nA request was made, and a non-success status code was received from the service.\n\n```python\nclass HttpResponseError(AzureError):\n def __init__(self, message=None, response=None, **kwargs):\n self.reason = None\n self.response = response\n if response:\n self.reason = response.reason\n self.status_code = response.status_code\n self.error = self._parse_odata_body(ODataV4Format, response) # type: Optional[ODataV4Format]\n if self.error:\n message = str(self.error)\n else:\n message = message or \"Operation returned an invalid status '{}'\".format(\n self.reason\n )\n\n super(HttpResponseError, self).__init__(message=message, **kwargs)\n```\n\n*message* is the HTTP response error message (optional)\n\n*response* is the HTTP response (optional).\n\n*kwargs* are keyword arguments to include with the exception.\n\n**The following exceptions inherit from HttpResponseError:**\n\n#### DecodeError\n\nAn error raised during response de-serialization.\n\n#### IncompleteReadError\n\nAn error raised if peer closes the connection before we have received the complete message body.\n\n#### ResourceExistsError\n\nAn error response with status code 4xx. This will not be raised directly by the Azure core pipeline.\n\n#### ResourceNotFoundError\n\nAn error response, typically triggered by a 412 response (for update) or 404 (for get/post).\n\n#### ResourceModifiedError\n\nAn error response with status code 4xx, typically 412 Conflict. This will not be raised directly by the Azure core pipeline.\n\n#### ResourceNotModifiedError\n\nAn error response with status code 304. This will not be raised directly by the Azure core pipeline.\n\n#### ClientAuthenticationError\n\nAn error response with status code 4xx. This will not be raised directly by the Azure core pipeline.\n\n#### TooManyRedirectsError\n\nAn error raised when the maximum number of redirect attempts is reached. The maximum amount of redirects can be configured in the RedirectPolicy.\n\n```python\nclass TooManyRedirectsError(HttpResponseError):\n def __init__(self, history, *args, **kwargs):\n self.history = history\n message = \"Reached maximum redirect attempts.\"\n super(TooManyRedirectsError, self).__init__(message, *args, **kwargs)\n```\n\n*history* is used to document the requests/responses that resulted in redirected requests.\n\n*args* are any additional args to be included with exception.\n\n*kwargs* are keyword arguments to include with the exception.\n\n#### StreamConsumedError\n\nAn error thrown if you try to access the stream of `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` once\nthe response stream has been consumed.\n\n#### StreamClosedError\n\nAn error thrown if you try to access the stream of the `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` once\nthe response stream has been closed.\n\n#### ResponseNotReadError\n\nAn error thrown if you try to access the `content` of `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` before\nreading in the response's bytes first.\n\n### Configurations\n\nWhen calling the methods, some properties can be configured by passing in as kwargs arguments.\n\n| Parameters | Description |\n| --- | --- |\n| headers | The HTTP Request headers. |\n| request_id | The request id to be added into header. |\n| user_agent | If specified, this will be added in front of the user agent string. |\n| logging_enable| Use to enable per operation. Defaults to `False`. |\n| logger | If specified, it will be used to log information. |\n| response_encoding | The encoding to use if known for this service (will disable auto-detection). |\n| proxies | Maps protocol or protocol and hostname to the URL of the proxy. |\n| raw_request_hook | Callback function. Will be invoked on request. |\n| raw_response_hook | Callback function. Will be invoked on response. |\n| network_span_namer | A callable to customize the span name. |\n| tracing_attributes | Attributes to set on all created spans. |\n| permit_redirects | Whether the client allows redirects. Defaults to `True`. |\n| redirect_max | The maximum allowed redirects. Defaults to `30`. |\n| retry_total | Total number of retries to allow. Takes precedence over other counts. Default value is `10`. |\n| retry_connect | How many connection-related errors to retry on. These are errors raised before the request is sent to the remote server, which we assume has not triggered the server to process the request. Default value is `3`. |\n| retry_read | How many times to retry on read errors. These errors are raised after the request was sent to the server, so the request may have side-effects. Default value is `3`. |\n| retry_status | How many times to retry on bad status codes. Default value is `3`. |\n| retry_backoff_factor | A backoff factor to apply between attempts after the second try (most errors are resolved immediately by a second try without a delay). Retry policy will sleep for: `{backoff factor} * (2 ** ({number of total retries} - 1))` seconds. If the backoff_factor is 0.1, then the retry will sleep for [0.0s, 0.2s, 0.4s, ...] between retries. The default value is `0.8`. |\n| retry_backoff_max | The maximum back off time. Default value is `120` seconds (2 minutes). |\n| retry_mode | Fixed or exponential delay between attempts, default is `Exponential`. |\n| timeout | Timeout setting for the operation in seconds, default is `604800`s (7 days). |\n| connection_timeout | A single float in seconds for the connection timeout. Defaults to `300` seconds. |\n| read_timeout | A single float in seconds for the read timeout. Defaults to `300` seconds. |\n| connection_verify | SSL certificate verification. Enabled by default. Set to False to disable, alternatively can be set to the path to a CA_BUNDLE file or directory with certificates of trusted CAs. |\n| connection_cert | Client-side certificates. You can specify a local cert to use as client side certificate, as a single file (containing the private key and the certificate) or as a tuple of both files' paths. |\n| proxies | Dictionary mapping protocol or protocol and hostname to the URL of the proxy. |\n| cookies | Dict or CookieJar object to send with the `Request`. |\n| connection_data_block_size | The block size of data sent over the connection. Defaults to `4096` bytes. |\n\n### Async transport\n\nThe async transport is designed to be opt-in. [AioHttp](https://pypi.org/project/aiohttp/) is one of the supported implementations of async transport. It is not installed by default. You need to install it separately.\n\n### Shared modules\n\n#### MatchConditions\n\nMatchConditions is an enum to describe match conditions.\n\n```python\nclass MatchConditions(Enum):\n Unconditionally = 1 # Matches any condition\n IfNotModified = 2 # If the target object is not modified. Usually it maps to etag=\n IfModified = 3 # Only if the target object is modified. Usually it maps to etag!=\n IfPresent = 4 # If the target object exists. Usually it maps to etag='*'\n IfMissing = 5 # If the target object does not exist. Usually it maps to etag!='*'\n```\n\n#### CaseInsensitiveEnumMeta\n\nA metaclass to support case-insensitive enums.\n\n```python\nfrom enum import Enum\n\nfrom azure.core import CaseInsensitiveEnumMeta\n\nclass MyCustomEnum(str, Enum, metaclass=CaseInsensitiveEnumMeta):\n FOO = 'foo'\n BAR = 'bar'\n```\n\n#### Null Sentinel Value\n\nA falsy sentinel object which is supposed to be used to specify attributes\nwith no data. This gets serialized to `null` on the wire.\n\n```python\nfrom azure.core.serialization import NULL\n\nassert bool(NULL) is False\n\nfoo = Foo(\n attr=NULL\n)\n```\n\n## Contributing\n\nThis project welcomes contributions and suggestions. Most contributions require\nyou to agree to a Contributor License Agreement (CLA) declaring that you have\nthe right to, and actually do, grant us the rights to use your contribution.\nFor details, visit [https://cla.microsoft.com](https://cla.microsoft.com).\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether\nyou need to provide a CLA and decorate the PR appropriately (e.g., label,\ncomment). Simply follow the instructions provided by the bot. You will only\nneed to do this once across all repos using our CLA.\n\nThis project has adopted the\n[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).\nFor more information, see the\n[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)\nor contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any\nadditional questions or comments.\n\n\n[package]: https://pypi.org/project/azure-core/\n\n\n# Release History\n\n## 1.29.4 (2023-09-07)\n\n### Bugs Fixed\n\n- Fixed the issue that some urls trigger an infinite loop. #31346\n- Fixed issue where IndexError was raised if multipart responses did not match the number of requests. #31471\n- Fixed issue unbound variable exception if dict is invalid in CloudEvent.from_dict. #31835\n- Fixed issue asyncBearerTokenCredentialPolicy is not backward compatible with SansIOHTTPPolicy. #31836\n- Fixed issue mypy complains with new version of azure-core. #31564\n\n## 1.29.3 (2023-08-22)\n\n### Bugs Fixed\n\n- Typing fix: `message` cannot be `None` in `AzureError`. #31564\n\n## 1.29.2 (2023-08-14)\n\n### Bugs Fixed\n\n- Added a default implementation for `AsyncTokenCredential.__aexit__()` #31573\n\n### Other Changes\n\n- Bumped `typing-extensions` version to 4.6.0.\n\n## 1.29.1 (2023-08-09)\n\n### Bugs Fixed\n\n- Not pass `enabled_cae` unless it is explicitly enabled.\n\n## 1.29.0 (2023-08-03)\n\n### Features Added\n\n- A keyword argument `enable_cae` was added to the `get_token` method of the `TokenCredential` protocol. #31012\n- `BearerTokenCredentialPolicy` and `AsyncBearerTokenCredentialPolicy` now accept `enable_cae` keyword arguments in their constructors. This is used in determining if [Continuous Access Evaluation (CAE)](https://learn.microsoft.com/azure/active-directory/conditional-access/concept-continuous-access-evaluation) should be enabled for each `get_token` request. #31012\n\n## 1.28.0 (2023-07-06)\n\n### Features Added\n\n- Added header name parameter to `RequestIdPolicy`. #30772\n- Added `SensitiveHeaderCleanupPolicy` that cleans up sensitive headers if a redirect happens and the new destination is in another domain. #28349\n\n### Other Changes\n\n- Catch aiohttp errors and translate them into azure-core errors.\n\n## 1.27.1 (2023-06-13)\n\n### Bugs Fixed\n\n- Fix url building for some complex query parameters scenarios #30707\n\n## 1.27.0 (2023-06-01)\n\n### Features Added\n\n- Added support to use sync credentials in `AsyncBearerTokenCredentialPolicy`. #30381\n- Added \"prefix\" parameter to AzureKeyCredentialPolicy #29901\n\n### Bugs Fixed\n\n- Improve error message when providing the wrong credential type for AzureKeyCredential #30380\n\n## 1.26.4 (2023-04-06)\n\n### Features Added\n\n- Updated settings to include OpenTelemetry as a tracer provider. #29095\n\n### Other Changes\n\n- Improved typing\n\n## 1.26.3 (2023-02-02)\n\n### Bugs Fixed\n\n- Fixed deflate decompression for aiohttp #28483\n\n## 1.26.2 (2023-01-05)\n\n### Bugs Fixed\n\n- Fix 'ClientSession' object has no attribute 'auto_decompress' (thanks to @mghextreme for the contribution)\n\n### Other Changes\n\n- Add \"x-ms-error-code\" as secure header to log\n- Rename \"DEFAULT_HEADERS_WHITELIST\" to \"DEFAULT_HEADERS_ALLOWLIST\". Added a backward compatible alias.\n\n## 1.26.1 (2022-11-03)\n\n### Other Changes\n\n- Added example of RequestsTransport with custom session. (thanks to @inirudebwoy for the contribution) #26768\n- Added Python 3.11 support.\n\n## 1.26.0 (2022-10-06)\n\n### Other Changes\n\n- LRO polling will not wait anymore before doing the first status check #26376\n- Added extra dependency for [aio]. pip install azure-core[aio] installs aiohttp too.\n\n## 1.25.1 (2022-09-01)\n\n### Bugs Fixed\n\n- Added @runtime_checkable to `TokenCredential` protocol definitions #25187\n\n## 1.25.0 (2022-08-04)\n\nAzure-core is supported on Python 3.7 or later. For more details, please read our page on [Azure SDK for Python version support policy](https://github.com/Azure/azure-sdk-for-python/wiki/Azure-SDKs-Python-version-support-policy).\n\n### Features Added\n\n- Added `CaseInsensitiveDict` implementation in `azure.core.utils` removing dependency on `requests` and `aiohttp`\n\n## 1.24.2 (2022-06-30)\n\n### Bugs Fixed\n\n- Fixed the bug that azure-core could not be imported under Python 3.11.0b3 #24928\n- `ContentDecodePolicy` can now correctly deserialize more JSON bodies with different mime types #22410\n\n## 1.24.1 (2022-06-01)\n\n### Bugs Fixed\n\n- Declare method level span as INTERNAL by default #24492\n- Fixed type hints for `azure.core.paging.ItemPaged` #24548\n\n## 1.24.0 (2022-05-06)\n\n### Features Added\n\n- Add `SerializationError` and `DeserializationError` in `azure.core.exceptions` for errors raised during serialization / deserialization #24312\n\n## 1.23.1 (2022-03-31)\n\n### Bugs Fixed\n\n- Allow stream inputs to the `content` kwarg of `azure.core.rest.HttpRequest` from objects with a `read` method #23578\n\n## 1.23.0 (2022-03-03)\n\n### Features Added\n\n- Improve intellisense type hinting for service client methods. #22891\n\n- Add a case insensitive dict `case_insensitive_dict` in `azure.core.utils`. #23206\n\n### Bugs Fixed\n\n- Use \"\\n\" rather than \"/n\" for new line in log. #23261\n\n### Other Changes\n\n- Log \"WWW-Authenticate\" header in `HttpLoggingPolicy` #22990\n- Added dependency on `typing-extensions` >= 4.0.1\n\n## 1.22.1 (2022-02-09)\n\n### Bugs Fixed\n\n- Limiting `final-state-via` scope to POST until consuming SDKs has been fixed to use this option properly on PUT. #22989\n\n## 1.22.0 (2022-02-03)\n_[**This version is deprecated.**]_\n\n### Features Added\n\n- Add support for `final-state-via` LRO option in core. #22713\n\n### Bugs Fixed\n\n- Add response body to string representation of `HttpResponseError` if we're not able to parse out information #22302\n- Raise `AttributeError` when calling azure.core.pipeline.transport.\\_\\_bases__ #22469\n\n### Other Changes\n\n- Python 2.7 is no longer supported. Please use Python version 3.6 or later.\n\n## 1.21.1 (2021-12-06)\n\n### Other Changes\n\n- Revert change in str method #22023\n\n## 1.21.0 (2021-12-02)\n\n### Breaking Changes\n\n- Sync stream downloading now raises `azure.core.exceptions.DecodeError` rather than `requests.exceptions.ContentDecodingError`\n\n### Bugs Fixed\n\n- Add response body to string representation of `HttpResponseError` if we're not able to parse out information #21800\n\n## 1.20.1 (2021-11-08)\n\n### Bugs Fixed\n\n- Correctly set response's content to decompressed body when users are using aiohttp transport with decompression headers #21620\n\n## 1.20.0 (2021-11-04)\n\n### Features Added\n\n- GA `send_request` onto the `azure.core.PipelineClient` and `azure.core.AsyncPipelineClient`. This method takes in\nrequests and sends them through our pipelines.\n- GA `azure.core.rest`. `azure.core.rest` is our new public simple HTTP library in `azure.core` that users will use to create requests, and consume responses.\n- GA errors `StreamConsumedError`, `StreamClosedError`, and `ResponseNotReadError` to `azure.core.exceptions`. These errors\nare thrown if you mishandle streamed responses from the `azure.core.rest` module\n- add kwargs to the methods for `iter_raw` and `iter_bytes` #21529\n- no longer raise JSON errors if users pass in file descriptors of JSON to the `json` kwarg in `HttpRequest` #21504\n- Added new error type `IncompleteReadError` which is raised if peer closes the connection before we have received the complete message body.\n\n### Breaking Changes\n\n- SansIOHTTPPolicy.on_exception returns None instead of bool.\n\n### Bugs Fixed\n\n- The `Content-Length` header in a http response is strictly checked against the actual number of bytes in the body,\n rather than silently truncating data in case the underlying tcp connection is closed prematurely.\n (thanks to @jochen-ott-by for the contribution) #20412\n- UnboundLocalError when SansIOHTTPPolicy handles an exception #15222\n- Add default content type header of `text/plain` and content length header for users who pass unicode strings to the `content` kwarg of `HttpRequest` in 2.7 #21550\n\n## 1.19.1 (2021-11-01)\n\n### Bugs Fixed\n\n- respect text encoding specified in argument (thanks to @ryohji for the contribution) #20796\n- Fix \"coroutine x.read() was never awaited\" warning from `ContentDecodePolicy` #21318\n- fix type check for `data` input to `azure.core.rest` for python 2.7 users #21341\n- use `charset_normalizer` if `chardet` is not installed to migrate aiohttp 3.8.0 changes.\n\n### Other Changes\n\n- Refactor AzureJSONEncoder (thanks to @Codejune for the contribution) #21028\n\n## 1.19.0 (2021-09-30)\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse` are now abstract base classes. They should not be initialized directly, instead\nyour transport responses should inherit from them and implement them.\n- The properties of the `azure.core.rest` responses are now all read-only\n\n- HttpLoggingPolicy integrates logs into one record #19925\n\n## 1.18.0 (2021-09-02)\n\n### Features Added\n\n- `azure.core.serialization.AzureJSONEncoder` (introduced in 1.17.0) serializes `datetime.datetime` objects in ISO 8601 format, conforming to RFC 3339's specification. #20190\n- We now use `azure.core.serialization.AzureJSONEncoder` to serialize `json` input to `azure.core.rest.HttpRequest`.\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- The `text` property on `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse` has changed to a method, which also takes\nan `encoding` parameter.\n- Removed `iter_text` and `iter_lines` from `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse`\n\n### Bugs Fixed\n\n- The behaviour of the headers returned in `azure.core.rest` responses now aligns across sync and async. Items can now be checked case-insensitively and without raising an error for format.\n\n## 1.17.0 (2021-08-05)\n\n### Features Added\n\n- Cut hard dependency on requests library\n- Added a `from_json` method which now accepts storage QueueMessage, eventhub's EventData or ServiceBusMessage or simply json bytes to return a `CloudEvent`\n\n### Fixed\n\n- Not override \"x-ms-client-request-id\" if it already exists in the header. #17757\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- `azure.core.rest` will not try to guess the `charset` anymore if it was impossible to extract it from `HttpResponse` analysis. This removes our dependency on `charset`.\n\n## 1.16.0 (2021-07-01)\n\n### Features Added\n\n- Add new ***provisional*** methods `send_request` onto the `azure.core.PipelineClient` and `azure.core.AsyncPipelineClient`. This method takes in\nrequests and sends them through our pipelines.\n- Add new ***provisional*** module `azure.core.rest`. `azure.core.rest` is our new public simple HTTP library in `azure.core` that users will use to create requests, and consume responses.\n- Add new ***provisional*** errors `StreamConsumedError`, `StreamClosedError`, and `ResponseNotReadError` to `azure.core.exceptions`. These errors\nare thrown if you mishandle streamed responses from the provisional `azure.core.rest` module\n\n### Fixed\n\n- Improved error message in the `from_dict` method of `CloudEvent` when a wrong schema is sent.\n\n## 1.15.0 (2021-06-04)\n\n### New Features\n\n- Added `BearerTokenCredentialPolicy.on_challenge` and `.authorize_request` to allow subclasses to optionally handle authentication challenges\n\n### Bug Fixes\n\n- Retry policies don't sleep after operations time out\n- The `from_dict` methhod in the `CloudEvent` can now convert a datetime string to datetime object when microsecond exceeds the python limitation\n\n## 1.14.0 (2021-05-13)\n\n### New Features\n\n- Added `azure.core.credentials.AzureNamedKeyCredential` credential #17548.\n- Added `decompress` parameter for `stream_download` method. If it is set to `False`, will not do decompression upon the stream. #17920\n\n## 1.13.0 (2021-04-02)\n\nAzure core requires Python 2.7 or Python 3.6+ since this release.\n\n### New Features\n\n- Added `azure.core.utils.parse_connection_string` function to parse connection strings across SDKs, with common validation and support for case insensitive keys.\n- Supported adding custom policies #16519\n- Added `~azure.core.tracing.Link` that should be used while passing `Links` to `AbstractSpan`.\n- `AbstractSpan` constructor can now take in additional keyword only args.\n\n### Bug fixes\n\n- Make NetworkTraceLoggingPolicy show the auth token in plain text. #14191\n- Fixed RetryPolicy overriding default connection timeout with an extreme value #17481\n\n## 1.12.0 (2021-03-08)\n\nThis version will be the last version to officially support Python 3.5, future versions will require Python 2.7 or Python 3.6+.\n\n### Features\n\n- Added `azure.core.messaging.CloudEvent` model that follows the cloud event spec.\n- Added `azure.core.serialization.NULL` sentinel value\n- Improve `repr`s for `HttpRequest` and `HttpResponse`s #16972\n\n### Bug Fixes\n\n- Disable retry in stream downloading. (thanks to @jochen-ott-by @hoffmann for the contribution) #16723\n\n## 1.11.0 (2021-02-08)\n\n### Features\n\n- Added `CaseInsensitiveEnumMeta` class for case-insensitive enums. #16316\n- Add `raise_for_status` method onto `HttpResponse`. Calling `response.raise_for_status()` on a response with an error code\nwill raise an `HttpResponseError`. Calling it on a good response will do nothing #16399\n\n### Bug Fixes\n\n- Update conn.conn_kw rather than overriding it when setting block size. (thanks for @jiasli for the contribution) #16587\n\n## 1.10.0 (2021-01-11)\n\n### Features\n\n- Added `AzureSasCredential` and its respective policy. #15946\n\n## 1.9.0 (2020-11-09)\n\n### Features\n\n- Add a `continuation_token` attribute to the base `AzureError` exception, and set this value for errors raised\n during paged or long-running operations.\n\n### Bug Fixes\n\n- Set retry_interval to 1 second instead of 1000 seconds (thanks **vbarbaresi** for contributing) #14357\n\n\n## 1.8.2 (2020-10-05)\n\n### Bug Fixes\n\n- Fixed bug to allow polling in the case of parameterized endpoints with relative polling urls #14097\n\n\n## 1.8.1 (2020-09-08)\n\n### Bug fixes\n\n- SAS credential replicated \"/\" fix #13159\n\n## 1.8.0 (2020-08-10)\n\n### Features\n\n- Support params as list for exploding parameters #12410\n\n\n## 1.7.0 (2020-07-06)\n\n### Bug fixes\n\n- `AzureKeyCredentialPolicy` will now accept (and ignore) passed in kwargs #11963\n- Better error messages if passed endpoint is incorrect #12106\n- Do not JSON encore a string if content type is \"text\" #12137\n\n### Features\n\n- Added `http_logging_policy` property on the `Configuration` object, allowing users to individually\nset the http logging policy of the config #12218\n\n## 1.6.0 (2020-06-03)\n\n### Bug fixes\n\n- Fixed deadlocks in AsyncBearerTokenCredentialPolicy #11543\n- Fix AttributeException in StreamDownloadGenerator #11462\n\n### Features\n\n- Added support for changesets as part of multipart message support #10485\n- Add AsyncLROPoller in azure.core.polling #10801\n- Add get_continuation_token/from_continuation_token/polling_method methods in pollers (sync and async) #10801\n- HttpResponse and PipelineContext objects are now pickable #10801\n\n## 1.5.0 (2020-05-04)\n\n### Features\n\n- Support \"x-ms-retry-after-ms\" in response header #10743\n- `link` and `link_from_headers` now accepts attributes #10765\n\n### Bug fixes\n\n- Not retry if the status code is less than 400 #10778\n- \"x-ms-request-id\" is not considered safe header for logging #10967\n\n## 1.4.0 (2020-04-06)\n\n### Features\n\n- Support a default error type in map_error #9773\n- Added `AzureKeyCredential` and its respective policy. #10509\n- Added `azure.core.polling.base_polling` module with a \"Microsoft One API\" polling implementation #10090\n Also contains the async version in `azure.core.polling.async_base_polling`\n- Support kwarg `enforce_https` to disable HTTPS check on authentication #9821\n- Support additional kwargs in `HttpRequest.set_multipart_mixed` that will be passed into pipeline context.\n\n## 1.3.0 (2020-03-09)\n\n### Bug fixes\n\n- Appended RequestIdPolicy to the default pipeline #9841\n- Rewind the body position in async_retry #10117\n\n### Features\n\n- Add raw_request_hook support in custom_hook_policy #9958\n- Add timeout support in retry_policy #10011\n- Add OdataV4 error format auto-parsing in all exceptions ('error' attribute) #9738\n\n## 1.2.2 (2020-02-10)\n\n### Bug fixes\n\n- Fixed a bug that sends None as request_id #9545\n- Enable mypy for customers #9572\n- Handle TypeError in deep copy #9620\n- Fix text/plain content-type in decoder #9589\n\n## 1.2.1 (2020-01-14)\n\n### Bug fixes\n\n- Fixed a regression in 1.2.0 that was incompatible with azure-keyvault-* 4.0.0\n[#9462](https://github.com/Azure/azure-sdk-for-python/issues/9462)\n\n\n## 1.2.0 (2020-01-14)\n\n### Features\n\n- Add user_agent & sdk_moniker kwargs in UserAgentPolicy init #9355\n- Support OPTIONS HTTP verb #9322\n- Add tracing_attributes to tracing decorator #9297\n- Support auto_request_id in RequestIdPolicy #9163\n- Support fixed retry #6419\n- Support \"retry-after-ms\" in response header #9240\n\n### Bug fixes\n\n- Removed `__enter__` and `__exit__` from async context managers #9313\n\n## 1.1.1 (2019-12-03)\n\n### Bug fixes\n\n- Bearer token authorization requires HTTPS\n- Rewind the body position in retry #8307\n\n## 1.1.0 (2019-11-25)\n\n### Features\n\n- New RequestIdPolicy #8437\n- Enable logging policy in default pipeline #8053\n- Normalize transport timeout. #8000\n Now we have:\n * 'connection_timeout' - a single float in seconds for the connection timeout. Default 5min\n * 'read_timeout' - a single float in seconds for the read timeout. Default 5min\n\n### Bug fixes\n\n- RequestHistory: deepcopy fails if request contains a stream #7732\n- Retry: retry raises error if response does not have http_response #8629\n- Client kwargs are now passed to DistributedTracingPolicy correctly #8051\n- NetworkLoggingPolicy now logs correctly all requests in case of retry #8262\n\n## 1.0.0 (2019-10-29)\n\n### Features\n\n- Tracing: DistributedTracingPolicy now accepts kwargs network_span_namer to change network span name #7773\n- Tracing: Implementation of AbstractSpan can now use the mixin HttpSpanMixin to get HTTP span update automatically #7773\n- Tracing: AbstractSpan contract \"change_context\" introduced #7773\n- Introduce new policy HttpLoggingPolicy #7988\n\n### Bug fixes\n\n- Fix AsyncioRequestsTransport if input stream is an async generator #7743\n- Fix form-data with aiohttp transport #7749\n\n### Breaking changes\n\n- Tracing: AbstractSpan.set_current_span is longer supported. Use change_context instead. #7773\n- azure.core.pipeline.policies.ContentDecodePolicy.deserialize_from_text changed\n\n## 1.0.0b4 (2019-10-07)\n\n### Features\n\n- Tracing: network span context is available with the TRACING_CONTEXT in pipeline response #7252\n- Tracing: Span contract now has `kind`, `traceparent` and is a context manager #7252\n- SansIOHTTPPolicy methods can now be coroutines #7497\n- Add multipart/mixed support #7083:\n\n - HttpRequest now has a \"set_multipart_mixed\" method to set the parts of this request\n - HttpRequest now has a \"prepare_multipart_body\" method to build final body.\n - HttpResponse now has a \"parts\" method to return an iterator of parts\n - AsyncHttpResponse now has a \"parts\" methods to return an async iterator of parts\n - Note that multipart/mixed is a Python 3.x only feature\n\n### Bug fixes\n\n- Tracing: policy cannot fail the pipeline, even in the worst condition #7252\n- Tracing: policy pass correctly status message if exception #7252\n- Tracing: incorrect span if exception raised from decorated function #7133\n- Fixed urllib3 ConnectTimeoutError being raised by Requests during a socket timeout. Now this exception is caught and wrapped as a `ServiceRequestError` #7542\n\n### Breaking changes\n\n- Tracing: `azure.core.tracing.context` removed\n- Tracing: `azure.core.tracing.context.tracing_context.with_current_context` renamed to `azure.core.tracing.common.with_current_context` #7252\n- Tracing: `link` renamed `link_from_headers` and `link` takes now a string\n- Tracing: opencensus implementation has been moved to the package `azure-core-tracing-opencensus`\n- Some modules and classes that were importables from several different places have been removed:\n\n - `azure.core.HttpResponseError` is now only `azure.core.exceptions.HttpResponseError`\n - `azure.core.Configuration` is now only `azure.core.configuration.Configuration`\n - `azure.core.HttpRequest` is now only `azure.core.pipeline.transport.HttpRequest`\n - `azure.core.version` module has been removed. Use `azure.core.__version__` to get version number.\n - `azure.core.pipeline_client` has been removed. Import from `azure.core` instead.\n - `azure.core.pipeline_client_async` has been removed. Import from `azure.core` instead.\n - `azure.core.pipeline.base` has been removed. Import from `azure.core.pipeline` instead.\n - `azure.core.pipeline.base_async` has been removed. Import from `azure.core.pipeline` instead.\n - `azure.core.pipeline.policies.base` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.base_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.authentication` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.authentication_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.custom_hook` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.redirect` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.redirect_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.retry` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.retry_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.distributed_tracing` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.universal` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.tracing.abstract_span` has been removed. Import from `azure.core.tracing` instead.\n - `azure.core.pipeline.transport.base` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.base_async` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_basic` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_asyncio` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_trio` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.aiohttp` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.polling.poller` has been removed. Import from `azure.core.polling` instead.\n - `azure.core.polling.async_poller` has been removed. Import from `azure.core.polling` instead.\n\n## 1.0.0b3 (2019-09-09)\n\n### Bug fixes\n\n- Fix aiohttp auto-headers #6992\n- Add tracing to policies module init #6951\n\n## 1.0.0b2 (2019-08-05)\n\n### Breaking changes\n\n- Transport classes don't take `config` parameter anymore (use kwargs instead) #6372\n- `azure.core.paging` has been completely refactored #6420\n- HttpResponse.content_type attribute is now a string (was a list) #6490\n- For `StreamDownloadGenerator` subclasses, `response` is now an `HttpResponse`, and not a transport response like `aiohttp.ClientResponse` or `requests.Response`. The transport response is available in `internal_response` attribute #6490\n\n### Bug fixes\n\n- aiohttp is not required to import async pipelines classes #6496\n- `AsyncioRequestsTransport.sleep` is now a coroutine as expected #6490\n- `RequestsTransport` is not tight to `ProxyPolicy` implementation details anymore #6372\n- `AiohttpTransport` does not raise on unexpected kwargs #6355\n\n### Features\n\n- New paging base classes that support `continuation_token` and `by_page()` #6420\n- Proxy support for `AiohttpTransport` #6372\n\n## 1.0.0b1 (2019-06-26)\n\n- Preview 1 release", + "release_date": "2023-09-07T19:49:14", "parties": [ { "type": "person", @@ -202,6 +204,8 @@ } ], "keywords": [ + "azure", + "azure sdk", "Development Status :: 5 - Production/Stable", "Programming Language :: Python", "Programming Language :: Python :: 3", @@ -213,11 +217,11 @@ "Programming Language :: Python :: 3.9" ], "homepage_url": "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/core/azure-core", - "download_url": "https://files.pythonhosted.org/packages/fd/51/0ee0a2844712f54117b3ee4853c3d209ba37641f0c587be22a993990989e/azure-core-1.28.0.zip", - "size": 384884, + "download_url": "https://files.pythonhosted.org/packages/fa/19/43a9eb812b4d6071fdc2c55640318f7eb5a1be8dbd3b6f9d96a1996e1bb6/azure-core-1.29.4.tar.gz", + "size": 260048, "sha1": null, - "md5": "f0835c198395cb5b003f988321a7c65e", - "sha256": "e9eefc66fc1fde56dab6f04d4e5d12c60754d5a9fa49bdcfd8534fc96ed936bd", + "md5": "47c5d08ce031660683f5986ab31d5bf6", + "sha256": "500b3aa9bf2e90c5ccc88bb105d056114ca0ce7d0ce73afb8bc4d714b2fc7568", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -237,9 +241,9 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/azure-core/1.28.0/json", + "api_data_url": "https://pypi.org/pypi/azure-core/1.29.4/json", "datasource_id": null, - "purl": "pkg:pypi/azure-core@1.28.0" + "purl": "pkg:pypi/azure-core@1.29.4" }, { "type": "pypi", @@ -379,12 +383,12 @@ "type": "pypi", "namespace": null, "name": "azure-storage-blob", - "version": "12.17.0", + "version": "12.18.1", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "Microsoft Azure Blob Storage Client Library for Python\n# Azure Storage Blobs client library for Python\nAzure Blob storage is Microsoft's object storage solution for the cloud. Blob storage is optimized for storing massive amounts of unstructured data, such as text or binary data.\n\nBlob storage is ideal for:\n\n* Serving images or documents directly to a browser\n* Storing files for distributed access\n* Streaming video and audio\n* Storing data for backup and restore, disaster recovery, and archiving\n* Storing data for analysis by an on-premises or Azure-hosted service\n\n[Source code](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/azure/storage/blob)\n| [Package (PyPI)](https://pypi.org/project/azure-storage-blob/)\n| [Package (Conda)](https://anaconda.org/microsoft/azure-storage/)\n| [API reference documentation](https://aka.ms/azsdk-python-storage-blob-ref)\n| [Product documentation](https://docs.microsoft.com/azure/storage/)\n| [Samples](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples)\n\n\n## Getting started\n\n### Prerequisites\n* Python 3.7 or later is required to use this package. For more details, please read our page on [Azure SDK for Python version support policy](https://github.com/Azure/azure-sdk-for-python/wiki/Azure-SDKs-Python-version-support-policy).\n* You must have an [Azure subscription](https://azure.microsoft.com/free/) and an\n[Azure storage account](https://docs.microsoft.com/azure/storage/common/storage-account-overview) to use this package.\n\n### Install the package\nInstall the Azure Storage Blobs client library for Python with [pip](https://pypi.org/project/pip/):\n\n```bash\npip install azure-storage-blob\n```\n\n### Create a storage account\nIf you wish to create a new storage account, you can use the\n[Azure Portal](https://docs.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-portal),\n[Azure PowerShell](https://docs.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-powershell),\nor [Azure CLI](https://docs.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-cli):\n\n```bash\n# Create a new resource group to hold the storage account -\n# if using an existing resource group, skip this step\naz group create --name my-resource-group --location westus2\n\n# Create the storage account\naz storage account create -n my-storage-account-name -g my-resource-group\n```\n\n### Create the client\nThe Azure Storage Blobs client library for Python allows you to interact with three types of resources: the storage\naccount itself, blob storage containers, and blobs. Interaction with these resources starts with an instance of a\n[client](#clients). To create a client object, you will need the storage account's blob service account URL and a\ncredential that allows you to access the storage account:\n\n```python\nfrom azure.storage.blob import BlobServiceClient\n\nservice = BlobServiceClient(account_url=\"https://.blob.core.windows.net/\", credential=credential)\n```\n\n#### Looking up the account URL\nYou can find the storage account's blob service URL using the\n[Azure Portal](https://docs.microsoft.com/azure/storage/common/storage-account-overview#storage-account-endpoints),\n[Azure PowerShell](https://docs.microsoft.com/powershell/module/az.storage/get-azstorageaccount),\nor [Azure CLI](https://docs.microsoft.com/cli/azure/storage/account?view=azure-cli-latest#az-storage-account-show):\n\n```bash\n# Get the blob service account url for the storage account\naz storage account show -n my-storage-account-name -g my-resource-group --query \"primaryEndpoints.blob\"\n```\n\n#### Types of credentials\nThe `credential` parameter may be provided in a number of different forms, depending on the type of\n[authorization](https://docs.microsoft.com/azure/storage/common/storage-auth) you wish to use:\n1. To use an [Azure Active Directory (AAD) token credential](https://docs.microsoft.com/azure/storage/common/storage-auth-aad),\n provide an instance of the desired credential type obtained from the\n [azure-identity](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#credentials) library.\n For example, [DefaultAzureCredential](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#defaultazurecredential)\n can be used to authenticate the client.\n\n This requires some initial setup:\n * [Install azure-identity](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#install-the-package)\n * [Register a new AAD application](https://docs.microsoft.com/azure/active-directory/develop/quickstart-register-app) and give permissions to access Azure Storage\n * [Grant access](https://docs.microsoft.com/azure/storage/common/storage-auth-aad-rbac-portal) to Azure Blob data with RBAC in the Azure Portal\n * Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables:\n AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET\n\n Use the returned token credential to authenticate the client:\n ```python\n from azure.identity import DefaultAzureCredential\n from azure.storage.blob import BlobServiceClient\n token_credential = DefaultAzureCredential()\n\n blob_service_client = BlobServiceClient(\n account_url=\"https://.blob.core.windows.net\",\n credential=token_credential\n )\n ```\n\n2. To use a [shared access signature (SAS) token](https://docs.microsoft.com/azure/storage/common/storage-sas-overview),\n provide the token as a string. If your account URL includes the SAS token, omit the credential parameter.\n You can generate a SAS token from the Azure Portal under \"Shared access signature\" or use one of the `generate_sas()`\n functions to create a sas token for the storage account, container, or blob:\n\n ```python\n from datetime import datetime, timedelta\n from azure.storage.blob import BlobServiceClient, generate_account_sas, ResourceTypes, AccountSasPermissions\n\n sas_token = generate_account_sas(\n account_name=\"\",\n account_key=\"\",\n resource_types=ResourceTypes(service=True),\n permission=AccountSasPermissions(read=True),\n expiry=datetime.utcnow() + timedelta(hours=1)\n )\n\n blob_service_client = BlobServiceClient(account_url=\"https://.blob.core.windows.net\", credential=sas_token)\n ```\n\n3. To use a storage account [shared key](https://docs.microsoft.com/rest/api/storageservices/authenticate-with-shared-key/)\n (aka account key or access key), provide the key as a string. This can be found in the Azure Portal under the \"Access Keys\"\n section or by running the following Azure CLI command:\n\n ```az storage account keys list -g MyResourceGroup -n MyStorageAccount```\n\n Use the key as the credential parameter to authenticate the client:\n ```python\n from azure.storage.blob import BlobServiceClient\n service = BlobServiceClient(account_url=\"https://.blob.core.windows.net\", credential=\"\")\n ```\n \n If you are using **customized url** (which means the url is not in this format `.blob.core.windows.net`),\n please instantiate the client using the credential below:\n ```python\n from azure.storage.blob import BlobServiceClient\n service = BlobServiceClient(account_url=\"https://.blob.core.windows.net\", \n credential={\"account_name\": \"\", \"account_key\":\"\"})\n ```\n\n4. To use [anonymous public read access](https://docs.microsoft.com/azure/storage/blobs/storage-manage-access-to-resources),\n simply omit the credential parameter.\n\n#### Creating the client from a connection string\nDepending on your use case and authorization method, you may prefer to initialize a client instance with a storage\nconnection string instead of providing the account URL and credential separately. To do this, pass the storage\nconnection string to the client's `from_connection_string` class method:\n\n```python\nfrom azure.storage.blob import BlobServiceClient\n\nconnection_string = \"DefaultEndpointsProtocol=https;AccountName=xxxx;AccountKey=xxxx;EndpointSuffix=core.windows.net\"\nservice = BlobServiceClient.from_connection_string(conn_str=connection_string)\n```\n\nThe connection string to your storage account can be found in the Azure Portal under the \"Access Keys\" section or by running the following CLI command:\n\n```bash\naz storage account show-connection-string -g MyResourceGroup -n MyStorageAccount\n```\n\n## Key concepts\nThe following components make up the Azure Blob Service:\n* The storage account itself\n* A container within the storage account\n* A blob within a container\n\nThe Azure Storage Blobs client library for Python allows you to interact with each of these components through the\nuse of a dedicated client object.\n\n### Clients\nFour different clients are provided to interact with the various components of the Blob Service:\n1. [BlobServiceClient](https://aka.ms/azsdk-python-storage-blob-blobserviceclient) -\n this client represents interaction with the Azure storage account itself, and allows you to acquire preconfigured\n client instances to access the containers and blobs within. It provides operations to retrieve and configure the\n account properties as well as list, create, and delete containers within the account. To perform operations on a\n specific container or blob, retrieve a client using the `get_container_client` or `get_blob_client` methods.\n2. [ContainerClient](https://aka.ms/azsdk-python-storage-blob-containerclient) -\n this client represents interaction with a specific container (which need not exist yet), and allows you to acquire\n preconfigured client instances to access the blobs within. It provides operations to create, delete, or configure a\n container and includes operations to list, upload, and delete the blobs within it. To perform operations on a\n specific blob within the container, retrieve a client using the `get_blob_client` method.\n3. [BlobClient](https://aka.ms/azsdk-python-storage-blob-blobclient) -\n this client represents interaction with a specific blob (which need not exist yet). It provides operations to\n upload, download, delete, and create snapshots of a blob, as well as specific operations per blob type.\n4. [BlobLeaseClient](https://aka.ms/azsdk-python-storage-blob-blobleaseclient) -\n this client represents lease interactions with a `ContainerClient` or `BlobClient`. It provides operations to\n acquire, renew, release, change, and break a lease on a specified resource.\n\n### Async Clients \nThis library includes a complete async API supported on Python 3.5+. To use it, you must\nfirst install an async transport, such as [aiohttp](https://pypi.org/project/aiohttp/).\nSee\n[azure-core documentation](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md#transport)\nfor more information.\n\nAsync clients and credentials should be closed when they're no longer needed. These\nobjects are async context managers and define async `close` methods.\n\n### Blob Types\nOnce you've initialized a Client, you can choose from the different types of blobs:\n* [Block blobs](https://docs.microsoft.com/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs#about-block-blobs)\n store text and binary data, up to approximately 4.75 TiB. Block blobs are made up of blocks of data that can be\n managed individually\n* [Append blobs](https://docs.microsoft.com/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs#about-append-blobs)\n are made up of blocks like block blobs, but are optimized for append operations. Append blobs are ideal for scenarios\n such as logging data from virtual machines\n* [Page blobs](https://docs.microsoft.com/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs#about-page-blobs)\n store random access files up to 8 TiB in size. Page blobs store virtual hard drive (VHD) files and serve as disks for\n Azure virtual machines\n\n## Examples\nThe following sections provide several code snippets covering some of the most common Storage Blob tasks, including:\n\n* [Create a container](#create-a-container \"Create a container\")\n* [Uploading a blob](#uploading-a-blob \"Uploading a blob\")\n* [Downloading a blob](#downloading-a-blob \"Downloading a blob\")\n* [Enumerating blobs](#enumerating-blobs \"Enumerating blobs\")\n\nNote that a container must be created before to upload or download a blob.\n\n### Create a container\n\nCreate a container from where you can upload or download blobs.\n```python\nfrom azure.storage.blob import ContainerClient\n\ncontainer_client = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\ncontainer_client.create_container()\n```\n\nUse the async client to upload a blob\n\n```python\nfrom azure.storage.blob.aio import ContainerClient\n\ncontainer_client = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\nawait container_client.create_container()\n```\n\n### Uploading a blob\nUpload a blob to your container\n\n```python\nfrom azure.storage.blob import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./SampleSource.txt\", \"rb\") as data:\n blob.upload_blob(data)\n```\n\nUse the async client to upload a blob\n\n```python\nfrom azure.storage.blob.aio import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./SampleSource.txt\", \"rb\") as data:\n await blob.upload_blob(data)\n```\n\n### Downloading a blob\nDownload a blob from your container\n\n```python\nfrom azure.storage.blob import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./BlockDestination.txt\", \"wb\") as my_blob:\n blob_data = blob.download_blob()\n blob_data.readinto(my_blob)\n```\n\nDownload a blob asynchronously\n\n```python\nfrom azure.storage.blob.aio import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./BlockDestination.txt\", \"wb\") as my_blob:\n stream = await blob.download_blob()\n data = await stream.readall()\n my_blob.write(data)\n```\n\n### Enumerating blobs\nList the blobs in your container\n\n```python\nfrom azure.storage.blob import ContainerClient\n\ncontainer = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\nblob_list = container.list_blobs()\nfor blob in blob_list:\n print(blob.name + '\\n')\n```\n\nList the blobs asynchronously\n\n```python\nfrom azure.storage.blob.aio import ContainerClient\n\ncontainer = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\nblob_list = []\nasync for blob in container.list_blobs():\n blob_list.append(blob)\nprint(blob_list)\n```\n\n## Optional Configuration\n\nOptional keyword arguments that can be passed in at the client and per-operation level.\n\n### Retry Policy configuration\n\nUse the following keyword arguments when instantiating a client to configure the retry policy:\n\n* __retry_total__ (int): Total number of retries to allow. Takes precedence over other counts.\nPass in `retry_total=0` if you do not want to retry on requests. Defaults to 10.\n* __retry_connect__ (int): How many connection-related errors to retry on. Defaults to 3.\n* __retry_read__ (int): How many times to retry on read errors. Defaults to 3.\n* __retry_status__ (int): How many times to retry on bad status codes. Defaults to 3.\n* __retry_to_secondary__ (bool): Whether the request should be retried to secondary, if able.\nThis should only be enabled of RA-GRS accounts are used and potentially stale data can be handled.\nDefaults to `False`.\n\n### Encryption configuration\n\nUse the following keyword arguments when instantiating a client to configure encryption:\n\n* __require_encryption__ (bool): If set to True, will enforce that objects are encrypted and decrypt them.\n* __encryption_version__ (str): Specifies the version of encryption to use. Current options are `'2.0'` or `'1.0'` and\nthe default value is `'1.0'`. Version 1.0 is deprecated, and it is **highly recommended** to use version 2.0.\n* __key_encryption_key__ (object): The user-provided key-encryption-key. The instance must implement the following methods:\n - `wrap_key(key)`--wraps the specified key using an algorithm of the user's choice.\n - `get_key_wrap_algorithm()`--returns the algorithm used to wrap the specified symmetric key.\n - `get_kid()`--returns a string key id for this key-encryption-key.\n* __key_resolver_function__ (callable): The user-provided key resolver. Uses the kid string to return a key-encryption-key\nimplementing the interface defined above.\n\n### Other client / per-operation configuration\n\nOther optional configuration keyword arguments that can be specified on the client or per-operation.\n\n**Client keyword arguments:**\n\n* __connection_timeout__ (int): The number of seconds the client will wait to establish a connection to the server.\nDefaults to 20 seconds.\n* __read_timeout__ (int): The number of seconds the client will wait, between consecutive read operations, for a\nresponse from the server. This is a socket level timeout and is not affected by overall data size. Client-side read \ntimeouts will be automatically retried. Defaults to 60 seconds.\n* __transport__ (Any): User-provided transport to send the HTTP request.\n\n**Per-operation keyword arguments:**\n\n* __raw_response_hook__ (callable): The given callback uses the response returned from the service.\n* __raw_request_hook__ (callable): The given callback uses the request before being sent to service.\n* __client_request_id__ (str): Optional user specified identification of the request.\n* __user_agent__ (str): Appends the custom value to the user-agent header to be sent with the request.\n* __logging_enable__ (bool): Enables logging at the DEBUG level. Defaults to False. Can also be passed in at\nthe client level to enable it for all requests.\n* __logging_body__ (bool): Enables logging the request and response body. Defaults to False. Can also be passed in at\nthe client level to enable it for all requests.\n* __headers__ (dict): Pass in custom headers as key, value pairs. E.g. `headers={'CustomValue': value}`\n\n## Troubleshooting\n### General\nStorage Blob clients raise exceptions defined in [Azure Core](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/README.md).\n\nThis list can be used for reference to catch thrown exceptions. To get the specific error code of the exception, use the `error_code` attribute, i.e, `exception.error_code`.\n\n### Logging\nThis library uses the standard\n[logging](https://docs.python.org/3/library/logging.html) library for logging.\nBasic information about HTTP sessions (URLs, headers, etc.) is logged at INFO\nlevel.\n\nDetailed DEBUG level logging, including request/response bodies and unredacted\nheaders, can be enabled on a client with the `logging_enable` argument:\n```python\nimport sys\nimport logging\nfrom azure.storage.blob import BlobServiceClient\n\n# Create a logger for the 'azure.storage.blob' SDK\nlogger = logging.getLogger('azure.storage.blob')\nlogger.setLevel(logging.DEBUG)\n\n# Configure a console output\nhandler = logging.StreamHandler(stream=sys.stdout)\nlogger.addHandler(handler)\n\n# This client will log detailed information about its HTTP sessions, at DEBUG level\nservice_client = BlobServiceClient.from_connection_string(\"your_connection_string\", logging_enable=True)\n```\n\nSimilarly, `logging_enable` can enable detailed logging for a single operation,\neven when it isn't enabled for the client:\n```python\nservice_client.get_service_stats(logging_enable=True)\n```\n\n## Next steps\n\n### More sample code\n\nGet started with our [Blob samples](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples).\n\nSeveral Storage Blobs Python SDK samples are available to you in the SDK's GitHub repository. These samples provide example code for additional scenarios commonly encountered while working with Storage Blobs:\n\n* [blob_samples_container_access_policy.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_container_access_policy.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_container_access_policy_async.py)) - Examples to set Access policies:\n * Set up Access Policy for container\n\n* [blob_samples_hello_world.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_hello_world.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_hello_world_async.py)) - Examples for common Storage Blob tasks:\n * Set up a container\n * Create a block, page, or append blob\n * Upload blobs\n * Download blobs\n * Delete blobs\n\n* [blob_samples_authentication.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_authentication.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_authentication_async.py)) - Examples for authenticating and creating the client:\n * From a connection string\n * From a shared access key\n * From a shared access signature token\n * From active directory\n\n* [blob_samples_service.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_service.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_service_async.py)) - Examples for interacting with the blob service:\n * Get account information\n * Get and set service properties\n * Get service statistics\n * Create, list, and delete containers\n * Get the Blob or Container client\n\n* [blob_samples_containers.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_containers.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_containers_async.py)) - Examples for interacting with containers:\n * Create a container and delete containers\n * Set metadata on containers\n * Get container properties\n * Acquire a lease on container\n * Set an access policy on a container\n * Upload, list, delete blobs in container\n * Get the blob client to interact with a specific blob\n\n* [blob_samples_common.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_common.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_common_async.py)) - Examples common to all types of blobs:\n * Create a snapshot\n * Delete a blob snapshot\n * Soft delete a blob\n * Undelete a blob\n * Acquire a lease on a blob\n * Copy a blob from a URL\n\n* [blob_samples_directory_interface.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_directory_interface.py) - Examples for interfacing with Blob storage as if it were a directory on a filesystem:\n * Copy (upload or download) a single file or directory\n * List files or directories at a single level or recursively\n * Delete a single file or recursively delete a directory\n\n### Additional documentation\nFor more extensive documentation on Azure Blob storage, see the [Azure Blob storage documentation](https://docs.microsoft.com/azure/storage/blobs/) on docs.microsoft.com.\n\n## Contributing\nThis project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.", - "release_date": "2023-07-11T22:58:43", + "release_date": "2023-09-13T23:16:17", "parties": [ { "type": "person", @@ -395,6 +399,8 @@ } ], "keywords": [ + "azure", + "azure sdk", "Development Status :: 5 - Production/Stable", "Programming Language :: Python", "Programming Language :: Python :: 3", @@ -405,11 +411,11 @@ "Programming Language :: Python :: 3.9" ], "homepage_url": "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob", - "download_url": "https://files.pythonhosted.org/packages/f1/06/68c50a905e1e5481b04a6166b69fecddb87681aae7a556ab727f8e8e6f70/azure_storage_blob-12.17.0-py3-none-any.whl", - "size": 388030, + "download_url": "https://files.pythonhosted.org/packages/14/c3/9b6a7f5fee1bf833384925f9741b182d170bb65d0142fbf73b1683a055d2/azure_storage_blob-12.18.1-py3-none-any.whl", + "size": 392811, "sha1": null, - "md5": "dad5ef1f081c73d2f59488a80f5a622d", - "sha256": "0016e0c549a80282d7b4920c03f2f4ba35c53e6e3c7dbcd2a4a8c8eb3882c1e7", + "md5": "6e20d1d050ab62b7c979a7d9f7fc649b", + "sha256": "00b92568e91d608c04dfd4814c3b180818e690023493bb984c22dfc1a8a96e55", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -429,20 +435,20 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/azure-storage-blob/12.17.0/json", + "api_data_url": "https://pypi.org/pypi/azure-storage-blob/12.18.1/json", "datasource_id": null, - "purl": "pkg:pypi/azure-storage-blob@12.17.0" + "purl": "pkg:pypi/azure-storage-blob@12.18.1" }, { "type": "pypi", "namespace": null, "name": "azure-storage-blob", - "version": "12.17.0", + "version": "12.18.1", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "Microsoft Azure Blob Storage Client Library for Python\n# Azure Storage Blobs client library for Python\nAzure Blob storage is Microsoft's object storage solution for the cloud. Blob storage is optimized for storing massive amounts of unstructured data, such as text or binary data.\n\nBlob storage is ideal for:\n\n* Serving images or documents directly to a browser\n* Storing files for distributed access\n* Streaming video and audio\n* Storing data for backup and restore, disaster recovery, and archiving\n* Storing data for analysis by an on-premises or Azure-hosted service\n\n[Source code](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/azure/storage/blob)\n| [Package (PyPI)](https://pypi.org/project/azure-storage-blob/)\n| [Package (Conda)](https://anaconda.org/microsoft/azure-storage/)\n| [API reference documentation](https://aka.ms/azsdk-python-storage-blob-ref)\n| [Product documentation](https://docs.microsoft.com/azure/storage/)\n| [Samples](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples)\n\n\n## Getting started\n\n### Prerequisites\n* Python 3.7 or later is required to use this package. For more details, please read our page on [Azure SDK for Python version support policy](https://github.com/Azure/azure-sdk-for-python/wiki/Azure-SDKs-Python-version-support-policy).\n* You must have an [Azure subscription](https://azure.microsoft.com/free/) and an\n[Azure storage account](https://docs.microsoft.com/azure/storage/common/storage-account-overview) to use this package.\n\n### Install the package\nInstall the Azure Storage Blobs client library for Python with [pip](https://pypi.org/project/pip/):\n\n```bash\npip install azure-storage-blob\n```\n\n### Create a storage account\nIf you wish to create a new storage account, you can use the\n[Azure Portal](https://docs.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-portal),\n[Azure PowerShell](https://docs.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-powershell),\nor [Azure CLI](https://docs.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-cli):\n\n```bash\n# Create a new resource group to hold the storage account -\n# if using an existing resource group, skip this step\naz group create --name my-resource-group --location westus2\n\n# Create the storage account\naz storage account create -n my-storage-account-name -g my-resource-group\n```\n\n### Create the client\nThe Azure Storage Blobs client library for Python allows you to interact with three types of resources: the storage\naccount itself, blob storage containers, and blobs. Interaction with these resources starts with an instance of a\n[client](#clients). To create a client object, you will need the storage account's blob service account URL and a\ncredential that allows you to access the storage account:\n\n```python\nfrom azure.storage.blob import BlobServiceClient\n\nservice = BlobServiceClient(account_url=\"https://.blob.core.windows.net/\", credential=credential)\n```\n\n#### Looking up the account URL\nYou can find the storage account's blob service URL using the\n[Azure Portal](https://docs.microsoft.com/azure/storage/common/storage-account-overview#storage-account-endpoints),\n[Azure PowerShell](https://docs.microsoft.com/powershell/module/az.storage/get-azstorageaccount),\nor [Azure CLI](https://docs.microsoft.com/cli/azure/storage/account?view=azure-cli-latest#az-storage-account-show):\n\n```bash\n# Get the blob service account url for the storage account\naz storage account show -n my-storage-account-name -g my-resource-group --query \"primaryEndpoints.blob\"\n```\n\n#### Types of credentials\nThe `credential` parameter may be provided in a number of different forms, depending on the type of\n[authorization](https://docs.microsoft.com/azure/storage/common/storage-auth) you wish to use:\n1. To use an [Azure Active Directory (AAD) token credential](https://docs.microsoft.com/azure/storage/common/storage-auth-aad),\n provide an instance of the desired credential type obtained from the\n [azure-identity](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#credentials) library.\n For example, [DefaultAzureCredential](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#defaultazurecredential)\n can be used to authenticate the client.\n\n This requires some initial setup:\n * [Install azure-identity](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#install-the-package)\n * [Register a new AAD application](https://docs.microsoft.com/azure/active-directory/develop/quickstart-register-app) and give permissions to access Azure Storage\n * [Grant access](https://docs.microsoft.com/azure/storage/common/storage-auth-aad-rbac-portal) to Azure Blob data with RBAC in the Azure Portal\n * Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables:\n AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET\n\n Use the returned token credential to authenticate the client:\n ```python\n from azure.identity import DefaultAzureCredential\n from azure.storage.blob import BlobServiceClient\n token_credential = DefaultAzureCredential()\n\n blob_service_client = BlobServiceClient(\n account_url=\"https://.blob.core.windows.net\",\n credential=token_credential\n )\n ```\n\n2. To use a [shared access signature (SAS) token](https://docs.microsoft.com/azure/storage/common/storage-sas-overview),\n provide the token as a string. If your account URL includes the SAS token, omit the credential parameter.\n You can generate a SAS token from the Azure Portal under \"Shared access signature\" or use one of the `generate_sas()`\n functions to create a sas token for the storage account, container, or blob:\n\n ```python\n from datetime import datetime, timedelta\n from azure.storage.blob import BlobServiceClient, generate_account_sas, ResourceTypes, AccountSasPermissions\n\n sas_token = generate_account_sas(\n account_name=\"\",\n account_key=\"\",\n resource_types=ResourceTypes(service=True),\n permission=AccountSasPermissions(read=True),\n expiry=datetime.utcnow() + timedelta(hours=1)\n )\n\n blob_service_client = BlobServiceClient(account_url=\"https://.blob.core.windows.net\", credential=sas_token)\n ```\n\n3. To use a storage account [shared key](https://docs.microsoft.com/rest/api/storageservices/authenticate-with-shared-key/)\n (aka account key or access key), provide the key as a string. This can be found in the Azure Portal under the \"Access Keys\"\n section or by running the following Azure CLI command:\n\n ```az storage account keys list -g MyResourceGroup -n MyStorageAccount```\n\n Use the key as the credential parameter to authenticate the client:\n ```python\n from azure.storage.blob import BlobServiceClient\n service = BlobServiceClient(account_url=\"https://.blob.core.windows.net\", credential=\"\")\n ```\n \n If you are using **customized url** (which means the url is not in this format `.blob.core.windows.net`),\n please instantiate the client using the credential below:\n ```python\n from azure.storage.blob import BlobServiceClient\n service = BlobServiceClient(account_url=\"https://.blob.core.windows.net\", \n credential={\"account_name\": \"\", \"account_key\":\"\"})\n ```\n\n4. To use [anonymous public read access](https://docs.microsoft.com/azure/storage/blobs/storage-manage-access-to-resources),\n simply omit the credential parameter.\n\n#### Creating the client from a connection string\nDepending on your use case and authorization method, you may prefer to initialize a client instance with a storage\nconnection string instead of providing the account URL and credential separately. To do this, pass the storage\nconnection string to the client's `from_connection_string` class method:\n\n```python\nfrom azure.storage.blob import BlobServiceClient\n\nconnection_string = \"DefaultEndpointsProtocol=https;AccountName=xxxx;AccountKey=xxxx;EndpointSuffix=core.windows.net\"\nservice = BlobServiceClient.from_connection_string(conn_str=connection_string)\n```\n\nThe connection string to your storage account can be found in the Azure Portal under the \"Access Keys\" section or by running the following CLI command:\n\n```bash\naz storage account show-connection-string -g MyResourceGroup -n MyStorageAccount\n```\n\n## Key concepts\nThe following components make up the Azure Blob Service:\n* The storage account itself\n* A container within the storage account\n* A blob within a container\n\nThe Azure Storage Blobs client library for Python allows you to interact with each of these components through the\nuse of a dedicated client object.\n\n### Clients\nFour different clients are provided to interact with the various components of the Blob Service:\n1. [BlobServiceClient](https://aka.ms/azsdk-python-storage-blob-blobserviceclient) -\n this client represents interaction with the Azure storage account itself, and allows you to acquire preconfigured\n client instances to access the containers and blobs within. It provides operations to retrieve and configure the\n account properties as well as list, create, and delete containers within the account. To perform operations on a\n specific container or blob, retrieve a client using the `get_container_client` or `get_blob_client` methods.\n2. [ContainerClient](https://aka.ms/azsdk-python-storage-blob-containerclient) -\n this client represents interaction with a specific container (which need not exist yet), and allows you to acquire\n preconfigured client instances to access the blobs within. It provides operations to create, delete, or configure a\n container and includes operations to list, upload, and delete the blobs within it. To perform operations on a\n specific blob within the container, retrieve a client using the `get_blob_client` method.\n3. [BlobClient](https://aka.ms/azsdk-python-storage-blob-blobclient) -\n this client represents interaction with a specific blob (which need not exist yet). It provides operations to\n upload, download, delete, and create snapshots of a blob, as well as specific operations per blob type.\n4. [BlobLeaseClient](https://aka.ms/azsdk-python-storage-blob-blobleaseclient) -\n this client represents lease interactions with a `ContainerClient` or `BlobClient`. It provides operations to\n acquire, renew, release, change, and break a lease on a specified resource.\n\n### Async Clients \nThis library includes a complete async API supported on Python 3.5+. To use it, you must\nfirst install an async transport, such as [aiohttp](https://pypi.org/project/aiohttp/).\nSee\n[azure-core documentation](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md#transport)\nfor more information.\n\nAsync clients and credentials should be closed when they're no longer needed. These\nobjects are async context managers and define async `close` methods.\n\n### Blob Types\nOnce you've initialized a Client, you can choose from the different types of blobs:\n* [Block blobs](https://docs.microsoft.com/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs#about-block-blobs)\n store text and binary data, up to approximately 4.75 TiB. Block blobs are made up of blocks of data that can be\n managed individually\n* [Append blobs](https://docs.microsoft.com/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs#about-append-blobs)\n are made up of blocks like block blobs, but are optimized for append operations. Append blobs are ideal for scenarios\n such as logging data from virtual machines\n* [Page blobs](https://docs.microsoft.com/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs#about-page-blobs)\n store random access files up to 8 TiB in size. Page blobs store virtual hard drive (VHD) files and serve as disks for\n Azure virtual machines\n\n## Examples\nThe following sections provide several code snippets covering some of the most common Storage Blob tasks, including:\n\n* [Create a container](#create-a-container \"Create a container\")\n* [Uploading a blob](#uploading-a-blob \"Uploading a blob\")\n* [Downloading a blob](#downloading-a-blob \"Downloading a blob\")\n* [Enumerating blobs](#enumerating-blobs \"Enumerating blobs\")\n\nNote that a container must be created before to upload or download a blob.\n\n### Create a container\n\nCreate a container from where you can upload or download blobs.\n```python\nfrom azure.storage.blob import ContainerClient\n\ncontainer_client = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\ncontainer_client.create_container()\n```\n\nUse the async client to upload a blob\n\n```python\nfrom azure.storage.blob.aio import ContainerClient\n\ncontainer_client = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\nawait container_client.create_container()\n```\n\n### Uploading a blob\nUpload a blob to your container\n\n```python\nfrom azure.storage.blob import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./SampleSource.txt\", \"rb\") as data:\n blob.upload_blob(data)\n```\n\nUse the async client to upload a blob\n\n```python\nfrom azure.storage.blob.aio import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./SampleSource.txt\", \"rb\") as data:\n await blob.upload_blob(data)\n```\n\n### Downloading a blob\nDownload a blob from your container\n\n```python\nfrom azure.storage.blob import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./BlockDestination.txt\", \"wb\") as my_blob:\n blob_data = blob.download_blob()\n blob_data.readinto(my_blob)\n```\n\nDownload a blob asynchronously\n\n```python\nfrom azure.storage.blob.aio import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./BlockDestination.txt\", \"wb\") as my_blob:\n stream = await blob.download_blob()\n data = await stream.readall()\n my_blob.write(data)\n```\n\n### Enumerating blobs\nList the blobs in your container\n\n```python\nfrom azure.storage.blob import ContainerClient\n\ncontainer = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\nblob_list = container.list_blobs()\nfor blob in blob_list:\n print(blob.name + '\\n')\n```\n\nList the blobs asynchronously\n\n```python\nfrom azure.storage.blob.aio import ContainerClient\n\ncontainer = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\nblob_list = []\nasync for blob in container.list_blobs():\n blob_list.append(blob)\nprint(blob_list)\n```\n\n## Optional Configuration\n\nOptional keyword arguments that can be passed in at the client and per-operation level.\n\n### Retry Policy configuration\n\nUse the following keyword arguments when instantiating a client to configure the retry policy:\n\n* __retry_total__ (int): Total number of retries to allow. Takes precedence over other counts.\nPass in `retry_total=0` if you do not want to retry on requests. Defaults to 10.\n* __retry_connect__ (int): How many connection-related errors to retry on. Defaults to 3.\n* __retry_read__ (int): How many times to retry on read errors. Defaults to 3.\n* __retry_status__ (int): How many times to retry on bad status codes. Defaults to 3.\n* __retry_to_secondary__ (bool): Whether the request should be retried to secondary, if able.\nThis should only be enabled of RA-GRS accounts are used and potentially stale data can be handled.\nDefaults to `False`.\n\n### Encryption configuration\n\nUse the following keyword arguments when instantiating a client to configure encryption:\n\n* __require_encryption__ (bool): If set to True, will enforce that objects are encrypted and decrypt them.\n* __encryption_version__ (str): Specifies the version of encryption to use. Current options are `'2.0'` or `'1.0'` and\nthe default value is `'1.0'`. Version 1.0 is deprecated, and it is **highly recommended** to use version 2.0.\n* __key_encryption_key__ (object): The user-provided key-encryption-key. The instance must implement the following methods:\n - `wrap_key(key)`--wraps the specified key using an algorithm of the user's choice.\n - `get_key_wrap_algorithm()`--returns the algorithm used to wrap the specified symmetric key.\n - `get_kid()`--returns a string key id for this key-encryption-key.\n* __key_resolver_function__ (callable): The user-provided key resolver. Uses the kid string to return a key-encryption-key\nimplementing the interface defined above.\n\n### Other client / per-operation configuration\n\nOther optional configuration keyword arguments that can be specified on the client or per-operation.\n\n**Client keyword arguments:**\n\n* __connection_timeout__ (int): The number of seconds the client will wait to establish a connection to the server.\nDefaults to 20 seconds.\n* __read_timeout__ (int): The number of seconds the client will wait, between consecutive read operations, for a\nresponse from the server. This is a socket level timeout and is not affected by overall data size. Client-side read \ntimeouts will be automatically retried. Defaults to 60 seconds.\n* __transport__ (Any): User-provided transport to send the HTTP request.\n\n**Per-operation keyword arguments:**\n\n* __raw_response_hook__ (callable): The given callback uses the response returned from the service.\n* __raw_request_hook__ (callable): The given callback uses the request before being sent to service.\n* __client_request_id__ (str): Optional user specified identification of the request.\n* __user_agent__ (str): Appends the custom value to the user-agent header to be sent with the request.\n* __logging_enable__ (bool): Enables logging at the DEBUG level. Defaults to False. Can also be passed in at\nthe client level to enable it for all requests.\n* __logging_body__ (bool): Enables logging the request and response body. Defaults to False. Can also be passed in at\nthe client level to enable it for all requests.\n* __headers__ (dict): Pass in custom headers as key, value pairs. E.g. `headers={'CustomValue': value}`\n\n## Troubleshooting\n### General\nStorage Blob clients raise exceptions defined in [Azure Core](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/README.md).\n\nThis list can be used for reference to catch thrown exceptions. To get the specific error code of the exception, use the `error_code` attribute, i.e, `exception.error_code`.\n\n### Logging\nThis library uses the standard\n[logging](https://docs.python.org/3/library/logging.html) library for logging.\nBasic information about HTTP sessions (URLs, headers, etc.) is logged at INFO\nlevel.\n\nDetailed DEBUG level logging, including request/response bodies and unredacted\nheaders, can be enabled on a client with the `logging_enable` argument:\n```python\nimport sys\nimport logging\nfrom azure.storage.blob import BlobServiceClient\n\n# Create a logger for the 'azure.storage.blob' SDK\nlogger = logging.getLogger('azure.storage.blob')\nlogger.setLevel(logging.DEBUG)\n\n# Configure a console output\nhandler = logging.StreamHandler(stream=sys.stdout)\nlogger.addHandler(handler)\n\n# This client will log detailed information about its HTTP sessions, at DEBUG level\nservice_client = BlobServiceClient.from_connection_string(\"your_connection_string\", logging_enable=True)\n```\n\nSimilarly, `logging_enable` can enable detailed logging for a single operation,\neven when it isn't enabled for the client:\n```python\nservice_client.get_service_stats(logging_enable=True)\n```\n\n## Next steps\n\n### More sample code\n\nGet started with our [Blob samples](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples).\n\nSeveral Storage Blobs Python SDK samples are available to you in the SDK's GitHub repository. These samples provide example code for additional scenarios commonly encountered while working with Storage Blobs:\n\n* [blob_samples_container_access_policy.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_container_access_policy.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_container_access_policy_async.py)) - Examples to set Access policies:\n * Set up Access Policy for container\n\n* [blob_samples_hello_world.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_hello_world.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_hello_world_async.py)) - Examples for common Storage Blob tasks:\n * Set up a container\n * Create a block, page, or append blob\n * Upload blobs\n * Download blobs\n * Delete blobs\n\n* [blob_samples_authentication.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_authentication.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_authentication_async.py)) - Examples for authenticating and creating the client:\n * From a connection string\n * From a shared access key\n * From a shared access signature token\n * From active directory\n\n* [blob_samples_service.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_service.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_service_async.py)) - Examples for interacting with the blob service:\n * Get account information\n * Get and set service properties\n * Get service statistics\n * Create, list, and delete containers\n * Get the Blob or Container client\n\n* [blob_samples_containers.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_containers.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_containers_async.py)) - Examples for interacting with containers:\n * Create a container and delete containers\n * Set metadata on containers\n * Get container properties\n * Acquire a lease on container\n * Set an access policy on a container\n * Upload, list, delete blobs in container\n * Get the blob client to interact with a specific blob\n\n* [blob_samples_common.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_common.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_common_async.py)) - Examples common to all types of blobs:\n * Create a snapshot\n * Delete a blob snapshot\n * Soft delete a blob\n * Undelete a blob\n * Acquire a lease on a blob\n * Copy a blob from a URL\n\n* [blob_samples_directory_interface.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_directory_interface.py) - Examples for interfacing with Blob storage as if it were a directory on a filesystem:\n * Copy (upload or download) a single file or directory\n * List files or directories at a single level or recursively\n * Delete a single file or recursively delete a directory\n\n### Additional documentation\nFor more extensive documentation on Azure Blob storage, see the [Azure Blob storage documentation](https://docs.microsoft.com/azure/storage/blobs/) on docs.microsoft.com.\n\n## Contributing\nThis project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.", - "release_date": "2023-07-11T22:58:40", + "release_date": "2023-09-13T23:16:07", "parties": [ { "type": "person", @@ -453,6 +459,8 @@ } ], "keywords": [ + "azure", + "azure sdk", "Development Status :: 5 - Production/Stable", "Programming Language :: Python", "Programming Language :: Python :: 3", @@ -463,11 +471,11 @@ "Programming Language :: Python :: 3.9" ], "homepage_url": "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob", - "download_url": "https://files.pythonhosted.org/packages/bd/5f/64a471e09f064b3b3a53529ecd9ed8facfebfafff3dad7ee9350f3a00a30/azure-storage-blob-12.17.0.zip", - "size": 698725, + "download_url": "https://files.pythonhosted.org/packages/1c/1f/5cacdd7574538fb77071c1b4b69dbb3b1716204803fd224b799dee4e260a/azure-storage-blob-12.18.1.tar.gz", + "size": 548770, "sha1": null, - "md5": "0dcc1fe3655773d6f3817a9b8e6db855", - "sha256": "c14b785a17050b30fc326a315bdae6bc4a078855f4f94a4c303ad74a48dc8c63", + "md5": "eb7d0f1f49d5409bd4b88e14382087a5", + "sha256": "d3265c2403c28d8881326c365e9cf7ed2ad55fdac98404eae753548702b31ba2", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -487,9 +495,9 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/azure-storage-blob/12.17.0/json", + "api_data_url": "https://pypi.org/pypi/azure-storage-blob/12.18.1/json", "datasource_id": null, - "purl": "pkg:pypi/azure-storage-blob@12.17.0" + "purl": "pkg:pypi/azure-storage-blob@12.18.1" }, { "type": "pypi", @@ -889,12 +897,12 @@ "type": "pypi", "namespace": null, "name": "click", - "version": "8.1.6", + "version": "8.1.7", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "Composable command line interface toolkit\n\\$ click\\_\n==========\n\nClick is a Python package for creating beautiful command line interfaces\nin a composable way with as little code as necessary. It's the \"Command\nLine Interface Creation Kit\". It's highly configurable but comes with\nsensible defaults out of the box.\n\nIt aims to make the process of writing command line tools quick and fun\nwhile also preventing any frustration caused by the inability to\nimplement an intended CLI API.\n\nClick in three points:\n\n- Arbitrary nesting of commands\n- Automatic help page generation\n- Supports lazy loading of subcommands at runtime\n\n\nInstalling\n----------\n\nInstall and update using `pip`_:\n\n.. code-block:: text\n\n $ pip install -U click\n\n.. _pip: https://pip.pypa.io/en/stable/getting-started/\n\n\nA Simple Example\n----------------\n\n.. code-block:: python\n\n import click\n\n @click.command()\n @click.option(\"--count\", default=1, help=\"Number of greetings.\")\n @click.option(\"--name\", prompt=\"Your name\", help=\"The person to greet.\")\n def hello(count, name):\n \"\"\"Simple program that greets NAME for a total of COUNT times.\"\"\"\n for _ in range(count):\n click.echo(f\"Hello, {name}!\")\n\n if __name__ == '__main__':\n hello()\n\n.. code-block:: text\n\n $ python hello.py --count=3\n Your name: Click\n Hello, Click!\n Hello, Click!\n Hello, Click!\n\n\nDonate\n------\n\nThe Pallets organization develops and supports Click and other popular\npackages. In order to grow the community of contributors and users, and\nallow the maintainers to devote more time to the projects, `please\ndonate today`_.\n\n.. _please donate today: https://palletsprojects.com/donate\n\n\nLinks\n-----\n\n- Documentation: https://click.palletsprojects.com/\n- Changes: https://click.palletsprojects.com/changes/\n- PyPI Releases: https://pypi.org/project/click/\n- Source Code: https://github.com/pallets/click\n- Issue Tracker: https://github.com/pallets/click/issues\n- Chat: https://discord.gg/pallets", - "release_date": "2023-07-18T20:05:12", + "release_date": "2023-08-17T17:29:10", "parties": [ { "type": "person", @@ -911,11 +919,11 @@ "Programming Language :: Python" ], "homepage_url": "https://palletsprojects.com/p/click/", - "download_url": "https://files.pythonhosted.org/packages/1a/70/e63223f8116931d365993d4a6b7ef653a4d920b41d03de7c59499962821f/click-8.1.6-py3-none-any.whl", - "size": 97909, + "download_url": "https://files.pythonhosted.org/packages/00/2e/d53fa4befbf2cfa713304affc7ca780ce4fc1fd8710527771b58311a3229/click-8.1.7-py3-none-any.whl", + "size": 97941, "sha1": null, - "md5": "043416d14751ae24c8e8b0968b6fff78", - "sha256": "fa244bb30b3b5ee2cae3da8f55c9e5e0c0e86093306301fb418eb9dc40fbded5", + "md5": "37a41134cc8a13400234746942d5d180", + "sha256": "ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28", "sha512": null, "bug_tracking_url": "https://github.com/pallets/click/issues/", "code_view_url": "https://github.com/pallets/click/", @@ -935,20 +943,20 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/click/8.1.6/json", + "api_data_url": "https://pypi.org/pypi/click/8.1.7/json", "datasource_id": null, - "purl": "pkg:pypi/click@8.1.6" + "purl": "pkg:pypi/click@8.1.7" }, { "type": "pypi", "namespace": null, "name": "click", - "version": "8.1.6", + "version": "8.1.7", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "Composable command line interface toolkit\n\\$ click\\_\n==========\n\nClick is a Python package for creating beautiful command line interfaces\nin a composable way with as little code as necessary. It's the \"Command\nLine Interface Creation Kit\". It's highly configurable but comes with\nsensible defaults out of the box.\n\nIt aims to make the process of writing command line tools quick and fun\nwhile also preventing any frustration caused by the inability to\nimplement an intended CLI API.\n\nClick in three points:\n\n- Arbitrary nesting of commands\n- Automatic help page generation\n- Supports lazy loading of subcommands at runtime\n\n\nInstalling\n----------\n\nInstall and update using `pip`_:\n\n.. code-block:: text\n\n $ pip install -U click\n\n.. _pip: https://pip.pypa.io/en/stable/getting-started/\n\n\nA Simple Example\n----------------\n\n.. code-block:: python\n\n import click\n\n @click.command()\n @click.option(\"--count\", default=1, help=\"Number of greetings.\")\n @click.option(\"--name\", prompt=\"Your name\", help=\"The person to greet.\")\n def hello(count, name):\n \"\"\"Simple program that greets NAME for a total of COUNT times.\"\"\"\n for _ in range(count):\n click.echo(f\"Hello, {name}!\")\n\n if __name__ == '__main__':\n hello()\n\n.. code-block:: text\n\n $ python hello.py --count=3\n Your name: Click\n Hello, Click!\n Hello, Click!\n Hello, Click!\n\n\nDonate\n------\n\nThe Pallets organization develops and supports Click and other popular\npackages. In order to grow the community of contributors and users, and\nallow the maintainers to devote more time to the projects, `please\ndonate today`_.\n\n.. _please donate today: https://palletsprojects.com/donate\n\n\nLinks\n-----\n\n- Documentation: https://click.palletsprojects.com/\n- Changes: https://click.palletsprojects.com/changes/\n- PyPI Releases: https://pypi.org/project/click/\n- Source Code: https://github.com/pallets/click\n- Issue Tracker: https://github.com/pallets/click/issues\n- Chat: https://discord.gg/pallets", - "release_date": "2023-07-18T20:05:13", + "release_date": "2023-08-17T17:29:11", "parties": [ { "type": "person", @@ -965,11 +973,11 @@ "Programming Language :: Python" ], "homepage_url": "https://palletsprojects.com/p/click/", - "download_url": "https://files.pythonhosted.org/packages/72/bd/fedc277e7351917b6c4e0ac751853a97af261278a4c7808babafa8ef2120/click-8.1.6.tar.gz", - "size": 336051, + "download_url": "https://files.pythonhosted.org/packages/96/d3/f04c7bfcf5c1862a2a5b845c6b2b360488cf47af55dfa79c98f6a6bf98b5/click-8.1.7.tar.gz", + "size": 336121, "sha1": null, - "md5": "0ad74cc10856930a76b0560ccc55c162", - "sha256": "48ee849951919527a045bfe3bf7baa8a959c423134e1a5b98c05c20ba75a1cbd", + "md5": "7c3b52c56fd30699f453a7dc7b42cecb", + "sha256": "ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de", "sha512": null, "bug_tracking_url": "https://github.com/pallets/click/issues/", "code_view_url": "https://github.com/pallets/click/", @@ -989,20 +997,20 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/click/8.1.6/json", + "api_data_url": "https://pypi.org/pypi/click/8.1.7/json", "datasource_id": null, - "purl": "pkg:pypi/click@8.1.6" + "purl": "pkg:pypi/click@8.1.7" }, { "type": "pypi", "namespace": null, "name": "cryptography", - "version": "41.0.3", + "version": "41.0.4", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "cryptography is a package which provides cryptographic recipes and primitives to Python developers.\npyca/cryptography\n=================\n\n.. image:: https://img.shields.io/pypi/v/cryptography.svg\n :target: https://pypi.org/project/cryptography/\n :alt: Latest Version\n\n.. image:: https://readthedocs.org/projects/cryptography/badge/?version=latest\n :target: https://cryptography.io\n :alt: Latest Docs\n\n.. image:: https://github.com/pyca/cryptography/workflows/CI/badge.svg?branch=main\n :target: https://github.com/pyca/cryptography/actions?query=workflow%3ACI+branch%3Amain\n\n\n``cryptography`` is a package which provides cryptographic recipes and\nprimitives to Python developers. Our goal is for it to be your \"cryptographic\nstandard library\". It supports Python 3.7+ and PyPy3 7.3.10+.\n\n``cryptography`` includes both high level recipes and low level interfaces to\ncommon cryptographic algorithms such as symmetric ciphers, message digests, and\nkey derivation functions. For example, to encrypt something with\n``cryptography``'s high level symmetric encryption recipe:\n\n.. code-block:: pycon\n\n >>> from cryptography.fernet import Fernet\n >>> # Put this somewhere safe!\n >>> key = Fernet.generate_key()\n >>> f = Fernet(key)\n >>> token = f.encrypt(b\"A really secret message. Not for prying eyes.\")\n >>> token\n b'...'\n >>> f.decrypt(token)\n b'A really secret message. Not for prying eyes.'\n\nYou can find more information in the `documentation`_.\n\nYou can install ``cryptography`` with:\n\n.. code-block:: console\n\n $ pip install cryptography\n\nFor full details see `the installation documentation`_.\n\nDiscussion\n~~~~~~~~~~\n\nIf you run into bugs, you can file them in our `issue tracker`_.\n\nWe maintain a `cryptography-dev`_ mailing list for development discussion.\n\nYou can also join ``#pyca`` on ``irc.libera.chat`` to ask questions or get\ninvolved.\n\nSecurity\n~~~~~~~~\n\nNeed to report a security issue? Please consult our `security reporting`_\ndocumentation.\n\n\n.. _`documentation`: https://cryptography.io/\n.. _`the installation documentation`: https://cryptography.io/en/latest/installation/\n.. _`issue tracker`: https://github.com/pyca/cryptography/issues\n.. _`cryptography-dev`: https://mail.python.org/mailman/listinfo/cryptography-dev\n.. _`security reporting`: https://cryptography.io/en/latest/security/", - "release_date": "2023-08-01T20:35:42", + "release_date": "2023-09-19T16:32:09", "parties": [ { "type": "person", @@ -1034,11 +1042,11 @@ "Topic :: Security :: Cryptography" ], "homepage_url": "", - "download_url": "https://files.pythonhosted.org/packages/21/74/a7ebb5bcf733b1626e4778941e505792d7f655e799ff3bdbd9a176516ee2/cryptography-41.0.3-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", - "size": 4308894, + "download_url": "https://files.pythonhosted.org/packages/25/1d/f86ce362aedc580c3f90c0d74fa097289e3af9ba52b8d5a37369c186b0f1/cryptography-41.0.4-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", + "size": 4381291, "sha1": null, - "md5": "c7fce3b285651310e92cfe5a6e299898", - "sha256": "84537453d57f55a50a5b6835622ee405816999a7113267739a1b4581f83535bd", + "md5": "051e544f02f352ed12a9847ec5f037dc", + "sha256": "e40211b4923ba5a6dc9769eab704bdb3fbb58d56c5b336d30996c24fcf12aadb", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -1059,20 +1067,20 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/cryptography/41.0.3/json", + "api_data_url": "https://pypi.org/pypi/cryptography/41.0.4/json", "datasource_id": null, - "purl": "pkg:pypi/cryptography@41.0.3" + "purl": "pkg:pypi/cryptography@41.0.4" }, { "type": "pypi", "namespace": null, "name": "cryptography", - "version": "41.0.3", + "version": "41.0.4", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "cryptography is a package which provides cryptographic recipes and primitives to Python developers.\npyca/cryptography\n=================\n\n.. image:: https://img.shields.io/pypi/v/cryptography.svg\n :target: https://pypi.org/project/cryptography/\n :alt: Latest Version\n\n.. image:: https://readthedocs.org/projects/cryptography/badge/?version=latest\n :target: https://cryptography.io\n :alt: Latest Docs\n\n.. image:: https://github.com/pyca/cryptography/workflows/CI/badge.svg?branch=main\n :target: https://github.com/pyca/cryptography/actions?query=workflow%3ACI+branch%3Amain\n\n\n``cryptography`` is a package which provides cryptographic recipes and\nprimitives to Python developers. Our goal is for it to be your \"cryptographic\nstandard library\". It supports Python 3.7+ and PyPy3 7.3.10+.\n\n``cryptography`` includes both high level recipes and low level interfaces to\ncommon cryptographic algorithms such as symmetric ciphers, message digests, and\nkey derivation functions. For example, to encrypt something with\n``cryptography``'s high level symmetric encryption recipe:\n\n.. code-block:: pycon\n\n >>> from cryptography.fernet import Fernet\n >>> # Put this somewhere safe!\n >>> key = Fernet.generate_key()\n >>> f = Fernet(key)\n >>> token = f.encrypt(b\"A really secret message. Not for prying eyes.\")\n >>> token\n b'...'\n >>> f.decrypt(token)\n b'A really secret message. Not for prying eyes.'\n\nYou can find more information in the `documentation`_.\n\nYou can install ``cryptography`` with:\n\n.. code-block:: console\n\n $ pip install cryptography\n\nFor full details see `the installation documentation`_.\n\nDiscussion\n~~~~~~~~~~\n\nIf you run into bugs, you can file them in our `issue tracker`_.\n\nWe maintain a `cryptography-dev`_ mailing list for development discussion.\n\nYou can also join ``#pyca`` on ``irc.libera.chat`` to ask questions or get\ninvolved.\n\nSecurity\n~~~~~~~~\n\nNeed to report a security issue? Please consult our `security reporting`_\ndocumentation.\n\n\n.. _`documentation`: https://cryptography.io/\n.. _`the installation documentation`: https://cryptography.io/en/latest/installation/\n.. _`issue tracker`: https://github.com/pyca/cryptography/issues\n.. _`cryptography-dev`: https://mail.python.org/mailman/listinfo/cryptography-dev\n.. _`security reporting`: https://cryptography.io/en/latest/security/", - "release_date": "2023-08-01T20:36:22", + "release_date": "2023-09-19T16:32:46", "parties": [ { "type": "person", @@ -1104,11 +1112,11 @@ "Topic :: Security :: Cryptography" ], "homepage_url": "", - "download_url": "https://files.pythonhosted.org/packages/8e/5d/2bf54672898375d081cb24b30baeb7793568ae5d958ef781349e9635d1c8/cryptography-41.0.3.tar.gz", - "size": 630139, + "download_url": "https://files.pythonhosted.org/packages/ef/33/87512644b788b00a250203382e40ee7040ae6fa6b4c4a31dcfeeaa26043b/cryptography-41.0.4.tar.gz", + "size": 630506, "sha1": null, - "md5": "fbf930acd8de95780604c40c4e817a74", - "sha256": "6d192741113ef5e30d89dcb5b956ef4e1578f304708701b8b73d38e3e1461f34", + "md5": "e53b22d4baae5430e881f2f516effa67", + "sha256": "7febc3094125fc126a7f6fb1f420d0da639f3f32cb15c8ff0dc3997c4549f51a", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -1129,9 +1137,9 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/cryptography/41.0.3/json", + "api_data_url": "https://pypi.org/pypi/cryptography/41.0.4/json", "datasource_id": null, - "purl": "pkg:pypi/cryptography@41.0.3" + "purl": "pkg:pypi/cryptography@41.0.4" }, { "type": "pypi", @@ -2173,12 +2181,12 @@ "type": "pypi", "namespace": null, "name": "typing-extensions", - "version": "4.7.1", + "version": "4.8.0", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "Backported and Experimental Type Hints for Python 3.7+\n# Typing Extensions\n\n[![Chat at https://gitter.im/python/typing](https://badges.gitter.im/python/typing.svg)](https://gitter.im/python/typing)\n\n[Documentation](https://typing-extensions.readthedocs.io/en/latest/#) \u2013\n[PyPI](https://pypi.org/project/typing-extensions/)\n\n## Overview\n\nThe `typing_extensions` module serves two related purposes:\n\n- Enable use of new type system features on older Python versions. For example,\n `typing.TypeGuard` is new in Python 3.10, but `typing_extensions` allows\n users on previous Python versions to use it too.\n- Enable experimentation with new type system PEPs before they are accepted and\n added to the `typing` module.\n\n`typing_extensions` is treated specially by static type checkers such as\nmypy and pyright. Objects defined in `typing_extensions` are treated the same\nway as equivalent forms in `typing`.\n\n`typing_extensions` uses\n[Semantic Versioning](https://semver.org/). The\nmajor version will be incremented only for backwards-incompatible changes.\nTherefore, it's safe to depend\non `typing_extensions` like this: `typing_extensions >=x.y, <(x+1)`,\nwhere `x.y` is the first version that includes all features you need.\n\n`typing_extensions` supports Python versions 3.7 and higher.\n\n## Included items\n\nSee [the documentation](https://typing-extensions.readthedocs.io/en/latest/#) for a\ncomplete listing of module contents.\n\n## Contributing\n\nSee [CONTRIBUTING.md](https://github.com/python/typing_extensions/blob/main/CONTRIBUTING.md)\nfor how to contribute to `typing_extensions`.", - "release_date": "2023-07-02T14:20:53", + "description": "Backported and Experimental Type Hints for Python 3.8+\n# Typing Extensions\n\n[![Chat at https://gitter.im/python/typing](https://badges.gitter.im/python/typing.svg)](https://gitter.im/python/typing)\n\n[Documentation](https://typing-extensions.readthedocs.io/en/latest/#) \u2013\n[PyPI](https://pypi.org/project/typing-extensions/)\n\n## Overview\n\nThe `typing_extensions` module serves two related purposes:\n\n- Enable use of new type system features on older Python versions. For example,\n `typing.TypeGuard` is new in Python 3.10, but `typing_extensions` allows\n users on previous Python versions to use it too.\n- Enable experimentation with new type system PEPs before they are accepted and\n added to the `typing` module.\n\n`typing_extensions` is treated specially by static type checkers such as\nmypy and pyright. Objects defined in `typing_extensions` are treated the same\nway as equivalent forms in `typing`.\n\n`typing_extensions` uses\n[Semantic Versioning](https://semver.org/). The\nmajor version will be incremented only for backwards-incompatible changes.\nTherefore, it's safe to depend\non `typing_extensions` like this: `typing_extensions >=x.y, <(x+1)`,\nwhere `x.y` is the first version that includes all features you need.\n\n## Included items\n\nSee [the documentation](https://typing-extensions.readthedocs.io/en/latest/#) for a\ncomplete listing of module contents.\n\n## Contributing\n\nSee [CONTRIBUTING.md](https://github.com/python/typing_extensions/blob/main/CONTRIBUTING.md)\nfor how to contribute to `typing_extensions`.", + "release_date": "2023-09-18T04:01:55", "parties": [ { "type": "person", @@ -2210,17 +2218,16 @@ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Software Development" ], "homepage_url": "", - "download_url": "https://files.pythonhosted.org/packages/ec/6b/63cc3df74987c36fe26157ee12e09e8f9db4de771e0f3404263117e75b95/typing_extensions-4.7.1-py3-none-any.whl", - "size": 33232, + "download_url": "https://files.pythonhosted.org/packages/24/21/7d397a4b7934ff4028987914ac1044d3b7d52712f30e2ac7a2ae5bc86dd0/typing_extensions-4.8.0-py3-none-any.whl", + "size": 31584, "sha1": null, - "md5": "a9431036b53f8fda2a50a81c2e880848", - "sha256": "440d5dd3af93b060174bf433bccd69b0babc3b15b1a8dca43789fd7f61514b36", + "md5": "9c84e613da80ced7a5e86329ec75dc6c", + "sha256": "8f92fc8806f9a6b641eaa5318da32b44d401efaac0f6678c9bc448ba3605faa0", "sha512": null, "bug_tracking_url": "https://github.com/python/typing_extensions/issues", "code_view_url": null, @@ -2239,20 +2246,20 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/typing-extensions/4.7.1/json", + "api_data_url": "https://pypi.org/pypi/typing-extensions/4.8.0/json", "datasource_id": null, - "purl": "pkg:pypi/typing-extensions@4.7.1" + "purl": "pkg:pypi/typing-extensions@4.8.0" }, { "type": "pypi", "namespace": null, "name": "typing-extensions", - "version": "4.7.1", + "version": "4.8.0", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "Backported and Experimental Type Hints for Python 3.7+\n# Typing Extensions\n\n[![Chat at https://gitter.im/python/typing](https://badges.gitter.im/python/typing.svg)](https://gitter.im/python/typing)\n\n[Documentation](https://typing-extensions.readthedocs.io/en/latest/#) \u2013\n[PyPI](https://pypi.org/project/typing-extensions/)\n\n## Overview\n\nThe `typing_extensions` module serves two related purposes:\n\n- Enable use of new type system features on older Python versions. For example,\n `typing.TypeGuard` is new in Python 3.10, but `typing_extensions` allows\n users on previous Python versions to use it too.\n- Enable experimentation with new type system PEPs before they are accepted and\n added to the `typing` module.\n\n`typing_extensions` is treated specially by static type checkers such as\nmypy and pyright. Objects defined in `typing_extensions` are treated the same\nway as equivalent forms in `typing`.\n\n`typing_extensions` uses\n[Semantic Versioning](https://semver.org/). The\nmajor version will be incremented only for backwards-incompatible changes.\nTherefore, it's safe to depend\non `typing_extensions` like this: `typing_extensions >=x.y, <(x+1)`,\nwhere `x.y` is the first version that includes all features you need.\n\n`typing_extensions` supports Python versions 3.7 and higher.\n\n## Included items\n\nSee [the documentation](https://typing-extensions.readthedocs.io/en/latest/#) for a\ncomplete listing of module contents.\n\n## Contributing\n\nSee [CONTRIBUTING.md](https://github.com/python/typing_extensions/blob/main/CONTRIBUTING.md)\nfor how to contribute to `typing_extensions`.", - "release_date": "2023-07-02T14:20:55", + "description": "Backported and Experimental Type Hints for Python 3.8+\n# Typing Extensions\n\n[![Chat at https://gitter.im/python/typing](https://badges.gitter.im/python/typing.svg)](https://gitter.im/python/typing)\n\n[Documentation](https://typing-extensions.readthedocs.io/en/latest/#) \u2013\n[PyPI](https://pypi.org/project/typing-extensions/)\n\n## Overview\n\nThe `typing_extensions` module serves two related purposes:\n\n- Enable use of new type system features on older Python versions. For example,\n `typing.TypeGuard` is new in Python 3.10, but `typing_extensions` allows\n users on previous Python versions to use it too.\n- Enable experimentation with new type system PEPs before they are accepted and\n added to the `typing` module.\n\n`typing_extensions` is treated specially by static type checkers such as\nmypy and pyright. Objects defined in `typing_extensions` are treated the same\nway as equivalent forms in `typing`.\n\n`typing_extensions` uses\n[Semantic Versioning](https://semver.org/). The\nmajor version will be incremented only for backwards-incompatible changes.\nTherefore, it's safe to depend\non `typing_extensions` like this: `typing_extensions >=x.y, <(x+1)`,\nwhere `x.y` is the first version that includes all features you need.\n\n## Included items\n\nSee [the documentation](https://typing-extensions.readthedocs.io/en/latest/#) for a\ncomplete listing of module contents.\n\n## Contributing\n\nSee [CONTRIBUTING.md](https://github.com/python/typing_extensions/blob/main/CONTRIBUTING.md)\nfor how to contribute to `typing_extensions`.", + "release_date": "2023-09-18T04:01:56", "parties": [ { "type": "person", @@ -2284,17 +2291,16 @@ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Software Development" ], "homepage_url": "", - "download_url": "https://files.pythonhosted.org/packages/3c/8b/0111dd7d6c1478bf83baa1cab85c686426c7a6274119aceb2bd9d35395ad/typing_extensions-4.7.1.tar.gz", - "size": 72876, + "download_url": "https://files.pythonhosted.org/packages/1f/7a/8b94bb016069caa12fc9f587b28080ac33b4fbb8ca369b98bc0a4828543e/typing_extensions-4.8.0.tar.gz", + "size": 71456, "sha1": null, - "md5": "06e7fff4b1d51f8dc6f49b16e71de54e", - "sha256": "b75ddc264f0ba5615db7ba217daeb99701ad295353c45f9e95963337ceeeffb2", + "md5": "74bafe841fbd1c27324afdeb099babdf", + "sha256": "df8e4339e9cb77357558cbdbceca33c303714cf861d1eef15e1070055ae8b7ef", "sha512": null, "bug_tracking_url": "https://github.com/python/typing_extensions/issues", "code_view_url": null, @@ -2313,20 +2319,20 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/typing-extensions/4.7.1/json", + "api_data_url": "https://pypi.org/pypi/typing-extensions/4.8.0/json", "datasource_id": null, - "purl": "pkg:pypi/typing-extensions@4.7.1" + "purl": "pkg:pypi/typing-extensions@4.8.0" }, { "type": "pypi", "namespace": null, "name": "urllib3", - "version": "2.0.4", + "version": "2.0.5", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "HTTP library with thread-safe connection pooling, file post, and more.\n

\n\n![urllib3](https://github.com/urllib3/urllib3/raw/main/docs/_static/banner_github.svg)\n\n

\n\n

\n \"PyPI\n \"Python\n \"Join\n \"Coverage\n \"Build\n \"Documentation
\n \"OpenSSF\n \"SLSA\n \"CII\n

\n\nurllib3 is a powerful, *user-friendly* HTTP client for Python. Much of the\nPython ecosystem already uses urllib3 and you should too.\nurllib3 brings many critical features that are missing from the Python\nstandard libraries:\n\n- Thread safety.\n- Connection pooling.\n- Client-side SSL/TLS verification.\n- File uploads with multipart encoding.\n- Helpers for retrying requests and dealing with HTTP redirects.\n- Support for gzip, deflate, brotli, and zstd encoding.\n- Proxy support for HTTP and SOCKS.\n- 100% test coverage.\n\nurllib3 is powerful and easy to use:\n\n```python3\n>>> import urllib3\n>>> resp = urllib3.request(\"GET\", \"http://httpbin.org/robots.txt\")\n>>> resp.status\n200\n>>> resp.data\nb\"User-agent: *\\nDisallow: /deny\\n\"\n```\n\n## Installing\n\nurllib3 can be installed with [pip](https://pip.pypa.io):\n\n```bash\n$ python -m pip install urllib3\n```\n\nAlternatively, you can grab the latest source code from [GitHub](https://github.com/urllib3/urllib3):\n\n```bash\n$ git clone https://github.com/urllib3/urllib3.git\n$ cd urllib3\n$ pip install .\n```\n\n\n## Documentation\n\nurllib3 has usage and reference documentation at [urllib3.readthedocs.io](https://urllib3.readthedocs.io).\n\n\n## Community\n\nurllib3 has a [community Discord channel](https://discord.gg/urllib3) for asking questions and\ncollaborating with other contributors. Drop by and say hello \ud83d\udc4b\n\n\n## Contributing\n\nurllib3 happily accepts contributions. Please see our\n[contributing documentation](https://urllib3.readthedocs.io/en/latest/contributing.html)\nfor some tips on getting started.\n\n\n## Security Disclosures\n\nTo report a security vulnerability, please use the\n[Tidelift security contact](https://tidelift.com/security).\nTidelift will coordinate the fix and disclosure with maintainers.\n\n\n## Maintainers\n\n- [@sethmlarson](https://github.com/sethmlarson) (Seth M. Larson)\n- [@pquentin](https://github.com/pquentin) (Quentin Pradet)\n- [@theacodes](https://github.com/theacodes) (Thea Flowers)\n- [@haikuginger](https://github.com/haikuginger) (Jess Shapiro)\n- [@lukasa](https://github.com/lukasa) (Cory Benfield)\n- [@sigmavirus24](https://github.com/sigmavirus24) (Ian Stapleton Cordasco)\n- [@shazow](https://github.com/shazow) (Andrey Petrov)\n\n\ud83d\udc4b\n\n\n## Sponsorship\n\nIf your company benefits from this library, please consider [sponsoring its\ndevelopment](https://urllib3.readthedocs.io/en/latest/sponsors.html).\n\n\n## For Enterprise\n\nProfessional support for urllib3 is available as part of the [Tidelift\nSubscription][1]. Tidelift gives software development teams a single source for\npurchasing and maintaining their software, with professional grade assurances\nfrom the experts who know it best, while seamlessly integrating with existing\ntools.\n\n[1]: https://tidelift.com/subscription/pkg/pypi-urllib3?utm_source=pypi-urllib3&utm_medium=referral&utm_campaign=readme", - "release_date": "2023-07-19T15:51:22", + "release_date": "2023-09-20T07:30:33", "parties": [ { "type": "person", @@ -2370,11 +2376,11 @@ "Topic :: Software Development :: Libraries" ], "homepage_url": "", - "download_url": "https://files.pythonhosted.org/packages/9b/81/62fd61001fa4b9d0df6e31d47ff49cfa9de4af03adecf339c7bc30656b37/urllib3-2.0.4-py3-none-any.whl", - "size": 123908, + "download_url": "https://files.pythonhosted.org/packages/37/dc/399e63f5d1d96bb643404ee830657f4dfcf8503f5ba8fa3c6d465d0c57fe/urllib3-2.0.5-py3-none-any.whl", + "size": 123792, "sha1": null, - "md5": "eda5ecb3aab799e705b747d8646ece61", - "sha256": "de7df1803967d2c2a98e4b11bb7d6bd9210474c46e8a0401514e3a42a75ebde4", + "md5": "d7a2bde43ed2ebf36b6e09e01cce0411", + "sha256": "ef16afa8ba34a1f989db38e1dbbe0c302e4289a47856990d0682e374563ce35e", "sha512": null, "bug_tracking_url": null, "code_view_url": "https://github.com/urllib3/urllib3", @@ -2393,20 +2399,20 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/urllib3/2.0.4/json", + "api_data_url": "https://pypi.org/pypi/urllib3/2.0.5/json", "datasource_id": null, - "purl": "pkg:pypi/urllib3@2.0.4" + "purl": "pkg:pypi/urllib3@2.0.5" }, { "type": "pypi", "namespace": null, "name": "urllib3", - "version": "2.0.4", + "version": "2.0.5", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "HTTP library with thread-safe connection pooling, file post, and more.\n

\n\n![urllib3](https://github.com/urllib3/urllib3/raw/main/docs/_static/banner_github.svg)\n\n

\n\n

\n \"PyPI\n \"Python\n \"Join\n \"Coverage\n \"Build\n \"Documentation
\n \"OpenSSF\n \"SLSA\n \"CII\n

\n\nurllib3 is a powerful, *user-friendly* HTTP client for Python. Much of the\nPython ecosystem already uses urllib3 and you should too.\nurllib3 brings many critical features that are missing from the Python\nstandard libraries:\n\n- Thread safety.\n- Connection pooling.\n- Client-side SSL/TLS verification.\n- File uploads with multipart encoding.\n- Helpers for retrying requests and dealing with HTTP redirects.\n- Support for gzip, deflate, brotli, and zstd encoding.\n- Proxy support for HTTP and SOCKS.\n- 100% test coverage.\n\nurllib3 is powerful and easy to use:\n\n```python3\n>>> import urllib3\n>>> resp = urllib3.request(\"GET\", \"http://httpbin.org/robots.txt\")\n>>> resp.status\n200\n>>> resp.data\nb\"User-agent: *\\nDisallow: /deny\\n\"\n```\n\n## Installing\n\nurllib3 can be installed with [pip](https://pip.pypa.io):\n\n```bash\n$ python -m pip install urllib3\n```\n\nAlternatively, you can grab the latest source code from [GitHub](https://github.com/urllib3/urllib3):\n\n```bash\n$ git clone https://github.com/urllib3/urllib3.git\n$ cd urllib3\n$ pip install .\n```\n\n\n## Documentation\n\nurllib3 has usage and reference documentation at [urllib3.readthedocs.io](https://urllib3.readthedocs.io).\n\n\n## Community\n\nurllib3 has a [community Discord channel](https://discord.gg/urllib3) for asking questions and\ncollaborating with other contributors. Drop by and say hello \ud83d\udc4b\n\n\n## Contributing\n\nurllib3 happily accepts contributions. Please see our\n[contributing documentation](https://urllib3.readthedocs.io/en/latest/contributing.html)\nfor some tips on getting started.\n\n\n## Security Disclosures\n\nTo report a security vulnerability, please use the\n[Tidelift security contact](https://tidelift.com/security).\nTidelift will coordinate the fix and disclosure with maintainers.\n\n\n## Maintainers\n\n- [@sethmlarson](https://github.com/sethmlarson) (Seth M. Larson)\n- [@pquentin](https://github.com/pquentin) (Quentin Pradet)\n- [@theacodes](https://github.com/theacodes) (Thea Flowers)\n- [@haikuginger](https://github.com/haikuginger) (Jess Shapiro)\n- [@lukasa](https://github.com/lukasa) (Cory Benfield)\n- [@sigmavirus24](https://github.com/sigmavirus24) (Ian Stapleton Cordasco)\n- [@shazow](https://github.com/shazow) (Andrey Petrov)\n\n\ud83d\udc4b\n\n\n## Sponsorship\n\nIf your company benefits from this library, please consider [sponsoring its\ndevelopment](https://urllib3.readthedocs.io/en/latest/sponsors.html).\n\n\n## For Enterprise\n\nProfessional support for urllib3 is available as part of the [Tidelift\nSubscription][1]. Tidelift gives software development teams a single source for\npurchasing and maintaining their software, with professional grade assurances\nfrom the experts who know it best, while seamlessly integrating with existing\ntools.\n\n[1]: https://tidelift.com/subscription/pkg/pypi-urllib3?utm_source=pypi-urllib3&utm_medium=referral&utm_campaign=readme", - "release_date": "2023-07-19T15:51:23", + "release_date": "2023-09-20T07:30:34", "parties": [ { "type": "person", @@ -2450,11 +2456,11 @@ "Topic :: Software Development :: Libraries" ], "homepage_url": "", - "download_url": "https://files.pythonhosted.org/packages/31/ab/46bec149bbd71a4467a3063ac22f4486ecd2ceb70ae8c70d5d8e4c2a7946/urllib3-2.0.4.tar.gz", - "size": 281517, + "download_url": "https://files.pythonhosted.org/packages/51/13/62cb4a0af89fdf72db4a0ead8026e724c7f3cbf69706d84a4eff439be853/urllib3-2.0.5.tar.gz", + "size": 281697, "sha1": null, - "md5": "5d541b944febe50221e24c31cd6e887d", - "sha256": "8d22f86aae8ef5e410d4f539fde9ce6b2113a001bb4d189e0aed70642d602b11", + "md5": "4d824b7bba1976591fc05fad02fb258d", + "sha256": "13abf37382ea2ce6fb744d4dad67838eec857c9f4f57009891805e0b5e123594", "sha512": null, "bug_tracking_url": null, "code_view_url": "https://github.com/urllib3/urllib3", @@ -2473,18 +2479,18 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/urllib3/2.0.4/json", + "api_data_url": "https://pypi.org/pypi/urllib3/2.0.5/json", "datasource_id": null, - "purl": "pkg:pypi/urllib3@2.0.4" + "purl": "pkg:pypi/urllib3@2.0.5" } ], "resolved_dependencies_graph": [ { - "package": "pkg:pypi/azure-core@1.28.0", + "package": "pkg:pypi/azure-core@1.29.4", "dependencies": [ "pkg:pypi/requests@2.31.0", "pkg:pypi/six@1.16.0", - "pkg:pypi/typing-extensions@4.7.1" + "pkg:pypi/typing-extensions@4.8.0" ] }, { @@ -2494,12 +2500,12 @@ ] }, { - "package": "pkg:pypi/azure-storage-blob@12.17.0", + "package": "pkg:pypi/azure-storage-blob@12.18.1", "dependencies": [ - "pkg:pypi/azure-core@1.28.0", - "pkg:pypi/cryptography@41.0.3", + "pkg:pypi/azure-core@1.29.4", + "pkg:pypi/cryptography@41.0.4", "pkg:pypi/isodate@0.6.1", - "pkg:pypi/typing-extensions@4.7.1" + "pkg:pypi/typing-extensions@4.8.0" ] }, { @@ -2517,11 +2523,11 @@ "dependencies": [] }, { - "package": "pkg:pypi/click@8.1.6", + "package": "pkg:pypi/click@8.1.7", "dependencies": [] }, { - "package": "pkg:pypi/cryptography@41.0.3", + "package": "pkg:pypi/cryptography@41.0.4", "dependencies": [ "pkg:pypi/cffi@1.15.1" ] @@ -2539,7 +2545,7 @@ { "package": "pkg:pypi/msrest@0.7.1", "dependencies": [ - "pkg:pypi/azure-core@1.28.0", + "pkg:pypi/azure-core@1.29.4", "pkg:pypi/certifi@2023.7.22", "pkg:pypi/isodate@0.6.1", "pkg:pypi/requests-oauthlib@1.3.1", @@ -2567,7 +2573,7 @@ "pkg:pypi/certifi@2023.7.22", "pkg:pypi/charset-normalizer@3.2.0", "pkg:pypi/idna@3.4", - "pkg:pypi/urllib3@2.0.4" + "pkg:pypi/urllib3@2.0.5" ] }, { @@ -2575,11 +2581,11 @@ "dependencies": [] }, { - "package": "pkg:pypi/typing-extensions@4.7.1", + "package": "pkg:pypi/typing-extensions@4.8.0", "dependencies": [] }, { - "package": "pkg:pypi/urllib3@2.0.4", + "package": "pkg:pypi/urllib3@2.0.5", "dependencies": [] } ] diff --git a/tests/data/azure-devops.req-38-expected.json b/tests/data/azure-devops.req-38-expected.json index 8fd90ba..159f82b 100644 --- a/tests/data/azure-devops.req-38-expected.json +++ b/tests/data/azure-devops.req-38-expected.json @@ -4,7 +4,7 @@ "tool_homepageurl": "https://github.com/nexB/python-inspector", "tool_version": "0.9.8", "options": [ - "--requirement /home/tg1999/Desktop/example/tools/python-inspector/tests/data/azure-devops.req.txt", + "--requirement /home/frank/sources/github/nexB/python-inspector/tests/data/azure-devops.req.txt", "--index-url https://pypi.org/simple", "--python-version 38", "--operating-system linux", @@ -17,7 +17,7 @@ "files": [ { "type": "file", - "path": "/home/tg1999/Desktop/example/tools/python-inspector/tests/data/azure-devops.req.txt", + "path": "/home/frank/sources/github/nexB/python-inspector/tests/data/azure-devops.req.txt", "package_data": [ { "type": "pypi", @@ -127,12 +127,12 @@ "type": "pypi", "namespace": null, "name": "azure-core", - "version": "1.28.0", + "version": "1.29.4", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "Microsoft Azure Core Library for Python\n# Azure Core shared client library for Python\n\nAzure core provides shared exceptions and modules for Python SDK client libraries.\nThese libraries follow the [Azure SDK Design Guidelines for Python](https://azure.github.io/azure-sdk/python/guidelines/index.html) .\n\nIf you are a client library developer, please reference [client library developer reference](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md) for more information.\n\n[Source code](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/) \n| [Package (Pypi)][package]\n| [Package (Conda)](https://anaconda.org/microsoft/azure-core/)\n| [API reference documentation](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/)\n\n## _Disclaimer_\n\n_Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For more information and questions, please refer to _\n\n## Getting started\n\nTypically, you will not need to install azure core;\nit will be installed when you install one of the client libraries using it.\nIn case you want to install it explicitly (to implement your own client library, for example),\nyou can find it [here](https://pypi.org/project/azure-core/).\n\n## Key concepts\n\n### Azure Core Library Exceptions\n\n#### AzureError\n\nAzureError is the base exception for all errors.\n\n```python\nclass AzureError(Exception):\n def __init__(self, message, *args, **kwargs):\n self.inner_exception = kwargs.get(\"error\")\n self.exc_type, self.exc_value, self.exc_traceback = sys.exc_info()\n self.exc_type = self.exc_type.__name__ if self.exc_type else type(self.inner_exception)\n self.exc_msg = \"{}, {}: {}\".format(message, self.exc_type, self.exc_value) # type: ignore\n self.message = str(message)\n self.continuation_token = kwargs.get(\"continuation_token\")\n super(AzureError, self).__init__(self.message, *args)\n```\n\n*message* is any message (str) to be associated with the exception.\n\n*args* are any additional args to be included with exception.\n\n*kwargs* are keyword arguments to include with the exception. Use the keyword *error* to pass in an internal exception and *continuation_token* for a token reference to continue an incomplete operation.\n\n**The following exceptions inherit from AzureError:**\n\n#### ServiceRequestError\n\nAn error occurred while attempt to make a request to the service. No request was sent.\n\n#### ServiceResponseError\n\nThe request was sent, but the client failed to understand the response.\nThe connection may have timed out. These errors can be retried for idempotent or safe operations.\n\n#### HttpResponseError\n\nA request was made, and a non-success status code was received from the service.\n\n```python\nclass HttpResponseError(AzureError):\n def __init__(self, message=None, response=None, **kwargs):\n self.reason = None\n self.response = response\n if response:\n self.reason = response.reason\n self.status_code = response.status_code\n self.error = self._parse_odata_body(ODataV4Format, response) # type: Optional[ODataV4Format]\n if self.error:\n message = str(self.error)\n else:\n message = message or \"Operation returned an invalid status '{}'\".format(\n self.reason\n )\n\n super(HttpResponseError, self).__init__(message=message, **kwargs)\n```\n\n*message* is the HTTP response error message (optional)\n\n*response* is the HTTP response (optional).\n\n*kwargs* are keyword arguments to include with the exception.\n\n**The following exceptions inherit from HttpResponseError:**\n\n#### DecodeError\n\nAn error raised during response de-serialization.\n\n#### IncompleteReadError\n\nAn error raised if peer closes the connection before we have received the complete message body.\n\n#### ResourceExistsError\n\nAn error response with status code 4xx. This will not be raised directly by the Azure core pipeline.\n\n#### ResourceNotFoundError\n\nAn error response, typically triggered by a 412 response (for update) or 404 (for get/post).\n\n#### ResourceModifiedError\n\nAn error response with status code 4xx, typically 412 Conflict. This will not be raised directly by the Azure core pipeline.\n\n#### ResourceNotModifiedError\n\nAn error response with status code 304. This will not be raised directly by the Azure core pipeline.\n\n#### ClientAuthenticationError\n\nAn error response with status code 4xx. This will not be raised directly by the Azure core pipeline.\n\n#### TooManyRedirectsError\n\nAn error raised when the maximum number of redirect attempts is reached. The maximum amount of redirects can be configured in the RedirectPolicy.\n\n```python\nclass TooManyRedirectsError(HttpResponseError):\n def __init__(self, history, *args, **kwargs):\n self.history = history\n message = \"Reached maximum redirect attempts.\"\n super(TooManyRedirectsError, self).__init__(message, *args, **kwargs)\n```\n\n*history* is used to document the requests/responses that resulted in redirected requests.\n\n*args* are any additional args to be included with exception.\n\n*kwargs* are keyword arguments to include with the exception.\n\n#### StreamConsumedError\n\nAn error thrown if you try to access the stream of `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` once\nthe response stream has been consumed.\n\n#### StreamClosedError\n\nAn error thrown if you try to access the stream of the `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` once\nthe response stream has been closed.\n\n#### ResponseNotReadError\n\nAn error thrown if you try to access the `content` of `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` before\nreading in the response's bytes first.\n\n### Configurations\n\nWhen calling the methods, some properties can be configured by passing in as kwargs arguments.\n\n| Parameters | Description |\n| --- | --- |\n| headers | The HTTP Request headers. |\n| request_id | The request id to be added into header. |\n| user_agent | If specified, this will be added in front of the user agent string. |\n| logging_enable| Use to enable per operation. Defaults to `False`. |\n| logger | If specified, it will be used to log information. |\n| response_encoding | The encoding to use if known for this service (will disable auto-detection). |\n| proxies | Maps protocol or protocol and hostname to the URL of the proxy. |\n| raw_request_hook | Callback function. Will be invoked on request. |\n| raw_response_hook | Callback function. Will be invoked on response. |\n| network_span_namer | A callable to customize the span name. |\n| tracing_attributes | Attributes to set on all created spans. |\n| permit_redirects | Whether the client allows redirects. Defaults to `True`. |\n| redirect_max | The maximum allowed redirects. Defaults to `30`. |\n| retry_total | Total number of retries to allow. Takes precedence over other counts. Default value is `10`. |\n| retry_connect | How many connection-related errors to retry on. These are errors raised before the request is sent to the remote server, which we assume has not triggered the server to process the request. Default value is `3`. |\n| retry_read | How many times to retry on read errors. These errors are raised after the request was sent to the server, so the request may have side-effects. Default value is `3`. |\n| retry_status | How many times to retry on bad status codes. Default value is `3`. |\n| retry_backoff_factor | A backoff factor to apply between attempts after the second try (most errors are resolved immediately by a second try without a delay). Retry policy will sleep for: `{backoff factor} * (2 ** ({number of total retries} - 1))` seconds. If the backoff_factor is 0.1, then the retry will sleep for [0.0s, 0.2s, 0.4s, ...] between retries. The default value is `0.8`. |\n| retry_backoff_max | The maximum back off time. Default value is `120` seconds (2 minutes). |\n| retry_mode | Fixed or exponential delay between attempts, default is `Exponential`. |\n| timeout | Timeout setting for the operation in seconds, default is `604800`s (7 days). |\n| connection_timeout | A single float in seconds for the connection timeout. Defaults to `300` seconds. |\n| read_timeout | A single float in seconds for the read timeout. Defaults to `300` seconds. |\n| connection_verify | SSL certificate verification. Enabled by default. Set to False to disable, alternatively can be set to the path to a CA_BUNDLE file or directory with certificates of trusted CAs. |\n| connection_cert | Client-side certificates. You can specify a local cert to use as client side certificate, as a single file (containing the private key and the certificate) or as a tuple of both files' paths. |\n| proxies | Dictionary mapping protocol or protocol and hostname to the URL of the proxy. |\n| cookies | Dict or CookieJar object to send with the `Request`. |\n| connection_data_block_size | The block size of data sent over the connection. Defaults to `4096` bytes. |\n\n### Async transport\n\nThe async transport is designed to be opt-in. [AioHttp](https://pypi.org/project/aiohttp/) is one of the supported implementations of async transport. It is not installed by default. You need to install it separately.\n\n### Shared modules\n\n#### MatchConditions\n\nMatchConditions is an enum to describe match conditions.\n\n```python\nclass MatchConditions(Enum):\n Unconditionally = 1 # Matches any condition\n IfNotModified = 2 # If the target object is not modified. Usually it maps to etag=\n IfModified = 3 # Only if the target object is modified. Usually it maps to etag!=\n IfPresent = 4 # If the target object exists. Usually it maps to etag='*'\n IfMissing = 5 # If the target object does not exist. Usually it maps to etag!='*'\n```\n\n#### CaseInsensitiveEnumMeta\n\nA metaclass to support case-insensitive enums.\n\n```python\nfrom enum import Enum\n\nfrom azure.core import CaseInsensitiveEnumMeta\n\nclass MyCustomEnum(str, Enum, metaclass=CaseInsensitiveEnumMeta):\n FOO = 'foo'\n BAR = 'bar'\n```\n\n#### Null Sentinel Value\n\nA falsy sentinel object which is supposed to be used to specify attributes\nwith no data. This gets serialized to `null` on the wire.\n\n```python\nfrom azure.core.serialization import NULL\n\nassert bool(NULL) is False\n\nfoo = Foo(\n attr=NULL\n)\n```\n\n## Contributing\n\nThis project welcomes contributions and suggestions. Most contributions require\nyou to agree to a Contributor License Agreement (CLA) declaring that you have\nthe right to, and actually do, grant us the rights to use your contribution.\nFor details, visit [https://cla.microsoft.com](https://cla.microsoft.com).\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether\nyou need to provide a CLA and decorate the PR appropriately (e.g., label,\ncomment). Simply follow the instructions provided by the bot. You will only\nneed to do this once across all repos using our CLA.\n\nThis project has adopted the\n[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).\nFor more information, see the\n[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)\nor contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any\nadditional questions or comments.\n\n\n[package]: https://pypi.org/project/azure-core/\n\n\n# Release History\n\n## 1.28.0 (2023-07-06)\n\n### Features Added\n\n- Added header name parameter to `RequestIdPolicy`. #30772\n- Added `SensitiveHeaderCleanupPolicy` that cleans up sensitive headers if a redirect happens and the new destination is in another domain. #28349\n\n### Other Changes\n\n- Catch aiohttp errors and translate them into azure-core errors.\n\n## 1.27.1 (2023-06-13)\n\n### Bugs Fixed\n\n- Fix url building for some complex query parameters scenarios #30707\n\n## 1.27.0 (2023-06-01)\n\n### Features Added\n\n- Added support to use sync credentials in `AsyncBearerTokenCredentialPolicy`. #30381\n- Added \"prefix\" parameter to AzureKeyCredentialPolicy #29901\n\n### Bugs Fixed\n\n- Improve error message when providing the wrong credential type for AzureKeyCredential #30380\n\n## 1.26.4 (2023-04-06)\n\n### Features Added\n\n- Updated settings to include OpenTelemetry as a tracer provider. #29095\n\n### Other Changes\n\n- Improved typing\n\n## 1.26.3 (2023-02-02)\n\n### Bugs Fixed\n\n- Fixed deflate decompression for aiohttp #28483\n\n## 1.26.2 (2023-01-05)\n\n### Bugs Fixed\n\n- Fix 'ClientSession' object has no attribute 'auto_decompress' (thanks to @mghextreme for the contribution)\n\n### Other Changes\n\n- Add \"x-ms-error-code\" as secure header to log\n- Rename \"DEFAULT_HEADERS_WHITELIST\" to \"DEFAULT_HEADERS_ALLOWLIST\". Added a backward compatible alias.\n\n## 1.26.1 (2022-11-03)\n\n### Other Changes\n\n- Added example of RequestsTransport with custom session. (thanks to @inirudebwoy for the contribution) #26768\n- Added Python 3.11 support.\n\n## 1.26.0 (2022-10-06)\n\n### Other Changes\n\n- LRO polling will not wait anymore before doing the first status check #26376\n- Added extra dependency for [aio]. pip install azure-core[aio] installs aiohttp too.\n\n## 1.25.1 (2022-09-01)\n\n### Bugs Fixed\n\n- Added @runtime_checkable to `TokenCredential` protocol definitions #25187\n\n## 1.25.0 (2022-08-04)\n\nAzure-core is supported on Python 3.7 or later. For more details, please read our page on [Azure SDK for Python version support policy](https://github.com/Azure/azure-sdk-for-python/wiki/Azure-SDKs-Python-version-support-policy).\n\n### Features Added\n\n- Added `CaseInsensitiveDict` implementation in `azure.core.utils` removing dependency on `requests` and `aiohttp`\n\n## 1.24.2 (2022-06-30)\n\n### Bugs Fixed\n\n- Fixed the bug that azure-core could not be imported under Python 3.11.0b3 #24928\n- `ContentDecodePolicy` can now correctly deserialize more JSON bodies with different mime types #22410\n\n## 1.24.1 (2022-06-01)\n\n### Bugs Fixed\n\n- Declare method level span as INTERNAL by default #24492\n- Fixed type hints for `azure.core.paging.ItemPaged` #24548\n\n## 1.24.0 (2022-05-06)\n\n### Features Added\n\n- Add `SerializationError` and `DeserializationError` in `azure.core.exceptions` for errors raised during serialization / deserialization #24312\n\n## 1.23.1 (2022-03-31)\n\n### Bugs Fixed\n\n- Allow stream inputs to the `content` kwarg of `azure.core.rest.HttpRequest` from objects with a `read` method #23578\n\n## 1.23.0 (2022-03-03)\n\n### Features Added\n\n- Improve intellisense type hinting for service client methods. #22891\n\n- Add a case insensitive dict `case_insensitive_dict` in `azure.core.utils`. #23206\n\n### Bugs Fixed\n\n- Use \"\\n\" rather than \"/n\" for new line in log. #23261\n\n### Other Changes\n\n- Log \"WWW-Authenticate\" header in `HttpLoggingPolicy` #22990\n- Added dependency on `typing-extensions` >= 4.0.1\n\n## 1.22.1 (2022-02-09)\n\n### Bugs Fixed\n\n- Limiting `final-state-via` scope to POST until consuming SDKs has been fixed to use this option properly on PUT. #22989\n\n## 1.22.0 (2022-02-03)\n_[**This version is deprecated.**]_\n\n### Features Added\n\n- Add support for `final-state-via` LRO option in core. #22713\n\n### Bugs Fixed\n\n- Add response body to string representation of `HttpResponseError` if we're not able to parse out information #22302\n- Raise `AttributeError` when calling azure.core.pipeline.transport.\\_\\_bases__ #22469\n\n### Other Changes\n\n- Python 2.7 is no longer supported. Please use Python version 3.6 or later.\n\n## 1.21.1 (2021-12-06)\n\n### Other Changes\n\n- Revert change in str method #22023\n\n## 1.21.0 (2021-12-02)\n\n### Breaking Changes\n\n- Sync stream downloading now raises `azure.core.exceptions.DecodeError` rather than `requests.exceptions.ContentDecodingError`\n\n### Bugs Fixed\n\n- Add response body to string representation of `HttpResponseError` if we're not able to parse out information #21800\n\n## 1.20.1 (2021-11-08)\n\n### Bugs Fixed\n\n- Correctly set response's content to decompressed body when users are using aiohttp transport with decompression headers #21620\n\n## 1.20.0 (2021-11-04)\n\n### Features Added\n\n- GA `send_request` onto the `azure.core.PipelineClient` and `azure.core.AsyncPipelineClient`. This method takes in\nrequests and sends them through our pipelines.\n- GA `azure.core.rest`. `azure.core.rest` is our new public simple HTTP library in `azure.core` that users will use to create requests, and consume responses.\n- GA errors `StreamConsumedError`, `StreamClosedError`, and `ResponseNotReadError` to `azure.core.exceptions`. These errors\nare thrown if you mishandle streamed responses from the `azure.core.rest` module\n- add kwargs to the methods for `iter_raw` and `iter_bytes` #21529\n- no longer raise JSON errors if users pass in file descriptors of JSON to the `json` kwarg in `HttpRequest` #21504\n- Added new error type `IncompleteReadError` which is raised if peer closes the connection before we have received the complete message body.\n\n### Breaking Changes\n\n- SansIOHTTPPolicy.on_exception returns None instead of bool.\n\n### Bugs Fixed\n\n- The `Content-Length` header in a http response is strictly checked against the actual number of bytes in the body,\n rather than silently truncating data in case the underlying tcp connection is closed prematurely.\n (thanks to @jochen-ott-by for the contribution) #20412\n- UnboundLocalError when SansIOHTTPPolicy handles an exception #15222\n- Add default content type header of `text/plain` and content length header for users who pass unicode strings to the `content` kwarg of `HttpRequest` in 2.7 #21550\n\n## 1.19.1 (2021-11-01)\n\n### Bugs Fixed\n\n- respect text encoding specified in argument (thanks to @ryohji for the contribution) #20796\n- Fix \"coroutine x.read() was never awaited\" warning from `ContentDecodePolicy` #21318\n- fix type check for `data` input to `azure.core.rest` for python 2.7 users #21341\n- use `charset_normalizer` if `chardet` is not installed to migrate aiohttp 3.8.0 changes.\n\n### Other Changes\n\n- Refactor AzureJSONEncoder (thanks to @Codejune for the contribution) #21028\n\n## 1.19.0 (2021-09-30)\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse` are now abstract base classes. They should not be initialized directly, instead\nyour transport responses should inherit from them and implement them.\n- The properties of the `azure.core.rest` responses are now all read-only\n\n- HttpLoggingPolicy integrates logs into one record #19925\n\n## 1.18.0 (2021-09-02)\n\n### Features Added\n\n- `azure.core.serialization.AzureJSONEncoder` (introduced in 1.17.0) serializes `datetime.datetime` objects in ISO 8601 format, conforming to RFC 3339's specification. #20190\n- We now use `azure.core.serialization.AzureJSONEncoder` to serialize `json` input to `azure.core.rest.HttpRequest`.\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- The `text` property on `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse` has changed to a method, which also takes\nan `encoding` parameter.\n- Removed `iter_text` and `iter_lines` from `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse`\n\n### Bugs Fixed\n\n- The behaviour of the headers returned in `azure.core.rest` responses now aligns across sync and async. Items can now be checked case-insensitively and without raising an error for format.\n\n## 1.17.0 (2021-08-05)\n\n### Features Added\n\n- Cut hard dependency on requests library\n- Added a `from_json` method which now accepts storage QueueMessage, eventhub's EventData or ServiceBusMessage or simply json bytes to return a `CloudEvent`\n\n### Fixed\n\n- Not override \"x-ms-client-request-id\" if it already exists in the header. #17757\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- `azure.core.rest` will not try to guess the `charset` anymore if it was impossible to extract it from `HttpResponse` analysis. This removes our dependency on `charset`.\n\n## 1.16.0 (2021-07-01)\n\n### Features Added\n\n- Add new ***provisional*** methods `send_request` onto the `azure.core.PipelineClient` and `azure.core.AsyncPipelineClient`. This method takes in\nrequests and sends them through our pipelines.\n- Add new ***provisional*** module `azure.core.rest`. `azure.core.rest` is our new public simple HTTP library in `azure.core` that users will use to create requests, and consume responses.\n- Add new ***provisional*** errors `StreamConsumedError`, `StreamClosedError`, and `ResponseNotReadError` to `azure.core.exceptions`. These errors\nare thrown if you mishandle streamed responses from the provisional `azure.core.rest` module\n\n### Fixed\n\n- Improved error message in the `from_dict` method of `CloudEvent` when a wrong schema is sent.\n\n## 1.15.0 (2021-06-04)\n\n### New Features\n\n- Added `BearerTokenCredentialPolicy.on_challenge` and `.authorize_request` to allow subclasses to optionally handle authentication challenges\n\n### Bug Fixes\n\n- Retry policies don't sleep after operations time out\n- The `from_dict` methhod in the `CloudEvent` can now convert a datetime string to datetime object when microsecond exceeds the python limitation\n\n## 1.14.0 (2021-05-13)\n\n### New Features\n\n- Added `azure.core.credentials.AzureNamedKeyCredential` credential #17548.\n- Added `decompress` parameter for `stream_download` method. If it is set to `False`, will not do decompression upon the stream. #17920\n\n## 1.13.0 (2021-04-02)\n\nAzure core requires Python 2.7 or Python 3.6+ since this release.\n\n### New Features\n\n- Added `azure.core.utils.parse_connection_string` function to parse connection strings across SDKs, with common validation and support for case insensitive keys.\n- Supported adding custom policies #16519\n- Added `~azure.core.tracing.Link` that should be used while passing `Links` to `AbstractSpan`.\n- `AbstractSpan` constructor can now take in additional keyword only args.\n\n### Bug fixes\n\n- Make NetworkTraceLoggingPolicy show the auth token in plain text. #14191\n- Fixed RetryPolicy overriding default connection timeout with an extreme value #17481\n\n## 1.12.0 (2021-03-08)\n\nThis version will be the last version to officially support Python 3.5, future versions will require Python 2.7 or Python 3.6+.\n\n### Features\n\n- Added `azure.core.messaging.CloudEvent` model that follows the cloud event spec.\n- Added `azure.core.serialization.NULL` sentinel value\n- Improve `repr`s for `HttpRequest` and `HttpResponse`s #16972\n\n### Bug Fixes\n\n- Disable retry in stream downloading. (thanks to @jochen-ott-by @hoffmann for the contribution) #16723\n\n## 1.11.0 (2021-02-08)\n\n### Features\n\n- Added `CaseInsensitiveEnumMeta` class for case-insensitive enums. #16316\n- Add `raise_for_status` method onto `HttpResponse`. Calling `response.raise_for_status()` on a response with an error code\nwill raise an `HttpResponseError`. Calling it on a good response will do nothing #16399\n\n### Bug Fixes\n\n- Update conn.conn_kw rather than overriding it when setting block size. (thanks for @jiasli for the contribution) #16587\n\n## 1.10.0 (2021-01-11)\n\n### Features\n\n- Added `AzureSasCredential` and its respective policy. #15946\n\n## 1.9.0 (2020-11-09)\n\n### Features\n\n- Add a `continuation_token` attribute to the base `AzureError` exception, and set this value for errors raised\n during paged or long-running operations.\n\n### Bug Fixes\n\n- Set retry_interval to 1 second instead of 1000 seconds (thanks **vbarbaresi** for contributing) #14357\n\n\n## 1.8.2 (2020-10-05)\n\n### Bug Fixes\n\n- Fixed bug to allow polling in the case of parameterized endpoints with relative polling urls #14097\n\n\n## 1.8.1 (2020-09-08)\n\n### Bug fixes\n\n- SAS credential replicated \"/\" fix #13159\n\n## 1.8.0 (2020-08-10)\n\n### Features\n\n- Support params as list for exploding parameters #12410\n\n\n## 1.7.0 (2020-07-06)\n\n### Bug fixes\n\n- `AzureKeyCredentialPolicy` will now accept (and ignore) passed in kwargs #11963\n- Better error messages if passed endpoint is incorrect #12106\n- Do not JSON encore a string if content type is \"text\" #12137\n\n### Features\n\n- Added `http_logging_policy` property on the `Configuration` object, allowing users to individually\nset the http logging policy of the config #12218\n\n## 1.6.0 (2020-06-03)\n\n### Bug fixes\n\n- Fixed deadlocks in AsyncBearerTokenCredentialPolicy #11543\n- Fix AttributeException in StreamDownloadGenerator #11462\n\n### Features\n\n- Added support for changesets as part of multipart message support #10485\n- Add AsyncLROPoller in azure.core.polling #10801\n- Add get_continuation_token/from_continuation_token/polling_method methods in pollers (sync and async) #10801\n- HttpResponse and PipelineContext objects are now pickable #10801\n\n## 1.5.0 (2020-05-04)\n\n### Features\n\n- Support \"x-ms-retry-after-ms\" in response header #10743\n- `link` and `link_from_headers` now accepts attributes #10765\n\n### Bug fixes\n\n- Not retry if the status code is less than 400 #10778\n- \"x-ms-request-id\" is not considered safe header for logging #10967\n\n## 1.4.0 (2020-04-06)\n\n### Features\n\n- Support a default error type in map_error #9773\n- Added `AzureKeyCredential` and its respective policy. #10509\n- Added `azure.core.polling.base_polling` module with a \"Microsoft One API\" polling implementation #10090\n Also contains the async version in `azure.core.polling.async_base_polling`\n- Support kwarg `enforce_https` to disable HTTPS check on authentication #9821\n- Support additional kwargs in `HttpRequest.set_multipart_mixed` that will be passed into pipeline context.\n\n## 1.3.0 (2020-03-09)\n\n### Bug fixes\n\n- Appended RequestIdPolicy to the default pipeline #9841\n- Rewind the body position in async_retry #10117\n\n### Features\n\n- Add raw_request_hook support in custom_hook_policy #9958\n- Add timeout support in retry_policy #10011\n- Add OdataV4 error format auto-parsing in all exceptions ('error' attribute) #9738\n\n## 1.2.2 (2020-02-10)\n\n### Bug fixes\n\n- Fixed a bug that sends None as request_id #9545\n- Enable mypy for customers #9572\n- Handle TypeError in deep copy #9620\n- Fix text/plain content-type in decoder #9589\n\n## 1.2.1 (2020-01-14)\n\n### Bug fixes\n\n- Fixed a regression in 1.2.0 that was incompatible with azure-keyvault-* 4.0.0\n[#9462](https://github.com/Azure/azure-sdk-for-python/issues/9462)\n\n\n## 1.2.0 (2020-01-14)\n\n### Features\n\n- Add user_agent & sdk_moniker kwargs in UserAgentPolicy init #9355\n- Support OPTIONS HTTP verb #9322\n- Add tracing_attributes to tracing decorator #9297\n- Support auto_request_id in RequestIdPolicy #9163\n- Support fixed retry #6419\n- Support \"retry-after-ms\" in response header #9240\n\n### Bug fixes\n\n- Removed `__enter__` and `__exit__` from async context managers #9313\n\n## 1.1.1 (2019-12-03)\n\n### Bug fixes\n\n- Bearer token authorization requires HTTPS\n- Rewind the body position in retry #8307\n\n## 1.1.0 (2019-11-25)\n\n### Features\n\n- New RequestIdPolicy #8437\n- Enable logging policy in default pipeline #8053\n- Normalize transport timeout. #8000\n Now we have:\n * 'connection_timeout' - a single float in seconds for the connection timeout. Default 5min\n * 'read_timeout' - a single float in seconds for the read timeout. Default 5min\n\n### Bug fixes\n\n- RequestHistory: deepcopy fails if request contains a stream #7732\n- Retry: retry raises error if response does not have http_response #8629\n- Client kwargs are now passed to DistributedTracingPolicy correctly #8051\n- NetworkLoggingPolicy now logs correctly all requests in case of retry #8262\n\n## 1.0.0 (2019-10-29)\n\n### Features\n\n- Tracing: DistributedTracingPolicy now accepts kwargs network_span_namer to change network span name #7773\n- Tracing: Implementation of AbstractSpan can now use the mixin HttpSpanMixin to get HTTP span update automatically #7773\n- Tracing: AbstractSpan contract \"change_context\" introduced #7773\n- Introduce new policy HttpLoggingPolicy #7988\n\n### Bug fixes\n\n- Fix AsyncioRequestsTransport if input stream is an async generator #7743\n- Fix form-data with aiohttp transport #7749\n\n### Breaking changes\n\n- Tracing: AbstractSpan.set_current_span is longer supported. Use change_context instead. #7773\n- azure.core.pipeline.policies.ContentDecodePolicy.deserialize_from_text changed\n\n## 1.0.0b4 (2019-10-07)\n\n### Features\n\n- Tracing: network span context is available with the TRACING_CONTEXT in pipeline response #7252\n- Tracing: Span contract now has `kind`, `traceparent` and is a context manager #7252\n- SansIOHTTPPolicy methods can now be coroutines #7497\n- Add multipart/mixed support #7083:\n\n - HttpRequest now has a \"set_multipart_mixed\" method to set the parts of this request\n - HttpRequest now has a \"prepare_multipart_body\" method to build final body.\n - HttpResponse now has a \"parts\" method to return an iterator of parts\n - AsyncHttpResponse now has a \"parts\" methods to return an async iterator of parts\n - Note that multipart/mixed is a Python 3.x only feature\n\n### Bug fixes\n\n- Tracing: policy cannot fail the pipeline, even in the worst condition #7252\n- Tracing: policy pass correctly status message if exception #7252\n- Tracing: incorrect span if exception raised from decorated function #7133\n- Fixed urllib3 ConnectTimeoutError being raised by Requests during a socket timeout. Now this exception is caught and wrapped as a `ServiceRequestError` #7542\n\n### Breaking changes\n\n- Tracing: `azure.core.tracing.context` removed\n- Tracing: `azure.core.tracing.context.tracing_context.with_current_context` renamed to `azure.core.tracing.common.with_current_context` #7252\n- Tracing: `link` renamed `link_from_headers` and `link` takes now a string\n- Tracing: opencensus implementation has been moved to the package `azure-core-tracing-opencensus`\n- Some modules and classes that were importables from several different places have been removed:\n\n - `azure.core.HttpResponseError` is now only `azure.core.exceptions.HttpResponseError`\n - `azure.core.Configuration` is now only `azure.core.configuration.Configuration`\n - `azure.core.HttpRequest` is now only `azure.core.pipeline.transport.HttpRequest`\n - `azure.core.version` module has been removed. Use `azure.core.__version__` to get version number.\n - `azure.core.pipeline_client` has been removed. Import from `azure.core` instead.\n - `azure.core.pipeline_client_async` has been removed. Import from `azure.core` instead.\n - `azure.core.pipeline.base` has been removed. Import from `azure.core.pipeline` instead.\n - `azure.core.pipeline.base_async` has been removed. Import from `azure.core.pipeline` instead.\n - `azure.core.pipeline.policies.base` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.base_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.authentication` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.authentication_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.custom_hook` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.redirect` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.redirect_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.retry` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.retry_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.distributed_tracing` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.universal` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.tracing.abstract_span` has been removed. Import from `azure.core.tracing` instead.\n - `azure.core.pipeline.transport.base` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.base_async` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_basic` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_asyncio` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_trio` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.aiohttp` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.polling.poller` has been removed. Import from `azure.core.polling` instead.\n - `azure.core.polling.async_poller` has been removed. Import from `azure.core.polling` instead.\n\n## 1.0.0b3 (2019-09-09)\n\n### Bug fixes\n\n- Fix aiohttp auto-headers #6992\n- Add tracing to policies module init #6951\n\n## 1.0.0b2 (2019-08-05)\n\n### Breaking changes\n\n- Transport classes don't take `config` parameter anymore (use kwargs instead) #6372\n- `azure.core.paging` has been completely refactored #6420\n- HttpResponse.content_type attribute is now a string (was a list) #6490\n- For `StreamDownloadGenerator` subclasses, `response` is now an `HttpResponse`, and not a transport response like `aiohttp.ClientResponse` or `requests.Response`. The transport response is available in `internal_response` attribute #6490\n\n### Bug fixes\n\n- aiohttp is not required to import async pipelines classes #6496\n- `AsyncioRequestsTransport.sleep` is now a coroutine as expected #6490\n- `RequestsTransport` is not tight to `ProxyPolicy` implementation details anymore #6372\n- `AiohttpTransport` does not raise on unexpected kwargs #6355\n\n### Features\n\n- New paging base classes that support `continuation_token` and `by_page()` #6420\n- Proxy support for `AiohttpTransport` #6372\n\n## 1.0.0b1 (2019-06-26)\n\n- Preview 1 release", - "release_date": "2023-07-10T17:07:57", + "description": "Microsoft Azure Core Library for Python\n# Azure Core shared client library for Python\n\nAzure core provides shared exceptions and modules for Python SDK client libraries.\nThese libraries follow the [Azure SDK Design Guidelines for Python](https://azure.github.io/azure-sdk/python/guidelines/index.html) .\n\nIf you are a client library developer, please reference [client library developer reference](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md) for more information.\n\n[Source code](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/) \n| [Package (Pypi)][package]\n| [Package (Conda)](https://anaconda.org/microsoft/azure-core/)\n| [API reference documentation](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/)\n\n## _Disclaimer_\n\n_Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For more information and questions, please refer to _\n\n## Getting started\n\nTypically, you will not need to install azure core;\nit will be installed when you install one of the client libraries using it.\nIn case you want to install it explicitly (to implement your own client library, for example),\nyou can find it [here](https://pypi.org/project/azure-core/).\n\n## Key concepts\n\n### Azure Core Library Exceptions\n\n#### AzureError\n\nAzureError is the base exception for all errors.\n\n```python\nclass AzureError(Exception):\n def __init__(self, message, *args, **kwargs):\n self.inner_exception = kwargs.get(\"error\")\n self.exc_type, self.exc_value, self.exc_traceback = sys.exc_info()\n self.exc_type = self.exc_type.__name__ if self.exc_type else type(self.inner_exception)\n self.exc_msg = \"{}, {}: {}\".format(message, self.exc_type, self.exc_value) # type: ignore\n self.message = str(message)\n self.continuation_token = kwargs.get(\"continuation_token\")\n super(AzureError, self).__init__(self.message, *args)\n```\n\n*message* is any message (str) to be associated with the exception.\n\n*args* are any additional args to be included with exception.\n\n*kwargs* are keyword arguments to include with the exception. Use the keyword *error* to pass in an internal exception and *continuation_token* for a token reference to continue an incomplete operation.\n\n**The following exceptions inherit from AzureError:**\n\n#### ServiceRequestError\n\nAn error occurred while attempt to make a request to the service. No request was sent.\n\n#### ServiceResponseError\n\nThe request was sent, but the client failed to understand the response.\nThe connection may have timed out. These errors can be retried for idempotent or safe operations.\n\n#### HttpResponseError\n\nA request was made, and a non-success status code was received from the service.\n\n```python\nclass HttpResponseError(AzureError):\n def __init__(self, message=None, response=None, **kwargs):\n self.reason = None\n self.response = response\n if response:\n self.reason = response.reason\n self.status_code = response.status_code\n self.error = self._parse_odata_body(ODataV4Format, response) # type: Optional[ODataV4Format]\n if self.error:\n message = str(self.error)\n else:\n message = message or \"Operation returned an invalid status '{}'\".format(\n self.reason\n )\n\n super(HttpResponseError, self).__init__(message=message, **kwargs)\n```\n\n*message* is the HTTP response error message (optional)\n\n*response* is the HTTP response (optional).\n\n*kwargs* are keyword arguments to include with the exception.\n\n**The following exceptions inherit from HttpResponseError:**\n\n#### DecodeError\n\nAn error raised during response de-serialization.\n\n#### IncompleteReadError\n\nAn error raised if peer closes the connection before we have received the complete message body.\n\n#### ResourceExistsError\n\nAn error response with status code 4xx. This will not be raised directly by the Azure core pipeline.\n\n#### ResourceNotFoundError\n\nAn error response, typically triggered by a 412 response (for update) or 404 (for get/post).\n\n#### ResourceModifiedError\n\nAn error response with status code 4xx, typically 412 Conflict. This will not be raised directly by the Azure core pipeline.\n\n#### ResourceNotModifiedError\n\nAn error response with status code 304. This will not be raised directly by the Azure core pipeline.\n\n#### ClientAuthenticationError\n\nAn error response with status code 4xx. This will not be raised directly by the Azure core pipeline.\n\n#### TooManyRedirectsError\n\nAn error raised when the maximum number of redirect attempts is reached. The maximum amount of redirects can be configured in the RedirectPolicy.\n\n```python\nclass TooManyRedirectsError(HttpResponseError):\n def __init__(self, history, *args, **kwargs):\n self.history = history\n message = \"Reached maximum redirect attempts.\"\n super(TooManyRedirectsError, self).__init__(message, *args, **kwargs)\n```\n\n*history* is used to document the requests/responses that resulted in redirected requests.\n\n*args* are any additional args to be included with exception.\n\n*kwargs* are keyword arguments to include with the exception.\n\n#### StreamConsumedError\n\nAn error thrown if you try to access the stream of `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` once\nthe response stream has been consumed.\n\n#### StreamClosedError\n\nAn error thrown if you try to access the stream of the `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` once\nthe response stream has been closed.\n\n#### ResponseNotReadError\n\nAn error thrown if you try to access the `content` of `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` before\nreading in the response's bytes first.\n\n### Configurations\n\nWhen calling the methods, some properties can be configured by passing in as kwargs arguments.\n\n| Parameters | Description |\n| --- | --- |\n| headers | The HTTP Request headers. |\n| request_id | The request id to be added into header. |\n| user_agent | If specified, this will be added in front of the user agent string. |\n| logging_enable| Use to enable per operation. Defaults to `False`. |\n| logger | If specified, it will be used to log information. |\n| response_encoding | The encoding to use if known for this service (will disable auto-detection). |\n| proxies | Maps protocol or protocol and hostname to the URL of the proxy. |\n| raw_request_hook | Callback function. Will be invoked on request. |\n| raw_response_hook | Callback function. Will be invoked on response. |\n| network_span_namer | A callable to customize the span name. |\n| tracing_attributes | Attributes to set on all created spans. |\n| permit_redirects | Whether the client allows redirects. Defaults to `True`. |\n| redirect_max | The maximum allowed redirects. Defaults to `30`. |\n| retry_total | Total number of retries to allow. Takes precedence over other counts. Default value is `10`. |\n| retry_connect | How many connection-related errors to retry on. These are errors raised before the request is sent to the remote server, which we assume has not triggered the server to process the request. Default value is `3`. |\n| retry_read | How many times to retry on read errors. These errors are raised after the request was sent to the server, so the request may have side-effects. Default value is `3`. |\n| retry_status | How many times to retry on bad status codes. Default value is `3`. |\n| retry_backoff_factor | A backoff factor to apply between attempts after the second try (most errors are resolved immediately by a second try without a delay). Retry policy will sleep for: `{backoff factor} * (2 ** ({number of total retries} - 1))` seconds. If the backoff_factor is 0.1, then the retry will sleep for [0.0s, 0.2s, 0.4s, ...] between retries. The default value is `0.8`. |\n| retry_backoff_max | The maximum back off time. Default value is `120` seconds (2 minutes). |\n| retry_mode | Fixed or exponential delay between attempts, default is `Exponential`. |\n| timeout | Timeout setting for the operation in seconds, default is `604800`s (7 days). |\n| connection_timeout | A single float in seconds for the connection timeout. Defaults to `300` seconds. |\n| read_timeout | A single float in seconds for the read timeout. Defaults to `300` seconds. |\n| connection_verify | SSL certificate verification. Enabled by default. Set to False to disable, alternatively can be set to the path to a CA_BUNDLE file or directory with certificates of trusted CAs. |\n| connection_cert | Client-side certificates. You can specify a local cert to use as client side certificate, as a single file (containing the private key and the certificate) or as a tuple of both files' paths. |\n| proxies | Dictionary mapping protocol or protocol and hostname to the URL of the proxy. |\n| cookies | Dict or CookieJar object to send with the `Request`. |\n| connection_data_block_size | The block size of data sent over the connection. Defaults to `4096` bytes. |\n\n### Async transport\n\nThe async transport is designed to be opt-in. [AioHttp](https://pypi.org/project/aiohttp/) is one of the supported implementations of async transport. It is not installed by default. You need to install it separately.\n\n### Shared modules\n\n#### MatchConditions\n\nMatchConditions is an enum to describe match conditions.\n\n```python\nclass MatchConditions(Enum):\n Unconditionally = 1 # Matches any condition\n IfNotModified = 2 # If the target object is not modified. Usually it maps to etag=\n IfModified = 3 # Only if the target object is modified. Usually it maps to etag!=\n IfPresent = 4 # If the target object exists. Usually it maps to etag='*'\n IfMissing = 5 # If the target object does not exist. Usually it maps to etag!='*'\n```\n\n#### CaseInsensitiveEnumMeta\n\nA metaclass to support case-insensitive enums.\n\n```python\nfrom enum import Enum\n\nfrom azure.core import CaseInsensitiveEnumMeta\n\nclass MyCustomEnum(str, Enum, metaclass=CaseInsensitiveEnumMeta):\n FOO = 'foo'\n BAR = 'bar'\n```\n\n#### Null Sentinel Value\n\nA falsy sentinel object which is supposed to be used to specify attributes\nwith no data. This gets serialized to `null` on the wire.\n\n```python\nfrom azure.core.serialization import NULL\n\nassert bool(NULL) is False\n\nfoo = Foo(\n attr=NULL\n)\n```\n\n## Contributing\n\nThis project welcomes contributions and suggestions. Most contributions require\nyou to agree to a Contributor License Agreement (CLA) declaring that you have\nthe right to, and actually do, grant us the rights to use your contribution.\nFor details, visit [https://cla.microsoft.com](https://cla.microsoft.com).\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether\nyou need to provide a CLA and decorate the PR appropriately (e.g., label,\ncomment). Simply follow the instructions provided by the bot. You will only\nneed to do this once across all repos using our CLA.\n\nThis project has adopted the\n[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).\nFor more information, see the\n[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)\nor contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any\nadditional questions or comments.\n\n\n[package]: https://pypi.org/project/azure-core/\n\n\n# Release History\n\n## 1.29.4 (2023-09-07)\n\n### Bugs Fixed\n\n- Fixed the issue that some urls trigger an infinite loop. #31346\n- Fixed issue where IndexError was raised if multipart responses did not match the number of requests. #31471\n- Fixed issue unbound variable exception if dict is invalid in CloudEvent.from_dict. #31835\n- Fixed issue asyncBearerTokenCredentialPolicy is not backward compatible with SansIOHTTPPolicy. #31836\n- Fixed issue mypy complains with new version of azure-core. #31564\n\n## 1.29.3 (2023-08-22)\n\n### Bugs Fixed\n\n- Typing fix: `message` cannot be `None` in `AzureError`. #31564\n\n## 1.29.2 (2023-08-14)\n\n### Bugs Fixed\n\n- Added a default implementation for `AsyncTokenCredential.__aexit__()` #31573\n\n### Other Changes\n\n- Bumped `typing-extensions` version to 4.6.0.\n\n## 1.29.1 (2023-08-09)\n\n### Bugs Fixed\n\n- Not pass `enabled_cae` unless it is explicitly enabled.\n\n## 1.29.0 (2023-08-03)\n\n### Features Added\n\n- A keyword argument `enable_cae` was added to the `get_token` method of the `TokenCredential` protocol. #31012\n- `BearerTokenCredentialPolicy` and `AsyncBearerTokenCredentialPolicy` now accept `enable_cae` keyword arguments in their constructors. This is used in determining if [Continuous Access Evaluation (CAE)](https://learn.microsoft.com/azure/active-directory/conditional-access/concept-continuous-access-evaluation) should be enabled for each `get_token` request. #31012\n\n## 1.28.0 (2023-07-06)\n\n### Features Added\n\n- Added header name parameter to `RequestIdPolicy`. #30772\n- Added `SensitiveHeaderCleanupPolicy` that cleans up sensitive headers if a redirect happens and the new destination is in another domain. #28349\n\n### Other Changes\n\n- Catch aiohttp errors and translate them into azure-core errors.\n\n## 1.27.1 (2023-06-13)\n\n### Bugs Fixed\n\n- Fix url building for some complex query parameters scenarios #30707\n\n## 1.27.0 (2023-06-01)\n\n### Features Added\n\n- Added support to use sync credentials in `AsyncBearerTokenCredentialPolicy`. #30381\n- Added \"prefix\" parameter to AzureKeyCredentialPolicy #29901\n\n### Bugs Fixed\n\n- Improve error message when providing the wrong credential type for AzureKeyCredential #30380\n\n## 1.26.4 (2023-04-06)\n\n### Features Added\n\n- Updated settings to include OpenTelemetry as a tracer provider. #29095\n\n### Other Changes\n\n- Improved typing\n\n## 1.26.3 (2023-02-02)\n\n### Bugs Fixed\n\n- Fixed deflate decompression for aiohttp #28483\n\n## 1.26.2 (2023-01-05)\n\n### Bugs Fixed\n\n- Fix 'ClientSession' object has no attribute 'auto_decompress' (thanks to @mghextreme for the contribution)\n\n### Other Changes\n\n- Add \"x-ms-error-code\" as secure header to log\n- Rename \"DEFAULT_HEADERS_WHITELIST\" to \"DEFAULT_HEADERS_ALLOWLIST\". Added a backward compatible alias.\n\n## 1.26.1 (2022-11-03)\n\n### Other Changes\n\n- Added example of RequestsTransport with custom session. (thanks to @inirudebwoy for the contribution) #26768\n- Added Python 3.11 support.\n\n## 1.26.0 (2022-10-06)\n\n### Other Changes\n\n- LRO polling will not wait anymore before doing the first status check #26376\n- Added extra dependency for [aio]. pip install azure-core[aio] installs aiohttp too.\n\n## 1.25.1 (2022-09-01)\n\n### Bugs Fixed\n\n- Added @runtime_checkable to `TokenCredential` protocol definitions #25187\n\n## 1.25.0 (2022-08-04)\n\nAzure-core is supported on Python 3.7 or later. For more details, please read our page on [Azure SDK for Python version support policy](https://github.com/Azure/azure-sdk-for-python/wiki/Azure-SDKs-Python-version-support-policy).\n\n### Features Added\n\n- Added `CaseInsensitiveDict` implementation in `azure.core.utils` removing dependency on `requests` and `aiohttp`\n\n## 1.24.2 (2022-06-30)\n\n### Bugs Fixed\n\n- Fixed the bug that azure-core could not be imported under Python 3.11.0b3 #24928\n- `ContentDecodePolicy` can now correctly deserialize more JSON bodies with different mime types #22410\n\n## 1.24.1 (2022-06-01)\n\n### Bugs Fixed\n\n- Declare method level span as INTERNAL by default #24492\n- Fixed type hints for `azure.core.paging.ItemPaged` #24548\n\n## 1.24.0 (2022-05-06)\n\n### Features Added\n\n- Add `SerializationError` and `DeserializationError` in `azure.core.exceptions` for errors raised during serialization / deserialization #24312\n\n## 1.23.1 (2022-03-31)\n\n### Bugs Fixed\n\n- Allow stream inputs to the `content` kwarg of `azure.core.rest.HttpRequest` from objects with a `read` method #23578\n\n## 1.23.0 (2022-03-03)\n\n### Features Added\n\n- Improve intellisense type hinting for service client methods. #22891\n\n- Add a case insensitive dict `case_insensitive_dict` in `azure.core.utils`. #23206\n\n### Bugs Fixed\n\n- Use \"\\n\" rather than \"/n\" for new line in log. #23261\n\n### Other Changes\n\n- Log \"WWW-Authenticate\" header in `HttpLoggingPolicy` #22990\n- Added dependency on `typing-extensions` >= 4.0.1\n\n## 1.22.1 (2022-02-09)\n\n### Bugs Fixed\n\n- Limiting `final-state-via` scope to POST until consuming SDKs has been fixed to use this option properly on PUT. #22989\n\n## 1.22.0 (2022-02-03)\n_[**This version is deprecated.**]_\n\n### Features Added\n\n- Add support for `final-state-via` LRO option in core. #22713\n\n### Bugs Fixed\n\n- Add response body to string representation of `HttpResponseError` if we're not able to parse out information #22302\n- Raise `AttributeError` when calling azure.core.pipeline.transport.\\_\\_bases__ #22469\n\n### Other Changes\n\n- Python 2.7 is no longer supported. Please use Python version 3.6 or later.\n\n## 1.21.1 (2021-12-06)\n\n### Other Changes\n\n- Revert change in str method #22023\n\n## 1.21.0 (2021-12-02)\n\n### Breaking Changes\n\n- Sync stream downloading now raises `azure.core.exceptions.DecodeError` rather than `requests.exceptions.ContentDecodingError`\n\n### Bugs Fixed\n\n- Add response body to string representation of `HttpResponseError` if we're not able to parse out information #21800\n\n## 1.20.1 (2021-11-08)\n\n### Bugs Fixed\n\n- Correctly set response's content to decompressed body when users are using aiohttp transport with decompression headers #21620\n\n## 1.20.0 (2021-11-04)\n\n### Features Added\n\n- GA `send_request` onto the `azure.core.PipelineClient` and `azure.core.AsyncPipelineClient`. This method takes in\nrequests and sends them through our pipelines.\n- GA `azure.core.rest`. `azure.core.rest` is our new public simple HTTP library in `azure.core` that users will use to create requests, and consume responses.\n- GA errors `StreamConsumedError`, `StreamClosedError`, and `ResponseNotReadError` to `azure.core.exceptions`. These errors\nare thrown if you mishandle streamed responses from the `azure.core.rest` module\n- add kwargs to the methods for `iter_raw` and `iter_bytes` #21529\n- no longer raise JSON errors if users pass in file descriptors of JSON to the `json` kwarg in `HttpRequest` #21504\n- Added new error type `IncompleteReadError` which is raised if peer closes the connection before we have received the complete message body.\n\n### Breaking Changes\n\n- SansIOHTTPPolicy.on_exception returns None instead of bool.\n\n### Bugs Fixed\n\n- The `Content-Length` header in a http response is strictly checked against the actual number of bytes in the body,\n rather than silently truncating data in case the underlying tcp connection is closed prematurely.\n (thanks to @jochen-ott-by for the contribution) #20412\n- UnboundLocalError when SansIOHTTPPolicy handles an exception #15222\n- Add default content type header of `text/plain` and content length header for users who pass unicode strings to the `content` kwarg of `HttpRequest` in 2.7 #21550\n\n## 1.19.1 (2021-11-01)\n\n### Bugs Fixed\n\n- respect text encoding specified in argument (thanks to @ryohji for the contribution) #20796\n- Fix \"coroutine x.read() was never awaited\" warning from `ContentDecodePolicy` #21318\n- fix type check for `data` input to `azure.core.rest` for python 2.7 users #21341\n- use `charset_normalizer` if `chardet` is not installed to migrate aiohttp 3.8.0 changes.\n\n### Other Changes\n\n- Refactor AzureJSONEncoder (thanks to @Codejune for the contribution) #21028\n\n## 1.19.0 (2021-09-30)\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse` are now abstract base classes. They should not be initialized directly, instead\nyour transport responses should inherit from them and implement them.\n- The properties of the `azure.core.rest` responses are now all read-only\n\n- HttpLoggingPolicy integrates logs into one record #19925\n\n## 1.18.0 (2021-09-02)\n\n### Features Added\n\n- `azure.core.serialization.AzureJSONEncoder` (introduced in 1.17.0) serializes `datetime.datetime` objects in ISO 8601 format, conforming to RFC 3339's specification. #20190\n- We now use `azure.core.serialization.AzureJSONEncoder` to serialize `json` input to `azure.core.rest.HttpRequest`.\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- The `text` property on `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse` has changed to a method, which also takes\nan `encoding` parameter.\n- Removed `iter_text` and `iter_lines` from `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse`\n\n### Bugs Fixed\n\n- The behaviour of the headers returned in `azure.core.rest` responses now aligns across sync and async. Items can now be checked case-insensitively and without raising an error for format.\n\n## 1.17.0 (2021-08-05)\n\n### Features Added\n\n- Cut hard dependency on requests library\n- Added a `from_json` method which now accepts storage QueueMessage, eventhub's EventData or ServiceBusMessage or simply json bytes to return a `CloudEvent`\n\n### Fixed\n\n- Not override \"x-ms-client-request-id\" if it already exists in the header. #17757\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- `azure.core.rest` will not try to guess the `charset` anymore if it was impossible to extract it from `HttpResponse` analysis. This removes our dependency on `charset`.\n\n## 1.16.0 (2021-07-01)\n\n### Features Added\n\n- Add new ***provisional*** methods `send_request` onto the `azure.core.PipelineClient` and `azure.core.AsyncPipelineClient`. This method takes in\nrequests and sends them through our pipelines.\n- Add new ***provisional*** module `azure.core.rest`. `azure.core.rest` is our new public simple HTTP library in `azure.core` that users will use to create requests, and consume responses.\n- Add new ***provisional*** errors `StreamConsumedError`, `StreamClosedError`, and `ResponseNotReadError` to `azure.core.exceptions`. These errors\nare thrown if you mishandle streamed responses from the provisional `azure.core.rest` module\n\n### Fixed\n\n- Improved error message in the `from_dict` method of `CloudEvent` when a wrong schema is sent.\n\n## 1.15.0 (2021-06-04)\n\n### New Features\n\n- Added `BearerTokenCredentialPolicy.on_challenge` and `.authorize_request` to allow subclasses to optionally handle authentication challenges\n\n### Bug Fixes\n\n- Retry policies don't sleep after operations time out\n- The `from_dict` methhod in the `CloudEvent` can now convert a datetime string to datetime object when microsecond exceeds the python limitation\n\n## 1.14.0 (2021-05-13)\n\n### New Features\n\n- Added `azure.core.credentials.AzureNamedKeyCredential` credential #17548.\n- Added `decompress` parameter for `stream_download` method. If it is set to `False`, will not do decompression upon the stream. #17920\n\n## 1.13.0 (2021-04-02)\n\nAzure core requires Python 2.7 or Python 3.6+ since this release.\n\n### New Features\n\n- Added `azure.core.utils.parse_connection_string` function to parse connection strings across SDKs, with common validation and support for case insensitive keys.\n- Supported adding custom policies #16519\n- Added `~azure.core.tracing.Link` that should be used while passing `Links` to `AbstractSpan`.\n- `AbstractSpan` constructor can now take in additional keyword only args.\n\n### Bug fixes\n\n- Make NetworkTraceLoggingPolicy show the auth token in plain text. #14191\n- Fixed RetryPolicy overriding default connection timeout with an extreme value #17481\n\n## 1.12.0 (2021-03-08)\n\nThis version will be the last version to officially support Python 3.5, future versions will require Python 2.7 or Python 3.6+.\n\n### Features\n\n- Added `azure.core.messaging.CloudEvent` model that follows the cloud event spec.\n- Added `azure.core.serialization.NULL` sentinel value\n- Improve `repr`s for `HttpRequest` and `HttpResponse`s #16972\n\n### Bug Fixes\n\n- Disable retry in stream downloading. (thanks to @jochen-ott-by @hoffmann for the contribution) #16723\n\n## 1.11.0 (2021-02-08)\n\n### Features\n\n- Added `CaseInsensitiveEnumMeta` class for case-insensitive enums. #16316\n- Add `raise_for_status` method onto `HttpResponse`. Calling `response.raise_for_status()` on a response with an error code\nwill raise an `HttpResponseError`. Calling it on a good response will do nothing #16399\n\n### Bug Fixes\n\n- Update conn.conn_kw rather than overriding it when setting block size. (thanks for @jiasli for the contribution) #16587\n\n## 1.10.0 (2021-01-11)\n\n### Features\n\n- Added `AzureSasCredential` and its respective policy. #15946\n\n## 1.9.0 (2020-11-09)\n\n### Features\n\n- Add a `continuation_token` attribute to the base `AzureError` exception, and set this value for errors raised\n during paged or long-running operations.\n\n### Bug Fixes\n\n- Set retry_interval to 1 second instead of 1000 seconds (thanks **vbarbaresi** for contributing) #14357\n\n\n## 1.8.2 (2020-10-05)\n\n### Bug Fixes\n\n- Fixed bug to allow polling in the case of parameterized endpoints with relative polling urls #14097\n\n\n## 1.8.1 (2020-09-08)\n\n### Bug fixes\n\n- SAS credential replicated \"/\" fix #13159\n\n## 1.8.0 (2020-08-10)\n\n### Features\n\n- Support params as list for exploding parameters #12410\n\n\n## 1.7.0 (2020-07-06)\n\n### Bug fixes\n\n- `AzureKeyCredentialPolicy` will now accept (and ignore) passed in kwargs #11963\n- Better error messages if passed endpoint is incorrect #12106\n- Do not JSON encore a string if content type is \"text\" #12137\n\n### Features\n\n- Added `http_logging_policy` property on the `Configuration` object, allowing users to individually\nset the http logging policy of the config #12218\n\n## 1.6.0 (2020-06-03)\n\n### Bug fixes\n\n- Fixed deadlocks in AsyncBearerTokenCredentialPolicy #11543\n- Fix AttributeException in StreamDownloadGenerator #11462\n\n### Features\n\n- Added support for changesets as part of multipart message support #10485\n- Add AsyncLROPoller in azure.core.polling #10801\n- Add get_continuation_token/from_continuation_token/polling_method methods in pollers (sync and async) #10801\n- HttpResponse and PipelineContext objects are now pickable #10801\n\n## 1.5.0 (2020-05-04)\n\n### Features\n\n- Support \"x-ms-retry-after-ms\" in response header #10743\n- `link` and `link_from_headers` now accepts attributes #10765\n\n### Bug fixes\n\n- Not retry if the status code is less than 400 #10778\n- \"x-ms-request-id\" is not considered safe header for logging #10967\n\n## 1.4.0 (2020-04-06)\n\n### Features\n\n- Support a default error type in map_error #9773\n- Added `AzureKeyCredential` and its respective policy. #10509\n- Added `azure.core.polling.base_polling` module with a \"Microsoft One API\" polling implementation #10090\n Also contains the async version in `azure.core.polling.async_base_polling`\n- Support kwarg `enforce_https` to disable HTTPS check on authentication #9821\n- Support additional kwargs in `HttpRequest.set_multipart_mixed` that will be passed into pipeline context.\n\n## 1.3.0 (2020-03-09)\n\n### Bug fixes\n\n- Appended RequestIdPolicy to the default pipeline #9841\n- Rewind the body position in async_retry #10117\n\n### Features\n\n- Add raw_request_hook support in custom_hook_policy #9958\n- Add timeout support in retry_policy #10011\n- Add OdataV4 error format auto-parsing in all exceptions ('error' attribute) #9738\n\n## 1.2.2 (2020-02-10)\n\n### Bug fixes\n\n- Fixed a bug that sends None as request_id #9545\n- Enable mypy for customers #9572\n- Handle TypeError in deep copy #9620\n- Fix text/plain content-type in decoder #9589\n\n## 1.2.1 (2020-01-14)\n\n### Bug fixes\n\n- Fixed a regression in 1.2.0 that was incompatible with azure-keyvault-* 4.0.0\n[#9462](https://github.com/Azure/azure-sdk-for-python/issues/9462)\n\n\n## 1.2.0 (2020-01-14)\n\n### Features\n\n- Add user_agent & sdk_moniker kwargs in UserAgentPolicy init #9355\n- Support OPTIONS HTTP verb #9322\n- Add tracing_attributes to tracing decorator #9297\n- Support auto_request_id in RequestIdPolicy #9163\n- Support fixed retry #6419\n- Support \"retry-after-ms\" in response header #9240\n\n### Bug fixes\n\n- Removed `__enter__` and `__exit__` from async context managers #9313\n\n## 1.1.1 (2019-12-03)\n\n### Bug fixes\n\n- Bearer token authorization requires HTTPS\n- Rewind the body position in retry #8307\n\n## 1.1.0 (2019-11-25)\n\n### Features\n\n- New RequestIdPolicy #8437\n- Enable logging policy in default pipeline #8053\n- Normalize transport timeout. #8000\n Now we have:\n * 'connection_timeout' - a single float in seconds for the connection timeout. Default 5min\n * 'read_timeout' - a single float in seconds for the read timeout. Default 5min\n\n### Bug fixes\n\n- RequestHistory: deepcopy fails if request contains a stream #7732\n- Retry: retry raises error if response does not have http_response #8629\n- Client kwargs are now passed to DistributedTracingPolicy correctly #8051\n- NetworkLoggingPolicy now logs correctly all requests in case of retry #8262\n\n## 1.0.0 (2019-10-29)\n\n### Features\n\n- Tracing: DistributedTracingPolicy now accepts kwargs network_span_namer to change network span name #7773\n- Tracing: Implementation of AbstractSpan can now use the mixin HttpSpanMixin to get HTTP span update automatically #7773\n- Tracing: AbstractSpan contract \"change_context\" introduced #7773\n- Introduce new policy HttpLoggingPolicy #7988\n\n### Bug fixes\n\n- Fix AsyncioRequestsTransport if input stream is an async generator #7743\n- Fix form-data with aiohttp transport #7749\n\n### Breaking changes\n\n- Tracing: AbstractSpan.set_current_span is longer supported. Use change_context instead. #7773\n- azure.core.pipeline.policies.ContentDecodePolicy.deserialize_from_text changed\n\n## 1.0.0b4 (2019-10-07)\n\n### Features\n\n- Tracing: network span context is available with the TRACING_CONTEXT in pipeline response #7252\n- Tracing: Span contract now has `kind`, `traceparent` and is a context manager #7252\n- SansIOHTTPPolicy methods can now be coroutines #7497\n- Add multipart/mixed support #7083:\n\n - HttpRequest now has a \"set_multipart_mixed\" method to set the parts of this request\n - HttpRequest now has a \"prepare_multipart_body\" method to build final body.\n - HttpResponse now has a \"parts\" method to return an iterator of parts\n - AsyncHttpResponse now has a \"parts\" methods to return an async iterator of parts\n - Note that multipart/mixed is a Python 3.x only feature\n\n### Bug fixes\n\n- Tracing: policy cannot fail the pipeline, even in the worst condition #7252\n- Tracing: policy pass correctly status message if exception #7252\n- Tracing: incorrect span if exception raised from decorated function #7133\n- Fixed urllib3 ConnectTimeoutError being raised by Requests during a socket timeout. Now this exception is caught and wrapped as a `ServiceRequestError` #7542\n\n### Breaking changes\n\n- Tracing: `azure.core.tracing.context` removed\n- Tracing: `azure.core.tracing.context.tracing_context.with_current_context` renamed to `azure.core.tracing.common.with_current_context` #7252\n- Tracing: `link` renamed `link_from_headers` and `link` takes now a string\n- Tracing: opencensus implementation has been moved to the package `azure-core-tracing-opencensus`\n- Some modules and classes that were importables from several different places have been removed:\n\n - `azure.core.HttpResponseError` is now only `azure.core.exceptions.HttpResponseError`\n - `azure.core.Configuration` is now only `azure.core.configuration.Configuration`\n - `azure.core.HttpRequest` is now only `azure.core.pipeline.transport.HttpRequest`\n - `azure.core.version` module has been removed. Use `azure.core.__version__` to get version number.\n - `azure.core.pipeline_client` has been removed. Import from `azure.core` instead.\n - `azure.core.pipeline_client_async` has been removed. Import from `azure.core` instead.\n - `azure.core.pipeline.base` has been removed. Import from `azure.core.pipeline` instead.\n - `azure.core.pipeline.base_async` has been removed. Import from `azure.core.pipeline` instead.\n - `azure.core.pipeline.policies.base` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.base_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.authentication` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.authentication_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.custom_hook` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.redirect` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.redirect_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.retry` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.retry_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.distributed_tracing` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.universal` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.tracing.abstract_span` has been removed. Import from `azure.core.tracing` instead.\n - `azure.core.pipeline.transport.base` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.base_async` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_basic` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_asyncio` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_trio` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.aiohttp` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.polling.poller` has been removed. Import from `azure.core.polling` instead.\n - `azure.core.polling.async_poller` has been removed. Import from `azure.core.polling` instead.\n\n## 1.0.0b3 (2019-09-09)\n\n### Bug fixes\n\n- Fix aiohttp auto-headers #6992\n- Add tracing to policies module init #6951\n\n## 1.0.0b2 (2019-08-05)\n\n### Breaking changes\n\n- Transport classes don't take `config` parameter anymore (use kwargs instead) #6372\n- `azure.core.paging` has been completely refactored #6420\n- HttpResponse.content_type attribute is now a string (was a list) #6490\n- For `StreamDownloadGenerator` subclasses, `response` is now an `HttpResponse`, and not a transport response like `aiohttp.ClientResponse` or `requests.Response`. The transport response is available in `internal_response` attribute #6490\n\n### Bug fixes\n\n- aiohttp is not required to import async pipelines classes #6496\n- `AsyncioRequestsTransport.sleep` is now a coroutine as expected #6490\n- `RequestsTransport` is not tight to `ProxyPolicy` implementation details anymore #6372\n- `AiohttpTransport` does not raise on unexpected kwargs #6355\n\n### Features\n\n- New paging base classes that support `continuation_token` and `by_page()` #6420\n- Proxy support for `AiohttpTransport` #6372\n\n## 1.0.0b1 (2019-06-26)\n\n- Preview 1 release", + "release_date": "2023-09-07T19:49:16", "parties": [ { "type": "person", @@ -143,6 +143,8 @@ } ], "keywords": [ + "azure", + "azure sdk", "Development Status :: 5 - Production/Stable", "Programming Language :: Python", "Programming Language :: Python :: 3", @@ -154,11 +156,11 @@ "Programming Language :: Python :: 3.9" ], "homepage_url": "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/core/azure-core", - "download_url": "https://files.pythonhosted.org/packages/c3/0a/32b17d776a6bf5ddaa9dbad0e88de9d28a55bec1d37b8d408cc7d2e5e28d/azure_core-1.28.0-py3-none-any.whl", - "size": 185416, + "download_url": "https://files.pythonhosted.org/packages/98/3a/d53e2b8a75c448ef45d7ae4b0659eb6c0d48978f25a709e2a39894a48704/azure_core-1.29.4-py3-none-any.whl", + "size": 192407, "sha1": null, - "md5": "6779fa216aba34d22d1c6d9def843d94", - "sha256": "dec36dfc8eb0b052a853f30c07437effec2f9e3e1fc8f703d9bdaa5cfc0043d9", + "md5": "1f0d717524f9955ec5872834ae75c71a", + "sha256": "b03261bcba22c0b9290faf9999cedd23e849ed2577feee90515694cea6bc74bf", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -178,20 +180,20 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/azure-core/1.28.0/json", + "api_data_url": "https://pypi.org/pypi/azure-core/1.29.4/json", "datasource_id": null, - "purl": "pkg:pypi/azure-core@1.28.0" + "purl": "pkg:pypi/azure-core@1.29.4" }, { "type": "pypi", "namespace": null, "name": "azure-core", - "version": "1.28.0", + "version": "1.29.4", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "Microsoft Azure Core Library for Python\n# Azure Core shared client library for Python\n\nAzure core provides shared exceptions and modules for Python SDK client libraries.\nThese libraries follow the [Azure SDK Design Guidelines for Python](https://azure.github.io/azure-sdk/python/guidelines/index.html) .\n\nIf you are a client library developer, please reference [client library developer reference](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md) for more information.\n\n[Source code](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/) \n| [Package (Pypi)][package]\n| [Package (Conda)](https://anaconda.org/microsoft/azure-core/)\n| [API reference documentation](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/)\n\n## _Disclaimer_\n\n_Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For more information and questions, please refer to _\n\n## Getting started\n\nTypically, you will not need to install azure core;\nit will be installed when you install one of the client libraries using it.\nIn case you want to install it explicitly (to implement your own client library, for example),\nyou can find it [here](https://pypi.org/project/azure-core/).\n\n## Key concepts\n\n### Azure Core Library Exceptions\n\n#### AzureError\n\nAzureError is the base exception for all errors.\n\n```python\nclass AzureError(Exception):\n def __init__(self, message, *args, **kwargs):\n self.inner_exception = kwargs.get(\"error\")\n self.exc_type, self.exc_value, self.exc_traceback = sys.exc_info()\n self.exc_type = self.exc_type.__name__ if self.exc_type else type(self.inner_exception)\n self.exc_msg = \"{}, {}: {}\".format(message, self.exc_type, self.exc_value) # type: ignore\n self.message = str(message)\n self.continuation_token = kwargs.get(\"continuation_token\")\n super(AzureError, self).__init__(self.message, *args)\n```\n\n*message* is any message (str) to be associated with the exception.\n\n*args* are any additional args to be included with exception.\n\n*kwargs* are keyword arguments to include with the exception. Use the keyword *error* to pass in an internal exception and *continuation_token* for a token reference to continue an incomplete operation.\n\n**The following exceptions inherit from AzureError:**\n\n#### ServiceRequestError\n\nAn error occurred while attempt to make a request to the service. No request was sent.\n\n#### ServiceResponseError\n\nThe request was sent, but the client failed to understand the response.\nThe connection may have timed out. These errors can be retried for idempotent or safe operations.\n\n#### HttpResponseError\n\nA request was made, and a non-success status code was received from the service.\n\n```python\nclass HttpResponseError(AzureError):\n def __init__(self, message=None, response=None, **kwargs):\n self.reason = None\n self.response = response\n if response:\n self.reason = response.reason\n self.status_code = response.status_code\n self.error = self._parse_odata_body(ODataV4Format, response) # type: Optional[ODataV4Format]\n if self.error:\n message = str(self.error)\n else:\n message = message or \"Operation returned an invalid status '{}'\".format(\n self.reason\n )\n\n super(HttpResponseError, self).__init__(message=message, **kwargs)\n```\n\n*message* is the HTTP response error message (optional)\n\n*response* is the HTTP response (optional).\n\n*kwargs* are keyword arguments to include with the exception.\n\n**The following exceptions inherit from HttpResponseError:**\n\n#### DecodeError\n\nAn error raised during response de-serialization.\n\n#### IncompleteReadError\n\nAn error raised if peer closes the connection before we have received the complete message body.\n\n#### ResourceExistsError\n\nAn error response with status code 4xx. This will not be raised directly by the Azure core pipeline.\n\n#### ResourceNotFoundError\n\nAn error response, typically triggered by a 412 response (for update) or 404 (for get/post).\n\n#### ResourceModifiedError\n\nAn error response with status code 4xx, typically 412 Conflict. This will not be raised directly by the Azure core pipeline.\n\n#### ResourceNotModifiedError\n\nAn error response with status code 304. This will not be raised directly by the Azure core pipeline.\n\n#### ClientAuthenticationError\n\nAn error response with status code 4xx. This will not be raised directly by the Azure core pipeline.\n\n#### TooManyRedirectsError\n\nAn error raised when the maximum number of redirect attempts is reached. The maximum amount of redirects can be configured in the RedirectPolicy.\n\n```python\nclass TooManyRedirectsError(HttpResponseError):\n def __init__(self, history, *args, **kwargs):\n self.history = history\n message = \"Reached maximum redirect attempts.\"\n super(TooManyRedirectsError, self).__init__(message, *args, **kwargs)\n```\n\n*history* is used to document the requests/responses that resulted in redirected requests.\n\n*args* are any additional args to be included with exception.\n\n*kwargs* are keyword arguments to include with the exception.\n\n#### StreamConsumedError\n\nAn error thrown if you try to access the stream of `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` once\nthe response stream has been consumed.\n\n#### StreamClosedError\n\nAn error thrown if you try to access the stream of the `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` once\nthe response stream has been closed.\n\n#### ResponseNotReadError\n\nAn error thrown if you try to access the `content` of `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` before\nreading in the response's bytes first.\n\n### Configurations\n\nWhen calling the methods, some properties can be configured by passing in as kwargs arguments.\n\n| Parameters | Description |\n| --- | --- |\n| headers | The HTTP Request headers. |\n| request_id | The request id to be added into header. |\n| user_agent | If specified, this will be added in front of the user agent string. |\n| logging_enable| Use to enable per operation. Defaults to `False`. |\n| logger | If specified, it will be used to log information. |\n| response_encoding | The encoding to use if known for this service (will disable auto-detection). |\n| proxies | Maps protocol or protocol and hostname to the URL of the proxy. |\n| raw_request_hook | Callback function. Will be invoked on request. |\n| raw_response_hook | Callback function. Will be invoked on response. |\n| network_span_namer | A callable to customize the span name. |\n| tracing_attributes | Attributes to set on all created spans. |\n| permit_redirects | Whether the client allows redirects. Defaults to `True`. |\n| redirect_max | The maximum allowed redirects. Defaults to `30`. |\n| retry_total | Total number of retries to allow. Takes precedence over other counts. Default value is `10`. |\n| retry_connect | How many connection-related errors to retry on. These are errors raised before the request is sent to the remote server, which we assume has not triggered the server to process the request. Default value is `3`. |\n| retry_read | How many times to retry on read errors. These errors are raised after the request was sent to the server, so the request may have side-effects. Default value is `3`. |\n| retry_status | How many times to retry on bad status codes. Default value is `3`. |\n| retry_backoff_factor | A backoff factor to apply between attempts after the second try (most errors are resolved immediately by a second try without a delay). Retry policy will sleep for: `{backoff factor} * (2 ** ({number of total retries} - 1))` seconds. If the backoff_factor is 0.1, then the retry will sleep for [0.0s, 0.2s, 0.4s, ...] between retries. The default value is `0.8`. |\n| retry_backoff_max | The maximum back off time. Default value is `120` seconds (2 minutes). |\n| retry_mode | Fixed or exponential delay between attempts, default is `Exponential`. |\n| timeout | Timeout setting for the operation in seconds, default is `604800`s (7 days). |\n| connection_timeout | A single float in seconds for the connection timeout. Defaults to `300` seconds. |\n| read_timeout | A single float in seconds for the read timeout. Defaults to `300` seconds. |\n| connection_verify | SSL certificate verification. Enabled by default. Set to False to disable, alternatively can be set to the path to a CA_BUNDLE file or directory with certificates of trusted CAs. |\n| connection_cert | Client-side certificates. You can specify a local cert to use as client side certificate, as a single file (containing the private key and the certificate) or as a tuple of both files' paths. |\n| proxies | Dictionary mapping protocol or protocol and hostname to the URL of the proxy. |\n| cookies | Dict or CookieJar object to send with the `Request`. |\n| connection_data_block_size | The block size of data sent over the connection. Defaults to `4096` bytes. |\n\n### Async transport\n\nThe async transport is designed to be opt-in. [AioHttp](https://pypi.org/project/aiohttp/) is one of the supported implementations of async transport. It is not installed by default. You need to install it separately.\n\n### Shared modules\n\n#### MatchConditions\n\nMatchConditions is an enum to describe match conditions.\n\n```python\nclass MatchConditions(Enum):\n Unconditionally = 1 # Matches any condition\n IfNotModified = 2 # If the target object is not modified. Usually it maps to etag=\n IfModified = 3 # Only if the target object is modified. Usually it maps to etag!=\n IfPresent = 4 # If the target object exists. Usually it maps to etag='*'\n IfMissing = 5 # If the target object does not exist. Usually it maps to etag!='*'\n```\n\n#### CaseInsensitiveEnumMeta\n\nA metaclass to support case-insensitive enums.\n\n```python\nfrom enum import Enum\n\nfrom azure.core import CaseInsensitiveEnumMeta\n\nclass MyCustomEnum(str, Enum, metaclass=CaseInsensitiveEnumMeta):\n FOO = 'foo'\n BAR = 'bar'\n```\n\n#### Null Sentinel Value\n\nA falsy sentinel object which is supposed to be used to specify attributes\nwith no data. This gets serialized to `null` on the wire.\n\n```python\nfrom azure.core.serialization import NULL\n\nassert bool(NULL) is False\n\nfoo = Foo(\n attr=NULL\n)\n```\n\n## Contributing\n\nThis project welcomes contributions and suggestions. Most contributions require\nyou to agree to a Contributor License Agreement (CLA) declaring that you have\nthe right to, and actually do, grant us the rights to use your contribution.\nFor details, visit [https://cla.microsoft.com](https://cla.microsoft.com).\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether\nyou need to provide a CLA and decorate the PR appropriately (e.g., label,\ncomment). Simply follow the instructions provided by the bot. You will only\nneed to do this once across all repos using our CLA.\n\nThis project has adopted the\n[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).\nFor more information, see the\n[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)\nor contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any\nadditional questions or comments.\n\n\n[package]: https://pypi.org/project/azure-core/\n\n\n# Release History\n\n## 1.28.0 (2023-07-06)\n\n### Features Added\n\n- Added header name parameter to `RequestIdPolicy`. #30772\n- Added `SensitiveHeaderCleanupPolicy` that cleans up sensitive headers if a redirect happens and the new destination is in another domain. #28349\n\n### Other Changes\n\n- Catch aiohttp errors and translate them into azure-core errors.\n\n## 1.27.1 (2023-06-13)\n\n### Bugs Fixed\n\n- Fix url building for some complex query parameters scenarios #30707\n\n## 1.27.0 (2023-06-01)\n\n### Features Added\n\n- Added support to use sync credentials in `AsyncBearerTokenCredentialPolicy`. #30381\n- Added \"prefix\" parameter to AzureKeyCredentialPolicy #29901\n\n### Bugs Fixed\n\n- Improve error message when providing the wrong credential type for AzureKeyCredential #30380\n\n## 1.26.4 (2023-04-06)\n\n### Features Added\n\n- Updated settings to include OpenTelemetry as a tracer provider. #29095\n\n### Other Changes\n\n- Improved typing\n\n## 1.26.3 (2023-02-02)\n\n### Bugs Fixed\n\n- Fixed deflate decompression for aiohttp #28483\n\n## 1.26.2 (2023-01-05)\n\n### Bugs Fixed\n\n- Fix 'ClientSession' object has no attribute 'auto_decompress' (thanks to @mghextreme for the contribution)\n\n### Other Changes\n\n- Add \"x-ms-error-code\" as secure header to log\n- Rename \"DEFAULT_HEADERS_WHITELIST\" to \"DEFAULT_HEADERS_ALLOWLIST\". Added a backward compatible alias.\n\n## 1.26.1 (2022-11-03)\n\n### Other Changes\n\n- Added example of RequestsTransport with custom session. (thanks to @inirudebwoy for the contribution) #26768\n- Added Python 3.11 support.\n\n## 1.26.0 (2022-10-06)\n\n### Other Changes\n\n- LRO polling will not wait anymore before doing the first status check #26376\n- Added extra dependency for [aio]. pip install azure-core[aio] installs aiohttp too.\n\n## 1.25.1 (2022-09-01)\n\n### Bugs Fixed\n\n- Added @runtime_checkable to `TokenCredential` protocol definitions #25187\n\n## 1.25.0 (2022-08-04)\n\nAzure-core is supported on Python 3.7 or later. For more details, please read our page on [Azure SDK for Python version support policy](https://github.com/Azure/azure-sdk-for-python/wiki/Azure-SDKs-Python-version-support-policy).\n\n### Features Added\n\n- Added `CaseInsensitiveDict` implementation in `azure.core.utils` removing dependency on `requests` and `aiohttp`\n\n## 1.24.2 (2022-06-30)\n\n### Bugs Fixed\n\n- Fixed the bug that azure-core could not be imported under Python 3.11.0b3 #24928\n- `ContentDecodePolicy` can now correctly deserialize more JSON bodies with different mime types #22410\n\n## 1.24.1 (2022-06-01)\n\n### Bugs Fixed\n\n- Declare method level span as INTERNAL by default #24492\n- Fixed type hints for `azure.core.paging.ItemPaged` #24548\n\n## 1.24.0 (2022-05-06)\n\n### Features Added\n\n- Add `SerializationError` and `DeserializationError` in `azure.core.exceptions` for errors raised during serialization / deserialization #24312\n\n## 1.23.1 (2022-03-31)\n\n### Bugs Fixed\n\n- Allow stream inputs to the `content` kwarg of `azure.core.rest.HttpRequest` from objects with a `read` method #23578\n\n## 1.23.0 (2022-03-03)\n\n### Features Added\n\n- Improve intellisense type hinting for service client methods. #22891\n\n- Add a case insensitive dict `case_insensitive_dict` in `azure.core.utils`. #23206\n\n### Bugs Fixed\n\n- Use \"\\n\" rather than \"/n\" for new line in log. #23261\n\n### Other Changes\n\n- Log \"WWW-Authenticate\" header in `HttpLoggingPolicy` #22990\n- Added dependency on `typing-extensions` >= 4.0.1\n\n## 1.22.1 (2022-02-09)\n\n### Bugs Fixed\n\n- Limiting `final-state-via` scope to POST until consuming SDKs has been fixed to use this option properly on PUT. #22989\n\n## 1.22.0 (2022-02-03)\n_[**This version is deprecated.**]_\n\n### Features Added\n\n- Add support for `final-state-via` LRO option in core. #22713\n\n### Bugs Fixed\n\n- Add response body to string representation of `HttpResponseError` if we're not able to parse out information #22302\n- Raise `AttributeError` when calling azure.core.pipeline.transport.\\_\\_bases__ #22469\n\n### Other Changes\n\n- Python 2.7 is no longer supported. Please use Python version 3.6 or later.\n\n## 1.21.1 (2021-12-06)\n\n### Other Changes\n\n- Revert change in str method #22023\n\n## 1.21.0 (2021-12-02)\n\n### Breaking Changes\n\n- Sync stream downloading now raises `azure.core.exceptions.DecodeError` rather than `requests.exceptions.ContentDecodingError`\n\n### Bugs Fixed\n\n- Add response body to string representation of `HttpResponseError` if we're not able to parse out information #21800\n\n## 1.20.1 (2021-11-08)\n\n### Bugs Fixed\n\n- Correctly set response's content to decompressed body when users are using aiohttp transport with decompression headers #21620\n\n## 1.20.0 (2021-11-04)\n\n### Features Added\n\n- GA `send_request` onto the `azure.core.PipelineClient` and `azure.core.AsyncPipelineClient`. This method takes in\nrequests and sends them through our pipelines.\n- GA `azure.core.rest`. `azure.core.rest` is our new public simple HTTP library in `azure.core` that users will use to create requests, and consume responses.\n- GA errors `StreamConsumedError`, `StreamClosedError`, and `ResponseNotReadError` to `azure.core.exceptions`. These errors\nare thrown if you mishandle streamed responses from the `azure.core.rest` module\n- add kwargs to the methods for `iter_raw` and `iter_bytes` #21529\n- no longer raise JSON errors if users pass in file descriptors of JSON to the `json` kwarg in `HttpRequest` #21504\n- Added new error type `IncompleteReadError` which is raised if peer closes the connection before we have received the complete message body.\n\n### Breaking Changes\n\n- SansIOHTTPPolicy.on_exception returns None instead of bool.\n\n### Bugs Fixed\n\n- The `Content-Length` header in a http response is strictly checked against the actual number of bytes in the body,\n rather than silently truncating data in case the underlying tcp connection is closed prematurely.\n (thanks to @jochen-ott-by for the contribution) #20412\n- UnboundLocalError when SansIOHTTPPolicy handles an exception #15222\n- Add default content type header of `text/plain` and content length header for users who pass unicode strings to the `content` kwarg of `HttpRequest` in 2.7 #21550\n\n## 1.19.1 (2021-11-01)\n\n### Bugs Fixed\n\n- respect text encoding specified in argument (thanks to @ryohji for the contribution) #20796\n- Fix \"coroutine x.read() was never awaited\" warning from `ContentDecodePolicy` #21318\n- fix type check for `data` input to `azure.core.rest` for python 2.7 users #21341\n- use `charset_normalizer` if `chardet` is not installed to migrate aiohttp 3.8.0 changes.\n\n### Other Changes\n\n- Refactor AzureJSONEncoder (thanks to @Codejune for the contribution) #21028\n\n## 1.19.0 (2021-09-30)\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse` are now abstract base classes. They should not be initialized directly, instead\nyour transport responses should inherit from them and implement them.\n- The properties of the `azure.core.rest` responses are now all read-only\n\n- HttpLoggingPolicy integrates logs into one record #19925\n\n## 1.18.0 (2021-09-02)\n\n### Features Added\n\n- `azure.core.serialization.AzureJSONEncoder` (introduced in 1.17.0) serializes `datetime.datetime` objects in ISO 8601 format, conforming to RFC 3339's specification. #20190\n- We now use `azure.core.serialization.AzureJSONEncoder` to serialize `json` input to `azure.core.rest.HttpRequest`.\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- The `text` property on `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse` has changed to a method, which also takes\nan `encoding` parameter.\n- Removed `iter_text` and `iter_lines` from `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse`\n\n### Bugs Fixed\n\n- The behaviour of the headers returned in `azure.core.rest` responses now aligns across sync and async. Items can now be checked case-insensitively and without raising an error for format.\n\n## 1.17.0 (2021-08-05)\n\n### Features Added\n\n- Cut hard dependency on requests library\n- Added a `from_json` method which now accepts storage QueueMessage, eventhub's EventData or ServiceBusMessage or simply json bytes to return a `CloudEvent`\n\n### Fixed\n\n- Not override \"x-ms-client-request-id\" if it already exists in the header. #17757\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- `azure.core.rest` will not try to guess the `charset` anymore if it was impossible to extract it from `HttpResponse` analysis. This removes our dependency on `charset`.\n\n## 1.16.0 (2021-07-01)\n\n### Features Added\n\n- Add new ***provisional*** methods `send_request` onto the `azure.core.PipelineClient` and `azure.core.AsyncPipelineClient`. This method takes in\nrequests and sends them through our pipelines.\n- Add new ***provisional*** module `azure.core.rest`. `azure.core.rest` is our new public simple HTTP library in `azure.core` that users will use to create requests, and consume responses.\n- Add new ***provisional*** errors `StreamConsumedError`, `StreamClosedError`, and `ResponseNotReadError` to `azure.core.exceptions`. These errors\nare thrown if you mishandle streamed responses from the provisional `azure.core.rest` module\n\n### Fixed\n\n- Improved error message in the `from_dict` method of `CloudEvent` when a wrong schema is sent.\n\n## 1.15.0 (2021-06-04)\n\n### New Features\n\n- Added `BearerTokenCredentialPolicy.on_challenge` and `.authorize_request` to allow subclasses to optionally handle authentication challenges\n\n### Bug Fixes\n\n- Retry policies don't sleep after operations time out\n- The `from_dict` methhod in the `CloudEvent` can now convert a datetime string to datetime object when microsecond exceeds the python limitation\n\n## 1.14.0 (2021-05-13)\n\n### New Features\n\n- Added `azure.core.credentials.AzureNamedKeyCredential` credential #17548.\n- Added `decompress` parameter for `stream_download` method. If it is set to `False`, will not do decompression upon the stream. #17920\n\n## 1.13.0 (2021-04-02)\n\nAzure core requires Python 2.7 or Python 3.6+ since this release.\n\n### New Features\n\n- Added `azure.core.utils.parse_connection_string` function to parse connection strings across SDKs, with common validation and support for case insensitive keys.\n- Supported adding custom policies #16519\n- Added `~azure.core.tracing.Link` that should be used while passing `Links` to `AbstractSpan`.\n- `AbstractSpan` constructor can now take in additional keyword only args.\n\n### Bug fixes\n\n- Make NetworkTraceLoggingPolicy show the auth token in plain text. #14191\n- Fixed RetryPolicy overriding default connection timeout with an extreme value #17481\n\n## 1.12.0 (2021-03-08)\n\nThis version will be the last version to officially support Python 3.5, future versions will require Python 2.7 or Python 3.6+.\n\n### Features\n\n- Added `azure.core.messaging.CloudEvent` model that follows the cloud event spec.\n- Added `azure.core.serialization.NULL` sentinel value\n- Improve `repr`s for `HttpRequest` and `HttpResponse`s #16972\n\n### Bug Fixes\n\n- Disable retry in stream downloading. (thanks to @jochen-ott-by @hoffmann for the contribution) #16723\n\n## 1.11.0 (2021-02-08)\n\n### Features\n\n- Added `CaseInsensitiveEnumMeta` class for case-insensitive enums. #16316\n- Add `raise_for_status` method onto `HttpResponse`. Calling `response.raise_for_status()` on a response with an error code\nwill raise an `HttpResponseError`. Calling it on a good response will do nothing #16399\n\n### Bug Fixes\n\n- Update conn.conn_kw rather than overriding it when setting block size. (thanks for @jiasli for the contribution) #16587\n\n## 1.10.0 (2021-01-11)\n\n### Features\n\n- Added `AzureSasCredential` and its respective policy. #15946\n\n## 1.9.0 (2020-11-09)\n\n### Features\n\n- Add a `continuation_token` attribute to the base `AzureError` exception, and set this value for errors raised\n during paged or long-running operations.\n\n### Bug Fixes\n\n- Set retry_interval to 1 second instead of 1000 seconds (thanks **vbarbaresi** for contributing) #14357\n\n\n## 1.8.2 (2020-10-05)\n\n### Bug Fixes\n\n- Fixed bug to allow polling in the case of parameterized endpoints with relative polling urls #14097\n\n\n## 1.8.1 (2020-09-08)\n\n### Bug fixes\n\n- SAS credential replicated \"/\" fix #13159\n\n## 1.8.0 (2020-08-10)\n\n### Features\n\n- Support params as list for exploding parameters #12410\n\n\n## 1.7.0 (2020-07-06)\n\n### Bug fixes\n\n- `AzureKeyCredentialPolicy` will now accept (and ignore) passed in kwargs #11963\n- Better error messages if passed endpoint is incorrect #12106\n- Do not JSON encore a string if content type is \"text\" #12137\n\n### Features\n\n- Added `http_logging_policy` property on the `Configuration` object, allowing users to individually\nset the http logging policy of the config #12218\n\n## 1.6.0 (2020-06-03)\n\n### Bug fixes\n\n- Fixed deadlocks in AsyncBearerTokenCredentialPolicy #11543\n- Fix AttributeException in StreamDownloadGenerator #11462\n\n### Features\n\n- Added support for changesets as part of multipart message support #10485\n- Add AsyncLROPoller in azure.core.polling #10801\n- Add get_continuation_token/from_continuation_token/polling_method methods in pollers (sync and async) #10801\n- HttpResponse and PipelineContext objects are now pickable #10801\n\n## 1.5.0 (2020-05-04)\n\n### Features\n\n- Support \"x-ms-retry-after-ms\" in response header #10743\n- `link` and `link_from_headers` now accepts attributes #10765\n\n### Bug fixes\n\n- Not retry if the status code is less than 400 #10778\n- \"x-ms-request-id\" is not considered safe header for logging #10967\n\n## 1.4.0 (2020-04-06)\n\n### Features\n\n- Support a default error type in map_error #9773\n- Added `AzureKeyCredential` and its respective policy. #10509\n- Added `azure.core.polling.base_polling` module with a \"Microsoft One API\" polling implementation #10090\n Also contains the async version in `azure.core.polling.async_base_polling`\n- Support kwarg `enforce_https` to disable HTTPS check on authentication #9821\n- Support additional kwargs in `HttpRequest.set_multipart_mixed` that will be passed into pipeline context.\n\n## 1.3.0 (2020-03-09)\n\n### Bug fixes\n\n- Appended RequestIdPolicy to the default pipeline #9841\n- Rewind the body position in async_retry #10117\n\n### Features\n\n- Add raw_request_hook support in custom_hook_policy #9958\n- Add timeout support in retry_policy #10011\n- Add OdataV4 error format auto-parsing in all exceptions ('error' attribute) #9738\n\n## 1.2.2 (2020-02-10)\n\n### Bug fixes\n\n- Fixed a bug that sends None as request_id #9545\n- Enable mypy for customers #9572\n- Handle TypeError in deep copy #9620\n- Fix text/plain content-type in decoder #9589\n\n## 1.2.1 (2020-01-14)\n\n### Bug fixes\n\n- Fixed a regression in 1.2.0 that was incompatible with azure-keyvault-* 4.0.0\n[#9462](https://github.com/Azure/azure-sdk-for-python/issues/9462)\n\n\n## 1.2.0 (2020-01-14)\n\n### Features\n\n- Add user_agent & sdk_moniker kwargs in UserAgentPolicy init #9355\n- Support OPTIONS HTTP verb #9322\n- Add tracing_attributes to tracing decorator #9297\n- Support auto_request_id in RequestIdPolicy #9163\n- Support fixed retry #6419\n- Support \"retry-after-ms\" in response header #9240\n\n### Bug fixes\n\n- Removed `__enter__` and `__exit__` from async context managers #9313\n\n## 1.1.1 (2019-12-03)\n\n### Bug fixes\n\n- Bearer token authorization requires HTTPS\n- Rewind the body position in retry #8307\n\n## 1.1.0 (2019-11-25)\n\n### Features\n\n- New RequestIdPolicy #8437\n- Enable logging policy in default pipeline #8053\n- Normalize transport timeout. #8000\n Now we have:\n * 'connection_timeout' - a single float in seconds for the connection timeout. Default 5min\n * 'read_timeout' - a single float in seconds for the read timeout. Default 5min\n\n### Bug fixes\n\n- RequestHistory: deepcopy fails if request contains a stream #7732\n- Retry: retry raises error if response does not have http_response #8629\n- Client kwargs are now passed to DistributedTracingPolicy correctly #8051\n- NetworkLoggingPolicy now logs correctly all requests in case of retry #8262\n\n## 1.0.0 (2019-10-29)\n\n### Features\n\n- Tracing: DistributedTracingPolicy now accepts kwargs network_span_namer to change network span name #7773\n- Tracing: Implementation of AbstractSpan can now use the mixin HttpSpanMixin to get HTTP span update automatically #7773\n- Tracing: AbstractSpan contract \"change_context\" introduced #7773\n- Introduce new policy HttpLoggingPolicy #7988\n\n### Bug fixes\n\n- Fix AsyncioRequestsTransport if input stream is an async generator #7743\n- Fix form-data with aiohttp transport #7749\n\n### Breaking changes\n\n- Tracing: AbstractSpan.set_current_span is longer supported. Use change_context instead. #7773\n- azure.core.pipeline.policies.ContentDecodePolicy.deserialize_from_text changed\n\n## 1.0.0b4 (2019-10-07)\n\n### Features\n\n- Tracing: network span context is available with the TRACING_CONTEXT in pipeline response #7252\n- Tracing: Span contract now has `kind`, `traceparent` and is a context manager #7252\n- SansIOHTTPPolicy methods can now be coroutines #7497\n- Add multipart/mixed support #7083:\n\n - HttpRequest now has a \"set_multipart_mixed\" method to set the parts of this request\n - HttpRequest now has a \"prepare_multipart_body\" method to build final body.\n - HttpResponse now has a \"parts\" method to return an iterator of parts\n - AsyncHttpResponse now has a \"parts\" methods to return an async iterator of parts\n - Note that multipart/mixed is a Python 3.x only feature\n\n### Bug fixes\n\n- Tracing: policy cannot fail the pipeline, even in the worst condition #7252\n- Tracing: policy pass correctly status message if exception #7252\n- Tracing: incorrect span if exception raised from decorated function #7133\n- Fixed urllib3 ConnectTimeoutError being raised by Requests during a socket timeout. Now this exception is caught and wrapped as a `ServiceRequestError` #7542\n\n### Breaking changes\n\n- Tracing: `azure.core.tracing.context` removed\n- Tracing: `azure.core.tracing.context.tracing_context.with_current_context` renamed to `azure.core.tracing.common.with_current_context` #7252\n- Tracing: `link` renamed `link_from_headers` and `link` takes now a string\n- Tracing: opencensus implementation has been moved to the package `azure-core-tracing-opencensus`\n- Some modules and classes that were importables from several different places have been removed:\n\n - `azure.core.HttpResponseError` is now only `azure.core.exceptions.HttpResponseError`\n - `azure.core.Configuration` is now only `azure.core.configuration.Configuration`\n - `azure.core.HttpRequest` is now only `azure.core.pipeline.transport.HttpRequest`\n - `azure.core.version` module has been removed. Use `azure.core.__version__` to get version number.\n - `azure.core.pipeline_client` has been removed. Import from `azure.core` instead.\n - `azure.core.pipeline_client_async` has been removed. Import from `azure.core` instead.\n - `azure.core.pipeline.base` has been removed. Import from `azure.core.pipeline` instead.\n - `azure.core.pipeline.base_async` has been removed. Import from `azure.core.pipeline` instead.\n - `azure.core.pipeline.policies.base` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.base_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.authentication` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.authentication_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.custom_hook` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.redirect` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.redirect_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.retry` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.retry_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.distributed_tracing` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.universal` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.tracing.abstract_span` has been removed. Import from `azure.core.tracing` instead.\n - `azure.core.pipeline.transport.base` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.base_async` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_basic` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_asyncio` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_trio` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.aiohttp` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.polling.poller` has been removed. Import from `azure.core.polling` instead.\n - `azure.core.polling.async_poller` has been removed. Import from `azure.core.polling` instead.\n\n## 1.0.0b3 (2019-09-09)\n\n### Bug fixes\n\n- Fix aiohttp auto-headers #6992\n- Add tracing to policies module init #6951\n\n## 1.0.0b2 (2019-08-05)\n\n### Breaking changes\n\n- Transport classes don't take `config` parameter anymore (use kwargs instead) #6372\n- `azure.core.paging` has been completely refactored #6420\n- HttpResponse.content_type attribute is now a string (was a list) #6490\n- For `StreamDownloadGenerator` subclasses, `response` is now an `HttpResponse`, and not a transport response like `aiohttp.ClientResponse` or `requests.Response`. The transport response is available in `internal_response` attribute #6490\n\n### Bug fixes\n\n- aiohttp is not required to import async pipelines classes #6496\n- `AsyncioRequestsTransport.sleep` is now a coroutine as expected #6490\n- `RequestsTransport` is not tight to `ProxyPolicy` implementation details anymore #6372\n- `AiohttpTransport` does not raise on unexpected kwargs #6355\n\n### Features\n\n- New paging base classes that support `continuation_token` and `by_page()` #6420\n- Proxy support for `AiohttpTransport` #6372\n\n## 1.0.0b1 (2019-06-26)\n\n- Preview 1 release", - "release_date": "2023-07-10T17:07:55", + "description": "Microsoft Azure Core Library for Python\n# Azure Core shared client library for Python\n\nAzure core provides shared exceptions and modules for Python SDK client libraries.\nThese libraries follow the [Azure SDK Design Guidelines for Python](https://azure.github.io/azure-sdk/python/guidelines/index.html) .\n\nIf you are a client library developer, please reference [client library developer reference](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md) for more information.\n\n[Source code](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/) \n| [Package (Pypi)][package]\n| [Package (Conda)](https://anaconda.org/microsoft/azure-core/)\n| [API reference documentation](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/)\n\n## _Disclaimer_\n\n_Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For more information and questions, please refer to _\n\n## Getting started\n\nTypically, you will not need to install azure core;\nit will be installed when you install one of the client libraries using it.\nIn case you want to install it explicitly (to implement your own client library, for example),\nyou can find it [here](https://pypi.org/project/azure-core/).\n\n## Key concepts\n\n### Azure Core Library Exceptions\n\n#### AzureError\n\nAzureError is the base exception for all errors.\n\n```python\nclass AzureError(Exception):\n def __init__(self, message, *args, **kwargs):\n self.inner_exception = kwargs.get(\"error\")\n self.exc_type, self.exc_value, self.exc_traceback = sys.exc_info()\n self.exc_type = self.exc_type.__name__ if self.exc_type else type(self.inner_exception)\n self.exc_msg = \"{}, {}: {}\".format(message, self.exc_type, self.exc_value) # type: ignore\n self.message = str(message)\n self.continuation_token = kwargs.get(\"continuation_token\")\n super(AzureError, self).__init__(self.message, *args)\n```\n\n*message* is any message (str) to be associated with the exception.\n\n*args* are any additional args to be included with exception.\n\n*kwargs* are keyword arguments to include with the exception. Use the keyword *error* to pass in an internal exception and *continuation_token* for a token reference to continue an incomplete operation.\n\n**The following exceptions inherit from AzureError:**\n\n#### ServiceRequestError\n\nAn error occurred while attempt to make a request to the service. No request was sent.\n\n#### ServiceResponseError\n\nThe request was sent, but the client failed to understand the response.\nThe connection may have timed out. These errors can be retried for idempotent or safe operations.\n\n#### HttpResponseError\n\nA request was made, and a non-success status code was received from the service.\n\n```python\nclass HttpResponseError(AzureError):\n def __init__(self, message=None, response=None, **kwargs):\n self.reason = None\n self.response = response\n if response:\n self.reason = response.reason\n self.status_code = response.status_code\n self.error = self._parse_odata_body(ODataV4Format, response) # type: Optional[ODataV4Format]\n if self.error:\n message = str(self.error)\n else:\n message = message or \"Operation returned an invalid status '{}'\".format(\n self.reason\n )\n\n super(HttpResponseError, self).__init__(message=message, **kwargs)\n```\n\n*message* is the HTTP response error message (optional)\n\n*response* is the HTTP response (optional).\n\n*kwargs* are keyword arguments to include with the exception.\n\n**The following exceptions inherit from HttpResponseError:**\n\n#### DecodeError\n\nAn error raised during response de-serialization.\n\n#### IncompleteReadError\n\nAn error raised if peer closes the connection before we have received the complete message body.\n\n#### ResourceExistsError\n\nAn error response with status code 4xx. This will not be raised directly by the Azure core pipeline.\n\n#### ResourceNotFoundError\n\nAn error response, typically triggered by a 412 response (for update) or 404 (for get/post).\n\n#### ResourceModifiedError\n\nAn error response with status code 4xx, typically 412 Conflict. This will not be raised directly by the Azure core pipeline.\n\n#### ResourceNotModifiedError\n\nAn error response with status code 304. This will not be raised directly by the Azure core pipeline.\n\n#### ClientAuthenticationError\n\nAn error response with status code 4xx. This will not be raised directly by the Azure core pipeline.\n\n#### TooManyRedirectsError\n\nAn error raised when the maximum number of redirect attempts is reached. The maximum amount of redirects can be configured in the RedirectPolicy.\n\n```python\nclass TooManyRedirectsError(HttpResponseError):\n def __init__(self, history, *args, **kwargs):\n self.history = history\n message = \"Reached maximum redirect attempts.\"\n super(TooManyRedirectsError, self).__init__(message, *args, **kwargs)\n```\n\n*history* is used to document the requests/responses that resulted in redirected requests.\n\n*args* are any additional args to be included with exception.\n\n*kwargs* are keyword arguments to include with the exception.\n\n#### StreamConsumedError\n\nAn error thrown if you try to access the stream of `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` once\nthe response stream has been consumed.\n\n#### StreamClosedError\n\nAn error thrown if you try to access the stream of the `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` once\nthe response stream has been closed.\n\n#### ResponseNotReadError\n\nAn error thrown if you try to access the `content` of `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` before\nreading in the response's bytes first.\n\n### Configurations\n\nWhen calling the methods, some properties can be configured by passing in as kwargs arguments.\n\n| Parameters | Description |\n| --- | --- |\n| headers | The HTTP Request headers. |\n| request_id | The request id to be added into header. |\n| user_agent | If specified, this will be added in front of the user agent string. |\n| logging_enable| Use to enable per operation. Defaults to `False`. |\n| logger | If specified, it will be used to log information. |\n| response_encoding | The encoding to use if known for this service (will disable auto-detection). |\n| proxies | Maps protocol or protocol and hostname to the URL of the proxy. |\n| raw_request_hook | Callback function. Will be invoked on request. |\n| raw_response_hook | Callback function. Will be invoked on response. |\n| network_span_namer | A callable to customize the span name. |\n| tracing_attributes | Attributes to set on all created spans. |\n| permit_redirects | Whether the client allows redirects. Defaults to `True`. |\n| redirect_max | The maximum allowed redirects. Defaults to `30`. |\n| retry_total | Total number of retries to allow. Takes precedence over other counts. Default value is `10`. |\n| retry_connect | How many connection-related errors to retry on. These are errors raised before the request is sent to the remote server, which we assume has not triggered the server to process the request. Default value is `3`. |\n| retry_read | How many times to retry on read errors. These errors are raised after the request was sent to the server, so the request may have side-effects. Default value is `3`. |\n| retry_status | How many times to retry on bad status codes. Default value is `3`. |\n| retry_backoff_factor | A backoff factor to apply between attempts after the second try (most errors are resolved immediately by a second try without a delay). Retry policy will sleep for: `{backoff factor} * (2 ** ({number of total retries} - 1))` seconds. If the backoff_factor is 0.1, then the retry will sleep for [0.0s, 0.2s, 0.4s, ...] between retries. The default value is `0.8`. |\n| retry_backoff_max | The maximum back off time. Default value is `120` seconds (2 minutes). |\n| retry_mode | Fixed or exponential delay between attempts, default is `Exponential`. |\n| timeout | Timeout setting for the operation in seconds, default is `604800`s (7 days). |\n| connection_timeout | A single float in seconds for the connection timeout. Defaults to `300` seconds. |\n| read_timeout | A single float in seconds for the read timeout. Defaults to `300` seconds. |\n| connection_verify | SSL certificate verification. Enabled by default. Set to False to disable, alternatively can be set to the path to a CA_BUNDLE file or directory with certificates of trusted CAs. |\n| connection_cert | Client-side certificates. You can specify a local cert to use as client side certificate, as a single file (containing the private key and the certificate) or as a tuple of both files' paths. |\n| proxies | Dictionary mapping protocol or protocol and hostname to the URL of the proxy. |\n| cookies | Dict or CookieJar object to send with the `Request`. |\n| connection_data_block_size | The block size of data sent over the connection. Defaults to `4096` bytes. |\n\n### Async transport\n\nThe async transport is designed to be opt-in. [AioHttp](https://pypi.org/project/aiohttp/) is one of the supported implementations of async transport. It is not installed by default. You need to install it separately.\n\n### Shared modules\n\n#### MatchConditions\n\nMatchConditions is an enum to describe match conditions.\n\n```python\nclass MatchConditions(Enum):\n Unconditionally = 1 # Matches any condition\n IfNotModified = 2 # If the target object is not modified. Usually it maps to etag=\n IfModified = 3 # Only if the target object is modified. Usually it maps to etag!=\n IfPresent = 4 # If the target object exists. Usually it maps to etag='*'\n IfMissing = 5 # If the target object does not exist. Usually it maps to etag!='*'\n```\n\n#### CaseInsensitiveEnumMeta\n\nA metaclass to support case-insensitive enums.\n\n```python\nfrom enum import Enum\n\nfrom azure.core import CaseInsensitiveEnumMeta\n\nclass MyCustomEnum(str, Enum, metaclass=CaseInsensitiveEnumMeta):\n FOO = 'foo'\n BAR = 'bar'\n```\n\n#### Null Sentinel Value\n\nA falsy sentinel object which is supposed to be used to specify attributes\nwith no data. This gets serialized to `null` on the wire.\n\n```python\nfrom azure.core.serialization import NULL\n\nassert bool(NULL) is False\n\nfoo = Foo(\n attr=NULL\n)\n```\n\n## Contributing\n\nThis project welcomes contributions and suggestions. Most contributions require\nyou to agree to a Contributor License Agreement (CLA) declaring that you have\nthe right to, and actually do, grant us the rights to use your contribution.\nFor details, visit [https://cla.microsoft.com](https://cla.microsoft.com).\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether\nyou need to provide a CLA and decorate the PR appropriately (e.g., label,\ncomment). Simply follow the instructions provided by the bot. You will only\nneed to do this once across all repos using our CLA.\n\nThis project has adopted the\n[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).\nFor more information, see the\n[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)\nor contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any\nadditional questions or comments.\n\n\n[package]: https://pypi.org/project/azure-core/\n\n\n# Release History\n\n## 1.29.4 (2023-09-07)\n\n### Bugs Fixed\n\n- Fixed the issue that some urls trigger an infinite loop. #31346\n- Fixed issue where IndexError was raised if multipart responses did not match the number of requests. #31471\n- Fixed issue unbound variable exception if dict is invalid in CloudEvent.from_dict. #31835\n- Fixed issue asyncBearerTokenCredentialPolicy is not backward compatible with SansIOHTTPPolicy. #31836\n- Fixed issue mypy complains with new version of azure-core. #31564\n\n## 1.29.3 (2023-08-22)\n\n### Bugs Fixed\n\n- Typing fix: `message` cannot be `None` in `AzureError`. #31564\n\n## 1.29.2 (2023-08-14)\n\n### Bugs Fixed\n\n- Added a default implementation for `AsyncTokenCredential.__aexit__()` #31573\n\n### Other Changes\n\n- Bumped `typing-extensions` version to 4.6.0.\n\n## 1.29.1 (2023-08-09)\n\n### Bugs Fixed\n\n- Not pass `enabled_cae` unless it is explicitly enabled.\n\n## 1.29.0 (2023-08-03)\n\n### Features Added\n\n- A keyword argument `enable_cae` was added to the `get_token` method of the `TokenCredential` protocol. #31012\n- `BearerTokenCredentialPolicy` and `AsyncBearerTokenCredentialPolicy` now accept `enable_cae` keyword arguments in their constructors. This is used in determining if [Continuous Access Evaluation (CAE)](https://learn.microsoft.com/azure/active-directory/conditional-access/concept-continuous-access-evaluation) should be enabled for each `get_token` request. #31012\n\n## 1.28.0 (2023-07-06)\n\n### Features Added\n\n- Added header name parameter to `RequestIdPolicy`. #30772\n- Added `SensitiveHeaderCleanupPolicy` that cleans up sensitive headers if a redirect happens and the new destination is in another domain. #28349\n\n### Other Changes\n\n- Catch aiohttp errors and translate them into azure-core errors.\n\n## 1.27.1 (2023-06-13)\n\n### Bugs Fixed\n\n- Fix url building for some complex query parameters scenarios #30707\n\n## 1.27.0 (2023-06-01)\n\n### Features Added\n\n- Added support to use sync credentials in `AsyncBearerTokenCredentialPolicy`. #30381\n- Added \"prefix\" parameter to AzureKeyCredentialPolicy #29901\n\n### Bugs Fixed\n\n- Improve error message when providing the wrong credential type for AzureKeyCredential #30380\n\n## 1.26.4 (2023-04-06)\n\n### Features Added\n\n- Updated settings to include OpenTelemetry as a tracer provider. #29095\n\n### Other Changes\n\n- Improved typing\n\n## 1.26.3 (2023-02-02)\n\n### Bugs Fixed\n\n- Fixed deflate decompression for aiohttp #28483\n\n## 1.26.2 (2023-01-05)\n\n### Bugs Fixed\n\n- Fix 'ClientSession' object has no attribute 'auto_decompress' (thanks to @mghextreme for the contribution)\n\n### Other Changes\n\n- Add \"x-ms-error-code\" as secure header to log\n- Rename \"DEFAULT_HEADERS_WHITELIST\" to \"DEFAULT_HEADERS_ALLOWLIST\". Added a backward compatible alias.\n\n## 1.26.1 (2022-11-03)\n\n### Other Changes\n\n- Added example of RequestsTransport with custom session. (thanks to @inirudebwoy for the contribution) #26768\n- Added Python 3.11 support.\n\n## 1.26.0 (2022-10-06)\n\n### Other Changes\n\n- LRO polling will not wait anymore before doing the first status check #26376\n- Added extra dependency for [aio]. pip install azure-core[aio] installs aiohttp too.\n\n## 1.25.1 (2022-09-01)\n\n### Bugs Fixed\n\n- Added @runtime_checkable to `TokenCredential` protocol definitions #25187\n\n## 1.25.0 (2022-08-04)\n\nAzure-core is supported on Python 3.7 or later. For more details, please read our page on [Azure SDK for Python version support policy](https://github.com/Azure/azure-sdk-for-python/wiki/Azure-SDKs-Python-version-support-policy).\n\n### Features Added\n\n- Added `CaseInsensitiveDict` implementation in `azure.core.utils` removing dependency on `requests` and `aiohttp`\n\n## 1.24.2 (2022-06-30)\n\n### Bugs Fixed\n\n- Fixed the bug that azure-core could not be imported under Python 3.11.0b3 #24928\n- `ContentDecodePolicy` can now correctly deserialize more JSON bodies with different mime types #22410\n\n## 1.24.1 (2022-06-01)\n\n### Bugs Fixed\n\n- Declare method level span as INTERNAL by default #24492\n- Fixed type hints for `azure.core.paging.ItemPaged` #24548\n\n## 1.24.0 (2022-05-06)\n\n### Features Added\n\n- Add `SerializationError` and `DeserializationError` in `azure.core.exceptions` for errors raised during serialization / deserialization #24312\n\n## 1.23.1 (2022-03-31)\n\n### Bugs Fixed\n\n- Allow stream inputs to the `content` kwarg of `azure.core.rest.HttpRequest` from objects with a `read` method #23578\n\n## 1.23.0 (2022-03-03)\n\n### Features Added\n\n- Improve intellisense type hinting for service client methods. #22891\n\n- Add a case insensitive dict `case_insensitive_dict` in `azure.core.utils`. #23206\n\n### Bugs Fixed\n\n- Use \"\\n\" rather than \"/n\" for new line in log. #23261\n\n### Other Changes\n\n- Log \"WWW-Authenticate\" header in `HttpLoggingPolicy` #22990\n- Added dependency on `typing-extensions` >= 4.0.1\n\n## 1.22.1 (2022-02-09)\n\n### Bugs Fixed\n\n- Limiting `final-state-via` scope to POST until consuming SDKs has been fixed to use this option properly on PUT. #22989\n\n## 1.22.0 (2022-02-03)\n_[**This version is deprecated.**]_\n\n### Features Added\n\n- Add support for `final-state-via` LRO option in core. #22713\n\n### Bugs Fixed\n\n- Add response body to string representation of `HttpResponseError` if we're not able to parse out information #22302\n- Raise `AttributeError` when calling azure.core.pipeline.transport.\\_\\_bases__ #22469\n\n### Other Changes\n\n- Python 2.7 is no longer supported. Please use Python version 3.6 or later.\n\n## 1.21.1 (2021-12-06)\n\n### Other Changes\n\n- Revert change in str method #22023\n\n## 1.21.0 (2021-12-02)\n\n### Breaking Changes\n\n- Sync stream downloading now raises `azure.core.exceptions.DecodeError` rather than `requests.exceptions.ContentDecodingError`\n\n### Bugs Fixed\n\n- Add response body to string representation of `HttpResponseError` if we're not able to parse out information #21800\n\n## 1.20.1 (2021-11-08)\n\n### Bugs Fixed\n\n- Correctly set response's content to decompressed body when users are using aiohttp transport with decompression headers #21620\n\n## 1.20.0 (2021-11-04)\n\n### Features Added\n\n- GA `send_request` onto the `azure.core.PipelineClient` and `azure.core.AsyncPipelineClient`. This method takes in\nrequests and sends them through our pipelines.\n- GA `azure.core.rest`. `azure.core.rest` is our new public simple HTTP library in `azure.core` that users will use to create requests, and consume responses.\n- GA errors `StreamConsumedError`, `StreamClosedError`, and `ResponseNotReadError` to `azure.core.exceptions`. These errors\nare thrown if you mishandle streamed responses from the `azure.core.rest` module\n- add kwargs to the methods for `iter_raw` and `iter_bytes` #21529\n- no longer raise JSON errors if users pass in file descriptors of JSON to the `json` kwarg in `HttpRequest` #21504\n- Added new error type `IncompleteReadError` which is raised if peer closes the connection before we have received the complete message body.\n\n### Breaking Changes\n\n- SansIOHTTPPolicy.on_exception returns None instead of bool.\n\n### Bugs Fixed\n\n- The `Content-Length` header in a http response is strictly checked against the actual number of bytes in the body,\n rather than silently truncating data in case the underlying tcp connection is closed prematurely.\n (thanks to @jochen-ott-by for the contribution) #20412\n- UnboundLocalError when SansIOHTTPPolicy handles an exception #15222\n- Add default content type header of `text/plain` and content length header for users who pass unicode strings to the `content` kwarg of `HttpRequest` in 2.7 #21550\n\n## 1.19.1 (2021-11-01)\n\n### Bugs Fixed\n\n- respect text encoding specified in argument (thanks to @ryohji for the contribution) #20796\n- Fix \"coroutine x.read() was never awaited\" warning from `ContentDecodePolicy` #21318\n- fix type check for `data` input to `azure.core.rest` for python 2.7 users #21341\n- use `charset_normalizer` if `chardet` is not installed to migrate aiohttp 3.8.0 changes.\n\n### Other Changes\n\n- Refactor AzureJSONEncoder (thanks to @Codejune for the contribution) #21028\n\n## 1.19.0 (2021-09-30)\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse` are now abstract base classes. They should not be initialized directly, instead\nyour transport responses should inherit from them and implement them.\n- The properties of the `azure.core.rest` responses are now all read-only\n\n- HttpLoggingPolicy integrates logs into one record #19925\n\n## 1.18.0 (2021-09-02)\n\n### Features Added\n\n- `azure.core.serialization.AzureJSONEncoder` (introduced in 1.17.0) serializes `datetime.datetime` objects in ISO 8601 format, conforming to RFC 3339's specification. #20190\n- We now use `azure.core.serialization.AzureJSONEncoder` to serialize `json` input to `azure.core.rest.HttpRequest`.\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- The `text` property on `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse` has changed to a method, which also takes\nan `encoding` parameter.\n- Removed `iter_text` and `iter_lines` from `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse`\n\n### Bugs Fixed\n\n- The behaviour of the headers returned in `azure.core.rest` responses now aligns across sync and async. Items can now be checked case-insensitively and without raising an error for format.\n\n## 1.17.0 (2021-08-05)\n\n### Features Added\n\n- Cut hard dependency on requests library\n- Added a `from_json` method which now accepts storage QueueMessage, eventhub's EventData or ServiceBusMessage or simply json bytes to return a `CloudEvent`\n\n### Fixed\n\n- Not override \"x-ms-client-request-id\" if it already exists in the header. #17757\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- `azure.core.rest` will not try to guess the `charset` anymore if it was impossible to extract it from `HttpResponse` analysis. This removes our dependency on `charset`.\n\n## 1.16.0 (2021-07-01)\n\n### Features Added\n\n- Add new ***provisional*** methods `send_request` onto the `azure.core.PipelineClient` and `azure.core.AsyncPipelineClient`. This method takes in\nrequests and sends them through our pipelines.\n- Add new ***provisional*** module `azure.core.rest`. `azure.core.rest` is our new public simple HTTP library in `azure.core` that users will use to create requests, and consume responses.\n- Add new ***provisional*** errors `StreamConsumedError`, `StreamClosedError`, and `ResponseNotReadError` to `azure.core.exceptions`. These errors\nare thrown if you mishandle streamed responses from the provisional `azure.core.rest` module\n\n### Fixed\n\n- Improved error message in the `from_dict` method of `CloudEvent` when a wrong schema is sent.\n\n## 1.15.0 (2021-06-04)\n\n### New Features\n\n- Added `BearerTokenCredentialPolicy.on_challenge` and `.authorize_request` to allow subclasses to optionally handle authentication challenges\n\n### Bug Fixes\n\n- Retry policies don't sleep after operations time out\n- The `from_dict` methhod in the `CloudEvent` can now convert a datetime string to datetime object when microsecond exceeds the python limitation\n\n## 1.14.0 (2021-05-13)\n\n### New Features\n\n- Added `azure.core.credentials.AzureNamedKeyCredential` credential #17548.\n- Added `decompress` parameter for `stream_download` method. If it is set to `False`, will not do decompression upon the stream. #17920\n\n## 1.13.0 (2021-04-02)\n\nAzure core requires Python 2.7 or Python 3.6+ since this release.\n\n### New Features\n\n- Added `azure.core.utils.parse_connection_string` function to parse connection strings across SDKs, with common validation and support for case insensitive keys.\n- Supported adding custom policies #16519\n- Added `~azure.core.tracing.Link` that should be used while passing `Links` to `AbstractSpan`.\n- `AbstractSpan` constructor can now take in additional keyword only args.\n\n### Bug fixes\n\n- Make NetworkTraceLoggingPolicy show the auth token in plain text. #14191\n- Fixed RetryPolicy overriding default connection timeout with an extreme value #17481\n\n## 1.12.0 (2021-03-08)\n\nThis version will be the last version to officially support Python 3.5, future versions will require Python 2.7 or Python 3.6+.\n\n### Features\n\n- Added `azure.core.messaging.CloudEvent` model that follows the cloud event spec.\n- Added `azure.core.serialization.NULL` sentinel value\n- Improve `repr`s for `HttpRequest` and `HttpResponse`s #16972\n\n### Bug Fixes\n\n- Disable retry in stream downloading. (thanks to @jochen-ott-by @hoffmann for the contribution) #16723\n\n## 1.11.0 (2021-02-08)\n\n### Features\n\n- Added `CaseInsensitiveEnumMeta` class for case-insensitive enums. #16316\n- Add `raise_for_status` method onto `HttpResponse`. Calling `response.raise_for_status()` on a response with an error code\nwill raise an `HttpResponseError`. Calling it on a good response will do nothing #16399\n\n### Bug Fixes\n\n- Update conn.conn_kw rather than overriding it when setting block size. (thanks for @jiasli for the contribution) #16587\n\n## 1.10.0 (2021-01-11)\n\n### Features\n\n- Added `AzureSasCredential` and its respective policy. #15946\n\n## 1.9.0 (2020-11-09)\n\n### Features\n\n- Add a `continuation_token` attribute to the base `AzureError` exception, and set this value for errors raised\n during paged or long-running operations.\n\n### Bug Fixes\n\n- Set retry_interval to 1 second instead of 1000 seconds (thanks **vbarbaresi** for contributing) #14357\n\n\n## 1.8.2 (2020-10-05)\n\n### Bug Fixes\n\n- Fixed bug to allow polling in the case of parameterized endpoints with relative polling urls #14097\n\n\n## 1.8.1 (2020-09-08)\n\n### Bug fixes\n\n- SAS credential replicated \"/\" fix #13159\n\n## 1.8.0 (2020-08-10)\n\n### Features\n\n- Support params as list for exploding parameters #12410\n\n\n## 1.7.0 (2020-07-06)\n\n### Bug fixes\n\n- `AzureKeyCredentialPolicy` will now accept (and ignore) passed in kwargs #11963\n- Better error messages if passed endpoint is incorrect #12106\n- Do not JSON encore a string if content type is \"text\" #12137\n\n### Features\n\n- Added `http_logging_policy` property on the `Configuration` object, allowing users to individually\nset the http logging policy of the config #12218\n\n## 1.6.0 (2020-06-03)\n\n### Bug fixes\n\n- Fixed deadlocks in AsyncBearerTokenCredentialPolicy #11543\n- Fix AttributeException in StreamDownloadGenerator #11462\n\n### Features\n\n- Added support for changesets as part of multipart message support #10485\n- Add AsyncLROPoller in azure.core.polling #10801\n- Add get_continuation_token/from_continuation_token/polling_method methods in pollers (sync and async) #10801\n- HttpResponse and PipelineContext objects are now pickable #10801\n\n## 1.5.0 (2020-05-04)\n\n### Features\n\n- Support \"x-ms-retry-after-ms\" in response header #10743\n- `link` and `link_from_headers` now accepts attributes #10765\n\n### Bug fixes\n\n- Not retry if the status code is less than 400 #10778\n- \"x-ms-request-id\" is not considered safe header for logging #10967\n\n## 1.4.0 (2020-04-06)\n\n### Features\n\n- Support a default error type in map_error #9773\n- Added `AzureKeyCredential` and its respective policy. #10509\n- Added `azure.core.polling.base_polling` module with a \"Microsoft One API\" polling implementation #10090\n Also contains the async version in `azure.core.polling.async_base_polling`\n- Support kwarg `enforce_https` to disable HTTPS check on authentication #9821\n- Support additional kwargs in `HttpRequest.set_multipart_mixed` that will be passed into pipeline context.\n\n## 1.3.0 (2020-03-09)\n\n### Bug fixes\n\n- Appended RequestIdPolicy to the default pipeline #9841\n- Rewind the body position in async_retry #10117\n\n### Features\n\n- Add raw_request_hook support in custom_hook_policy #9958\n- Add timeout support in retry_policy #10011\n- Add OdataV4 error format auto-parsing in all exceptions ('error' attribute) #9738\n\n## 1.2.2 (2020-02-10)\n\n### Bug fixes\n\n- Fixed a bug that sends None as request_id #9545\n- Enable mypy for customers #9572\n- Handle TypeError in deep copy #9620\n- Fix text/plain content-type in decoder #9589\n\n## 1.2.1 (2020-01-14)\n\n### Bug fixes\n\n- Fixed a regression in 1.2.0 that was incompatible with azure-keyvault-* 4.0.0\n[#9462](https://github.com/Azure/azure-sdk-for-python/issues/9462)\n\n\n## 1.2.0 (2020-01-14)\n\n### Features\n\n- Add user_agent & sdk_moniker kwargs in UserAgentPolicy init #9355\n- Support OPTIONS HTTP verb #9322\n- Add tracing_attributes to tracing decorator #9297\n- Support auto_request_id in RequestIdPolicy #9163\n- Support fixed retry #6419\n- Support \"retry-after-ms\" in response header #9240\n\n### Bug fixes\n\n- Removed `__enter__` and `__exit__` from async context managers #9313\n\n## 1.1.1 (2019-12-03)\n\n### Bug fixes\n\n- Bearer token authorization requires HTTPS\n- Rewind the body position in retry #8307\n\n## 1.1.0 (2019-11-25)\n\n### Features\n\n- New RequestIdPolicy #8437\n- Enable logging policy in default pipeline #8053\n- Normalize transport timeout. #8000\n Now we have:\n * 'connection_timeout' - a single float in seconds for the connection timeout. Default 5min\n * 'read_timeout' - a single float in seconds for the read timeout. Default 5min\n\n### Bug fixes\n\n- RequestHistory: deepcopy fails if request contains a stream #7732\n- Retry: retry raises error if response does not have http_response #8629\n- Client kwargs are now passed to DistributedTracingPolicy correctly #8051\n- NetworkLoggingPolicy now logs correctly all requests in case of retry #8262\n\n## 1.0.0 (2019-10-29)\n\n### Features\n\n- Tracing: DistributedTracingPolicy now accepts kwargs network_span_namer to change network span name #7773\n- Tracing: Implementation of AbstractSpan can now use the mixin HttpSpanMixin to get HTTP span update automatically #7773\n- Tracing: AbstractSpan contract \"change_context\" introduced #7773\n- Introduce new policy HttpLoggingPolicy #7988\n\n### Bug fixes\n\n- Fix AsyncioRequestsTransport if input stream is an async generator #7743\n- Fix form-data with aiohttp transport #7749\n\n### Breaking changes\n\n- Tracing: AbstractSpan.set_current_span is longer supported. Use change_context instead. #7773\n- azure.core.pipeline.policies.ContentDecodePolicy.deserialize_from_text changed\n\n## 1.0.0b4 (2019-10-07)\n\n### Features\n\n- Tracing: network span context is available with the TRACING_CONTEXT in pipeline response #7252\n- Tracing: Span contract now has `kind`, `traceparent` and is a context manager #7252\n- SansIOHTTPPolicy methods can now be coroutines #7497\n- Add multipart/mixed support #7083:\n\n - HttpRequest now has a \"set_multipart_mixed\" method to set the parts of this request\n - HttpRequest now has a \"prepare_multipart_body\" method to build final body.\n - HttpResponse now has a \"parts\" method to return an iterator of parts\n - AsyncHttpResponse now has a \"parts\" methods to return an async iterator of parts\n - Note that multipart/mixed is a Python 3.x only feature\n\n### Bug fixes\n\n- Tracing: policy cannot fail the pipeline, even in the worst condition #7252\n- Tracing: policy pass correctly status message if exception #7252\n- Tracing: incorrect span if exception raised from decorated function #7133\n- Fixed urllib3 ConnectTimeoutError being raised by Requests during a socket timeout. Now this exception is caught and wrapped as a `ServiceRequestError` #7542\n\n### Breaking changes\n\n- Tracing: `azure.core.tracing.context` removed\n- Tracing: `azure.core.tracing.context.tracing_context.with_current_context` renamed to `azure.core.tracing.common.with_current_context` #7252\n- Tracing: `link` renamed `link_from_headers` and `link` takes now a string\n- Tracing: opencensus implementation has been moved to the package `azure-core-tracing-opencensus`\n- Some modules and classes that were importables from several different places have been removed:\n\n - `azure.core.HttpResponseError` is now only `azure.core.exceptions.HttpResponseError`\n - `azure.core.Configuration` is now only `azure.core.configuration.Configuration`\n - `azure.core.HttpRequest` is now only `azure.core.pipeline.transport.HttpRequest`\n - `azure.core.version` module has been removed. Use `azure.core.__version__` to get version number.\n - `azure.core.pipeline_client` has been removed. Import from `azure.core` instead.\n - `azure.core.pipeline_client_async` has been removed. Import from `azure.core` instead.\n - `azure.core.pipeline.base` has been removed. Import from `azure.core.pipeline` instead.\n - `azure.core.pipeline.base_async` has been removed. Import from `azure.core.pipeline` instead.\n - `azure.core.pipeline.policies.base` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.base_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.authentication` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.authentication_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.custom_hook` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.redirect` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.redirect_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.retry` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.retry_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.distributed_tracing` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.universal` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.tracing.abstract_span` has been removed. Import from `azure.core.tracing` instead.\n - `azure.core.pipeline.transport.base` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.base_async` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_basic` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_asyncio` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_trio` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.aiohttp` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.polling.poller` has been removed. Import from `azure.core.polling` instead.\n - `azure.core.polling.async_poller` has been removed. Import from `azure.core.polling` instead.\n\n## 1.0.0b3 (2019-09-09)\n\n### Bug fixes\n\n- Fix aiohttp auto-headers #6992\n- Add tracing to policies module init #6951\n\n## 1.0.0b2 (2019-08-05)\n\n### Breaking changes\n\n- Transport classes don't take `config` parameter anymore (use kwargs instead) #6372\n- `azure.core.paging` has been completely refactored #6420\n- HttpResponse.content_type attribute is now a string (was a list) #6490\n- For `StreamDownloadGenerator` subclasses, `response` is now an `HttpResponse`, and not a transport response like `aiohttp.ClientResponse` or `requests.Response`. The transport response is available in `internal_response` attribute #6490\n\n### Bug fixes\n\n- aiohttp is not required to import async pipelines classes #6496\n- `AsyncioRequestsTransport.sleep` is now a coroutine as expected #6490\n- `RequestsTransport` is not tight to `ProxyPolicy` implementation details anymore #6372\n- `AiohttpTransport` does not raise on unexpected kwargs #6355\n\n### Features\n\n- New paging base classes that support `continuation_token` and `by_page()` #6420\n- Proxy support for `AiohttpTransport` #6372\n\n## 1.0.0b1 (2019-06-26)\n\n- Preview 1 release", + "release_date": "2023-09-07T19:49:14", "parties": [ { "type": "person", @@ -202,6 +204,8 @@ } ], "keywords": [ + "azure", + "azure sdk", "Development Status :: 5 - Production/Stable", "Programming Language :: Python", "Programming Language :: Python :: 3", @@ -213,11 +217,11 @@ "Programming Language :: Python :: 3.9" ], "homepage_url": "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/core/azure-core", - "download_url": "https://files.pythonhosted.org/packages/fd/51/0ee0a2844712f54117b3ee4853c3d209ba37641f0c587be22a993990989e/azure-core-1.28.0.zip", - "size": 384884, + "download_url": "https://files.pythonhosted.org/packages/fa/19/43a9eb812b4d6071fdc2c55640318f7eb5a1be8dbd3b6f9d96a1996e1bb6/azure-core-1.29.4.tar.gz", + "size": 260048, "sha1": null, - "md5": "f0835c198395cb5b003f988321a7c65e", - "sha256": "e9eefc66fc1fde56dab6f04d4e5d12c60754d5a9fa49bdcfd8534fc96ed936bd", + "md5": "47c5d08ce031660683f5986ab31d5bf6", + "sha256": "500b3aa9bf2e90c5ccc88bb105d056114ca0ce7d0ce73afb8bc4d714b2fc7568", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -237,9 +241,9 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/azure-core/1.28.0/json", + "api_data_url": "https://pypi.org/pypi/azure-core/1.29.4/json", "datasource_id": null, - "purl": "pkg:pypi/azure-core@1.28.0" + "purl": "pkg:pypi/azure-core@1.29.4" }, { "type": "pypi", @@ -379,12 +383,12 @@ "type": "pypi", "namespace": null, "name": "azure-storage-blob", - "version": "12.17.0", + "version": "12.18.1", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "Microsoft Azure Blob Storage Client Library for Python\n# Azure Storage Blobs client library for Python\nAzure Blob storage is Microsoft's object storage solution for the cloud. Blob storage is optimized for storing massive amounts of unstructured data, such as text or binary data.\n\nBlob storage is ideal for:\n\n* Serving images or documents directly to a browser\n* Storing files for distributed access\n* Streaming video and audio\n* Storing data for backup and restore, disaster recovery, and archiving\n* Storing data for analysis by an on-premises or Azure-hosted service\n\n[Source code](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/azure/storage/blob)\n| [Package (PyPI)](https://pypi.org/project/azure-storage-blob/)\n| [Package (Conda)](https://anaconda.org/microsoft/azure-storage/)\n| [API reference documentation](https://aka.ms/azsdk-python-storage-blob-ref)\n| [Product documentation](https://docs.microsoft.com/azure/storage/)\n| [Samples](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples)\n\n\n## Getting started\n\n### Prerequisites\n* Python 3.7 or later is required to use this package. For more details, please read our page on [Azure SDK for Python version support policy](https://github.com/Azure/azure-sdk-for-python/wiki/Azure-SDKs-Python-version-support-policy).\n* You must have an [Azure subscription](https://azure.microsoft.com/free/) and an\n[Azure storage account](https://docs.microsoft.com/azure/storage/common/storage-account-overview) to use this package.\n\n### Install the package\nInstall the Azure Storage Blobs client library for Python with [pip](https://pypi.org/project/pip/):\n\n```bash\npip install azure-storage-blob\n```\n\n### Create a storage account\nIf you wish to create a new storage account, you can use the\n[Azure Portal](https://docs.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-portal),\n[Azure PowerShell](https://docs.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-powershell),\nor [Azure CLI](https://docs.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-cli):\n\n```bash\n# Create a new resource group to hold the storage account -\n# if using an existing resource group, skip this step\naz group create --name my-resource-group --location westus2\n\n# Create the storage account\naz storage account create -n my-storage-account-name -g my-resource-group\n```\n\n### Create the client\nThe Azure Storage Blobs client library for Python allows you to interact with three types of resources: the storage\naccount itself, blob storage containers, and blobs. Interaction with these resources starts with an instance of a\n[client](#clients). To create a client object, you will need the storage account's blob service account URL and a\ncredential that allows you to access the storage account:\n\n```python\nfrom azure.storage.blob import BlobServiceClient\n\nservice = BlobServiceClient(account_url=\"https://.blob.core.windows.net/\", credential=credential)\n```\n\n#### Looking up the account URL\nYou can find the storage account's blob service URL using the\n[Azure Portal](https://docs.microsoft.com/azure/storage/common/storage-account-overview#storage-account-endpoints),\n[Azure PowerShell](https://docs.microsoft.com/powershell/module/az.storage/get-azstorageaccount),\nor [Azure CLI](https://docs.microsoft.com/cli/azure/storage/account?view=azure-cli-latest#az-storage-account-show):\n\n```bash\n# Get the blob service account url for the storage account\naz storage account show -n my-storage-account-name -g my-resource-group --query \"primaryEndpoints.blob\"\n```\n\n#### Types of credentials\nThe `credential` parameter may be provided in a number of different forms, depending on the type of\n[authorization](https://docs.microsoft.com/azure/storage/common/storage-auth) you wish to use:\n1. To use an [Azure Active Directory (AAD) token credential](https://docs.microsoft.com/azure/storage/common/storage-auth-aad),\n provide an instance of the desired credential type obtained from the\n [azure-identity](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#credentials) library.\n For example, [DefaultAzureCredential](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#defaultazurecredential)\n can be used to authenticate the client.\n\n This requires some initial setup:\n * [Install azure-identity](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#install-the-package)\n * [Register a new AAD application](https://docs.microsoft.com/azure/active-directory/develop/quickstart-register-app) and give permissions to access Azure Storage\n * [Grant access](https://docs.microsoft.com/azure/storage/common/storage-auth-aad-rbac-portal) to Azure Blob data with RBAC in the Azure Portal\n * Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables:\n AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET\n\n Use the returned token credential to authenticate the client:\n ```python\n from azure.identity import DefaultAzureCredential\n from azure.storage.blob import BlobServiceClient\n token_credential = DefaultAzureCredential()\n\n blob_service_client = BlobServiceClient(\n account_url=\"https://.blob.core.windows.net\",\n credential=token_credential\n )\n ```\n\n2. To use a [shared access signature (SAS) token](https://docs.microsoft.com/azure/storage/common/storage-sas-overview),\n provide the token as a string. If your account URL includes the SAS token, omit the credential parameter.\n You can generate a SAS token from the Azure Portal under \"Shared access signature\" or use one of the `generate_sas()`\n functions to create a sas token for the storage account, container, or blob:\n\n ```python\n from datetime import datetime, timedelta\n from azure.storage.blob import BlobServiceClient, generate_account_sas, ResourceTypes, AccountSasPermissions\n\n sas_token = generate_account_sas(\n account_name=\"\",\n account_key=\"\",\n resource_types=ResourceTypes(service=True),\n permission=AccountSasPermissions(read=True),\n expiry=datetime.utcnow() + timedelta(hours=1)\n )\n\n blob_service_client = BlobServiceClient(account_url=\"https://.blob.core.windows.net\", credential=sas_token)\n ```\n\n3. To use a storage account [shared key](https://docs.microsoft.com/rest/api/storageservices/authenticate-with-shared-key/)\n (aka account key or access key), provide the key as a string. This can be found in the Azure Portal under the \"Access Keys\"\n section or by running the following Azure CLI command:\n\n ```az storage account keys list -g MyResourceGroup -n MyStorageAccount```\n\n Use the key as the credential parameter to authenticate the client:\n ```python\n from azure.storage.blob import BlobServiceClient\n service = BlobServiceClient(account_url=\"https://.blob.core.windows.net\", credential=\"\")\n ```\n \n If you are using **customized url** (which means the url is not in this format `.blob.core.windows.net`),\n please instantiate the client using the credential below:\n ```python\n from azure.storage.blob import BlobServiceClient\n service = BlobServiceClient(account_url=\"https://.blob.core.windows.net\", \n credential={\"account_name\": \"\", \"account_key\":\"\"})\n ```\n\n4. To use [anonymous public read access](https://docs.microsoft.com/azure/storage/blobs/storage-manage-access-to-resources),\n simply omit the credential parameter.\n\n#### Creating the client from a connection string\nDepending on your use case and authorization method, you may prefer to initialize a client instance with a storage\nconnection string instead of providing the account URL and credential separately. To do this, pass the storage\nconnection string to the client's `from_connection_string` class method:\n\n```python\nfrom azure.storage.blob import BlobServiceClient\n\nconnection_string = \"DefaultEndpointsProtocol=https;AccountName=xxxx;AccountKey=xxxx;EndpointSuffix=core.windows.net\"\nservice = BlobServiceClient.from_connection_string(conn_str=connection_string)\n```\n\nThe connection string to your storage account can be found in the Azure Portal under the \"Access Keys\" section or by running the following CLI command:\n\n```bash\naz storage account show-connection-string -g MyResourceGroup -n MyStorageAccount\n```\n\n## Key concepts\nThe following components make up the Azure Blob Service:\n* The storage account itself\n* A container within the storage account\n* A blob within a container\n\nThe Azure Storage Blobs client library for Python allows you to interact with each of these components through the\nuse of a dedicated client object.\n\n### Clients\nFour different clients are provided to interact with the various components of the Blob Service:\n1. [BlobServiceClient](https://aka.ms/azsdk-python-storage-blob-blobserviceclient) -\n this client represents interaction with the Azure storage account itself, and allows you to acquire preconfigured\n client instances to access the containers and blobs within. It provides operations to retrieve and configure the\n account properties as well as list, create, and delete containers within the account. To perform operations on a\n specific container or blob, retrieve a client using the `get_container_client` or `get_blob_client` methods.\n2. [ContainerClient](https://aka.ms/azsdk-python-storage-blob-containerclient) -\n this client represents interaction with a specific container (which need not exist yet), and allows you to acquire\n preconfigured client instances to access the blobs within. It provides operations to create, delete, or configure a\n container and includes operations to list, upload, and delete the blobs within it. To perform operations on a\n specific blob within the container, retrieve a client using the `get_blob_client` method.\n3. [BlobClient](https://aka.ms/azsdk-python-storage-blob-blobclient) -\n this client represents interaction with a specific blob (which need not exist yet). It provides operations to\n upload, download, delete, and create snapshots of a blob, as well as specific operations per blob type.\n4. [BlobLeaseClient](https://aka.ms/azsdk-python-storage-blob-blobleaseclient) -\n this client represents lease interactions with a `ContainerClient` or `BlobClient`. It provides operations to\n acquire, renew, release, change, and break a lease on a specified resource.\n\n### Async Clients \nThis library includes a complete async API supported on Python 3.5+. To use it, you must\nfirst install an async transport, such as [aiohttp](https://pypi.org/project/aiohttp/).\nSee\n[azure-core documentation](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md#transport)\nfor more information.\n\nAsync clients and credentials should be closed when they're no longer needed. These\nobjects are async context managers and define async `close` methods.\n\n### Blob Types\nOnce you've initialized a Client, you can choose from the different types of blobs:\n* [Block blobs](https://docs.microsoft.com/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs#about-block-blobs)\n store text and binary data, up to approximately 4.75 TiB. Block blobs are made up of blocks of data that can be\n managed individually\n* [Append blobs](https://docs.microsoft.com/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs#about-append-blobs)\n are made up of blocks like block blobs, but are optimized for append operations. Append blobs are ideal for scenarios\n such as logging data from virtual machines\n* [Page blobs](https://docs.microsoft.com/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs#about-page-blobs)\n store random access files up to 8 TiB in size. Page blobs store virtual hard drive (VHD) files and serve as disks for\n Azure virtual machines\n\n## Examples\nThe following sections provide several code snippets covering some of the most common Storage Blob tasks, including:\n\n* [Create a container](#create-a-container \"Create a container\")\n* [Uploading a blob](#uploading-a-blob \"Uploading a blob\")\n* [Downloading a blob](#downloading-a-blob \"Downloading a blob\")\n* [Enumerating blobs](#enumerating-blobs \"Enumerating blobs\")\n\nNote that a container must be created before to upload or download a blob.\n\n### Create a container\n\nCreate a container from where you can upload or download blobs.\n```python\nfrom azure.storage.blob import ContainerClient\n\ncontainer_client = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\ncontainer_client.create_container()\n```\n\nUse the async client to upload a blob\n\n```python\nfrom azure.storage.blob.aio import ContainerClient\n\ncontainer_client = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\nawait container_client.create_container()\n```\n\n### Uploading a blob\nUpload a blob to your container\n\n```python\nfrom azure.storage.blob import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./SampleSource.txt\", \"rb\") as data:\n blob.upload_blob(data)\n```\n\nUse the async client to upload a blob\n\n```python\nfrom azure.storage.blob.aio import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./SampleSource.txt\", \"rb\") as data:\n await blob.upload_blob(data)\n```\n\n### Downloading a blob\nDownload a blob from your container\n\n```python\nfrom azure.storage.blob import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./BlockDestination.txt\", \"wb\") as my_blob:\n blob_data = blob.download_blob()\n blob_data.readinto(my_blob)\n```\n\nDownload a blob asynchronously\n\n```python\nfrom azure.storage.blob.aio import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./BlockDestination.txt\", \"wb\") as my_blob:\n stream = await blob.download_blob()\n data = await stream.readall()\n my_blob.write(data)\n```\n\n### Enumerating blobs\nList the blobs in your container\n\n```python\nfrom azure.storage.blob import ContainerClient\n\ncontainer = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\nblob_list = container.list_blobs()\nfor blob in blob_list:\n print(blob.name + '\\n')\n```\n\nList the blobs asynchronously\n\n```python\nfrom azure.storage.blob.aio import ContainerClient\n\ncontainer = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\nblob_list = []\nasync for blob in container.list_blobs():\n blob_list.append(blob)\nprint(blob_list)\n```\n\n## Optional Configuration\n\nOptional keyword arguments that can be passed in at the client and per-operation level.\n\n### Retry Policy configuration\n\nUse the following keyword arguments when instantiating a client to configure the retry policy:\n\n* __retry_total__ (int): Total number of retries to allow. Takes precedence over other counts.\nPass in `retry_total=0` if you do not want to retry on requests. Defaults to 10.\n* __retry_connect__ (int): How many connection-related errors to retry on. Defaults to 3.\n* __retry_read__ (int): How many times to retry on read errors. Defaults to 3.\n* __retry_status__ (int): How many times to retry on bad status codes. Defaults to 3.\n* __retry_to_secondary__ (bool): Whether the request should be retried to secondary, if able.\nThis should only be enabled of RA-GRS accounts are used and potentially stale data can be handled.\nDefaults to `False`.\n\n### Encryption configuration\n\nUse the following keyword arguments when instantiating a client to configure encryption:\n\n* __require_encryption__ (bool): If set to True, will enforce that objects are encrypted and decrypt them.\n* __encryption_version__ (str): Specifies the version of encryption to use. Current options are `'2.0'` or `'1.0'` and\nthe default value is `'1.0'`. Version 1.0 is deprecated, and it is **highly recommended** to use version 2.0.\n* __key_encryption_key__ (object): The user-provided key-encryption-key. The instance must implement the following methods:\n - `wrap_key(key)`--wraps the specified key using an algorithm of the user's choice.\n - `get_key_wrap_algorithm()`--returns the algorithm used to wrap the specified symmetric key.\n - `get_kid()`--returns a string key id for this key-encryption-key.\n* __key_resolver_function__ (callable): The user-provided key resolver. Uses the kid string to return a key-encryption-key\nimplementing the interface defined above.\n\n### Other client / per-operation configuration\n\nOther optional configuration keyword arguments that can be specified on the client or per-operation.\n\n**Client keyword arguments:**\n\n* __connection_timeout__ (int): The number of seconds the client will wait to establish a connection to the server.\nDefaults to 20 seconds.\n* __read_timeout__ (int): The number of seconds the client will wait, between consecutive read operations, for a\nresponse from the server. This is a socket level timeout and is not affected by overall data size. Client-side read \ntimeouts will be automatically retried. Defaults to 60 seconds.\n* __transport__ (Any): User-provided transport to send the HTTP request.\n\n**Per-operation keyword arguments:**\n\n* __raw_response_hook__ (callable): The given callback uses the response returned from the service.\n* __raw_request_hook__ (callable): The given callback uses the request before being sent to service.\n* __client_request_id__ (str): Optional user specified identification of the request.\n* __user_agent__ (str): Appends the custom value to the user-agent header to be sent with the request.\n* __logging_enable__ (bool): Enables logging at the DEBUG level. Defaults to False. Can also be passed in at\nthe client level to enable it for all requests.\n* __logging_body__ (bool): Enables logging the request and response body. Defaults to False. Can also be passed in at\nthe client level to enable it for all requests.\n* __headers__ (dict): Pass in custom headers as key, value pairs. E.g. `headers={'CustomValue': value}`\n\n## Troubleshooting\n### General\nStorage Blob clients raise exceptions defined in [Azure Core](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/README.md).\n\nThis list can be used for reference to catch thrown exceptions. To get the specific error code of the exception, use the `error_code` attribute, i.e, `exception.error_code`.\n\n### Logging\nThis library uses the standard\n[logging](https://docs.python.org/3/library/logging.html) library for logging.\nBasic information about HTTP sessions (URLs, headers, etc.) is logged at INFO\nlevel.\n\nDetailed DEBUG level logging, including request/response bodies and unredacted\nheaders, can be enabled on a client with the `logging_enable` argument:\n```python\nimport sys\nimport logging\nfrom azure.storage.blob import BlobServiceClient\n\n# Create a logger for the 'azure.storage.blob' SDK\nlogger = logging.getLogger('azure.storage.blob')\nlogger.setLevel(logging.DEBUG)\n\n# Configure a console output\nhandler = logging.StreamHandler(stream=sys.stdout)\nlogger.addHandler(handler)\n\n# This client will log detailed information about its HTTP sessions, at DEBUG level\nservice_client = BlobServiceClient.from_connection_string(\"your_connection_string\", logging_enable=True)\n```\n\nSimilarly, `logging_enable` can enable detailed logging for a single operation,\neven when it isn't enabled for the client:\n```python\nservice_client.get_service_stats(logging_enable=True)\n```\n\n## Next steps\n\n### More sample code\n\nGet started with our [Blob samples](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples).\n\nSeveral Storage Blobs Python SDK samples are available to you in the SDK's GitHub repository. These samples provide example code for additional scenarios commonly encountered while working with Storage Blobs:\n\n* [blob_samples_container_access_policy.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_container_access_policy.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_container_access_policy_async.py)) - Examples to set Access policies:\n * Set up Access Policy for container\n\n* [blob_samples_hello_world.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_hello_world.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_hello_world_async.py)) - Examples for common Storage Blob tasks:\n * Set up a container\n * Create a block, page, or append blob\n * Upload blobs\n * Download blobs\n * Delete blobs\n\n* [blob_samples_authentication.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_authentication.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_authentication_async.py)) - Examples for authenticating and creating the client:\n * From a connection string\n * From a shared access key\n * From a shared access signature token\n * From active directory\n\n* [blob_samples_service.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_service.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_service_async.py)) - Examples for interacting with the blob service:\n * Get account information\n * Get and set service properties\n * Get service statistics\n * Create, list, and delete containers\n * Get the Blob or Container client\n\n* [blob_samples_containers.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_containers.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_containers_async.py)) - Examples for interacting with containers:\n * Create a container and delete containers\n * Set metadata on containers\n * Get container properties\n * Acquire a lease on container\n * Set an access policy on a container\n * Upload, list, delete blobs in container\n * Get the blob client to interact with a specific blob\n\n* [blob_samples_common.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_common.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_common_async.py)) - Examples common to all types of blobs:\n * Create a snapshot\n * Delete a blob snapshot\n * Soft delete a blob\n * Undelete a blob\n * Acquire a lease on a blob\n * Copy a blob from a URL\n\n* [blob_samples_directory_interface.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_directory_interface.py) - Examples for interfacing with Blob storage as if it were a directory on a filesystem:\n * Copy (upload or download) a single file or directory\n * List files or directories at a single level or recursively\n * Delete a single file or recursively delete a directory\n\n### Additional documentation\nFor more extensive documentation on Azure Blob storage, see the [Azure Blob storage documentation](https://docs.microsoft.com/azure/storage/blobs/) on docs.microsoft.com.\n\n## Contributing\nThis project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.", - "release_date": "2023-07-11T22:58:43", + "release_date": "2023-09-13T23:16:17", "parties": [ { "type": "person", @@ -395,6 +399,8 @@ } ], "keywords": [ + "azure", + "azure sdk", "Development Status :: 5 - Production/Stable", "Programming Language :: Python", "Programming Language :: Python :: 3", @@ -405,11 +411,11 @@ "Programming Language :: Python :: 3.9" ], "homepage_url": "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob", - "download_url": "https://files.pythonhosted.org/packages/f1/06/68c50a905e1e5481b04a6166b69fecddb87681aae7a556ab727f8e8e6f70/azure_storage_blob-12.17.0-py3-none-any.whl", - "size": 388030, + "download_url": "https://files.pythonhosted.org/packages/14/c3/9b6a7f5fee1bf833384925f9741b182d170bb65d0142fbf73b1683a055d2/azure_storage_blob-12.18.1-py3-none-any.whl", + "size": 392811, "sha1": null, - "md5": "dad5ef1f081c73d2f59488a80f5a622d", - "sha256": "0016e0c549a80282d7b4920c03f2f4ba35c53e6e3c7dbcd2a4a8c8eb3882c1e7", + "md5": "6e20d1d050ab62b7c979a7d9f7fc649b", + "sha256": "00b92568e91d608c04dfd4814c3b180818e690023493bb984c22dfc1a8a96e55", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -429,20 +435,20 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/azure-storage-blob/12.17.0/json", + "api_data_url": "https://pypi.org/pypi/azure-storage-blob/12.18.1/json", "datasource_id": null, - "purl": "pkg:pypi/azure-storage-blob@12.17.0" + "purl": "pkg:pypi/azure-storage-blob@12.18.1" }, { "type": "pypi", "namespace": null, "name": "azure-storage-blob", - "version": "12.17.0", + "version": "12.18.1", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "Microsoft Azure Blob Storage Client Library for Python\n# Azure Storage Blobs client library for Python\nAzure Blob storage is Microsoft's object storage solution for the cloud. Blob storage is optimized for storing massive amounts of unstructured data, such as text or binary data.\n\nBlob storage is ideal for:\n\n* Serving images or documents directly to a browser\n* Storing files for distributed access\n* Streaming video and audio\n* Storing data for backup and restore, disaster recovery, and archiving\n* Storing data for analysis by an on-premises or Azure-hosted service\n\n[Source code](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/azure/storage/blob)\n| [Package (PyPI)](https://pypi.org/project/azure-storage-blob/)\n| [Package (Conda)](https://anaconda.org/microsoft/azure-storage/)\n| [API reference documentation](https://aka.ms/azsdk-python-storage-blob-ref)\n| [Product documentation](https://docs.microsoft.com/azure/storage/)\n| [Samples](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples)\n\n\n## Getting started\n\n### Prerequisites\n* Python 3.7 or later is required to use this package. For more details, please read our page on [Azure SDK for Python version support policy](https://github.com/Azure/azure-sdk-for-python/wiki/Azure-SDKs-Python-version-support-policy).\n* You must have an [Azure subscription](https://azure.microsoft.com/free/) and an\n[Azure storage account](https://docs.microsoft.com/azure/storage/common/storage-account-overview) to use this package.\n\n### Install the package\nInstall the Azure Storage Blobs client library for Python with [pip](https://pypi.org/project/pip/):\n\n```bash\npip install azure-storage-blob\n```\n\n### Create a storage account\nIf you wish to create a new storage account, you can use the\n[Azure Portal](https://docs.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-portal),\n[Azure PowerShell](https://docs.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-powershell),\nor [Azure CLI](https://docs.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-cli):\n\n```bash\n# Create a new resource group to hold the storage account -\n# if using an existing resource group, skip this step\naz group create --name my-resource-group --location westus2\n\n# Create the storage account\naz storage account create -n my-storage-account-name -g my-resource-group\n```\n\n### Create the client\nThe Azure Storage Blobs client library for Python allows you to interact with three types of resources: the storage\naccount itself, blob storage containers, and blobs. Interaction with these resources starts with an instance of a\n[client](#clients). To create a client object, you will need the storage account's blob service account URL and a\ncredential that allows you to access the storage account:\n\n```python\nfrom azure.storage.blob import BlobServiceClient\n\nservice = BlobServiceClient(account_url=\"https://.blob.core.windows.net/\", credential=credential)\n```\n\n#### Looking up the account URL\nYou can find the storage account's blob service URL using the\n[Azure Portal](https://docs.microsoft.com/azure/storage/common/storage-account-overview#storage-account-endpoints),\n[Azure PowerShell](https://docs.microsoft.com/powershell/module/az.storage/get-azstorageaccount),\nor [Azure CLI](https://docs.microsoft.com/cli/azure/storage/account?view=azure-cli-latest#az-storage-account-show):\n\n```bash\n# Get the blob service account url for the storage account\naz storage account show -n my-storage-account-name -g my-resource-group --query \"primaryEndpoints.blob\"\n```\n\n#### Types of credentials\nThe `credential` parameter may be provided in a number of different forms, depending on the type of\n[authorization](https://docs.microsoft.com/azure/storage/common/storage-auth) you wish to use:\n1. To use an [Azure Active Directory (AAD) token credential](https://docs.microsoft.com/azure/storage/common/storage-auth-aad),\n provide an instance of the desired credential type obtained from the\n [azure-identity](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#credentials) library.\n For example, [DefaultAzureCredential](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#defaultazurecredential)\n can be used to authenticate the client.\n\n This requires some initial setup:\n * [Install azure-identity](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#install-the-package)\n * [Register a new AAD application](https://docs.microsoft.com/azure/active-directory/develop/quickstart-register-app) and give permissions to access Azure Storage\n * [Grant access](https://docs.microsoft.com/azure/storage/common/storage-auth-aad-rbac-portal) to Azure Blob data with RBAC in the Azure Portal\n * Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables:\n AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET\n\n Use the returned token credential to authenticate the client:\n ```python\n from azure.identity import DefaultAzureCredential\n from azure.storage.blob import BlobServiceClient\n token_credential = DefaultAzureCredential()\n\n blob_service_client = BlobServiceClient(\n account_url=\"https://.blob.core.windows.net\",\n credential=token_credential\n )\n ```\n\n2. To use a [shared access signature (SAS) token](https://docs.microsoft.com/azure/storage/common/storage-sas-overview),\n provide the token as a string. If your account URL includes the SAS token, omit the credential parameter.\n You can generate a SAS token from the Azure Portal under \"Shared access signature\" or use one of the `generate_sas()`\n functions to create a sas token for the storage account, container, or blob:\n\n ```python\n from datetime import datetime, timedelta\n from azure.storage.blob import BlobServiceClient, generate_account_sas, ResourceTypes, AccountSasPermissions\n\n sas_token = generate_account_sas(\n account_name=\"\",\n account_key=\"\",\n resource_types=ResourceTypes(service=True),\n permission=AccountSasPermissions(read=True),\n expiry=datetime.utcnow() + timedelta(hours=1)\n )\n\n blob_service_client = BlobServiceClient(account_url=\"https://.blob.core.windows.net\", credential=sas_token)\n ```\n\n3. To use a storage account [shared key](https://docs.microsoft.com/rest/api/storageservices/authenticate-with-shared-key/)\n (aka account key or access key), provide the key as a string. This can be found in the Azure Portal under the \"Access Keys\"\n section or by running the following Azure CLI command:\n\n ```az storage account keys list -g MyResourceGroup -n MyStorageAccount```\n\n Use the key as the credential parameter to authenticate the client:\n ```python\n from azure.storage.blob import BlobServiceClient\n service = BlobServiceClient(account_url=\"https://.blob.core.windows.net\", credential=\"\")\n ```\n \n If you are using **customized url** (which means the url is not in this format `.blob.core.windows.net`),\n please instantiate the client using the credential below:\n ```python\n from azure.storage.blob import BlobServiceClient\n service = BlobServiceClient(account_url=\"https://.blob.core.windows.net\", \n credential={\"account_name\": \"\", \"account_key\":\"\"})\n ```\n\n4. To use [anonymous public read access](https://docs.microsoft.com/azure/storage/blobs/storage-manage-access-to-resources),\n simply omit the credential parameter.\n\n#### Creating the client from a connection string\nDepending on your use case and authorization method, you may prefer to initialize a client instance with a storage\nconnection string instead of providing the account URL and credential separately. To do this, pass the storage\nconnection string to the client's `from_connection_string` class method:\n\n```python\nfrom azure.storage.blob import BlobServiceClient\n\nconnection_string = \"DefaultEndpointsProtocol=https;AccountName=xxxx;AccountKey=xxxx;EndpointSuffix=core.windows.net\"\nservice = BlobServiceClient.from_connection_string(conn_str=connection_string)\n```\n\nThe connection string to your storage account can be found in the Azure Portal under the \"Access Keys\" section or by running the following CLI command:\n\n```bash\naz storage account show-connection-string -g MyResourceGroup -n MyStorageAccount\n```\n\n## Key concepts\nThe following components make up the Azure Blob Service:\n* The storage account itself\n* A container within the storage account\n* A blob within a container\n\nThe Azure Storage Blobs client library for Python allows you to interact with each of these components through the\nuse of a dedicated client object.\n\n### Clients\nFour different clients are provided to interact with the various components of the Blob Service:\n1. [BlobServiceClient](https://aka.ms/azsdk-python-storage-blob-blobserviceclient) -\n this client represents interaction with the Azure storage account itself, and allows you to acquire preconfigured\n client instances to access the containers and blobs within. It provides operations to retrieve and configure the\n account properties as well as list, create, and delete containers within the account. To perform operations on a\n specific container or blob, retrieve a client using the `get_container_client` or `get_blob_client` methods.\n2. [ContainerClient](https://aka.ms/azsdk-python-storage-blob-containerclient) -\n this client represents interaction with a specific container (which need not exist yet), and allows you to acquire\n preconfigured client instances to access the blobs within. It provides operations to create, delete, or configure a\n container and includes operations to list, upload, and delete the blobs within it. To perform operations on a\n specific blob within the container, retrieve a client using the `get_blob_client` method.\n3. [BlobClient](https://aka.ms/azsdk-python-storage-blob-blobclient) -\n this client represents interaction with a specific blob (which need not exist yet). It provides operations to\n upload, download, delete, and create snapshots of a blob, as well as specific operations per blob type.\n4. [BlobLeaseClient](https://aka.ms/azsdk-python-storage-blob-blobleaseclient) -\n this client represents lease interactions with a `ContainerClient` or `BlobClient`. It provides operations to\n acquire, renew, release, change, and break a lease on a specified resource.\n\n### Async Clients \nThis library includes a complete async API supported on Python 3.5+. To use it, you must\nfirst install an async transport, such as [aiohttp](https://pypi.org/project/aiohttp/).\nSee\n[azure-core documentation](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md#transport)\nfor more information.\n\nAsync clients and credentials should be closed when they're no longer needed. These\nobjects are async context managers and define async `close` methods.\n\n### Blob Types\nOnce you've initialized a Client, you can choose from the different types of blobs:\n* [Block blobs](https://docs.microsoft.com/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs#about-block-blobs)\n store text and binary data, up to approximately 4.75 TiB. Block blobs are made up of blocks of data that can be\n managed individually\n* [Append blobs](https://docs.microsoft.com/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs#about-append-blobs)\n are made up of blocks like block blobs, but are optimized for append operations. Append blobs are ideal for scenarios\n such as logging data from virtual machines\n* [Page blobs](https://docs.microsoft.com/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs#about-page-blobs)\n store random access files up to 8 TiB in size. Page blobs store virtual hard drive (VHD) files and serve as disks for\n Azure virtual machines\n\n## Examples\nThe following sections provide several code snippets covering some of the most common Storage Blob tasks, including:\n\n* [Create a container](#create-a-container \"Create a container\")\n* [Uploading a blob](#uploading-a-blob \"Uploading a blob\")\n* [Downloading a blob](#downloading-a-blob \"Downloading a blob\")\n* [Enumerating blobs](#enumerating-blobs \"Enumerating blobs\")\n\nNote that a container must be created before to upload or download a blob.\n\n### Create a container\n\nCreate a container from where you can upload or download blobs.\n```python\nfrom azure.storage.blob import ContainerClient\n\ncontainer_client = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\ncontainer_client.create_container()\n```\n\nUse the async client to upload a blob\n\n```python\nfrom azure.storage.blob.aio import ContainerClient\n\ncontainer_client = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\nawait container_client.create_container()\n```\n\n### Uploading a blob\nUpload a blob to your container\n\n```python\nfrom azure.storage.blob import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./SampleSource.txt\", \"rb\") as data:\n blob.upload_blob(data)\n```\n\nUse the async client to upload a blob\n\n```python\nfrom azure.storage.blob.aio import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./SampleSource.txt\", \"rb\") as data:\n await blob.upload_blob(data)\n```\n\n### Downloading a blob\nDownload a blob from your container\n\n```python\nfrom azure.storage.blob import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./BlockDestination.txt\", \"wb\") as my_blob:\n blob_data = blob.download_blob()\n blob_data.readinto(my_blob)\n```\n\nDownload a blob asynchronously\n\n```python\nfrom azure.storage.blob.aio import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./BlockDestination.txt\", \"wb\") as my_blob:\n stream = await blob.download_blob()\n data = await stream.readall()\n my_blob.write(data)\n```\n\n### Enumerating blobs\nList the blobs in your container\n\n```python\nfrom azure.storage.blob import ContainerClient\n\ncontainer = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\nblob_list = container.list_blobs()\nfor blob in blob_list:\n print(blob.name + '\\n')\n```\n\nList the blobs asynchronously\n\n```python\nfrom azure.storage.blob.aio import ContainerClient\n\ncontainer = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\nblob_list = []\nasync for blob in container.list_blobs():\n blob_list.append(blob)\nprint(blob_list)\n```\n\n## Optional Configuration\n\nOptional keyword arguments that can be passed in at the client and per-operation level.\n\n### Retry Policy configuration\n\nUse the following keyword arguments when instantiating a client to configure the retry policy:\n\n* __retry_total__ (int): Total number of retries to allow. Takes precedence over other counts.\nPass in `retry_total=0` if you do not want to retry on requests. Defaults to 10.\n* __retry_connect__ (int): How many connection-related errors to retry on. Defaults to 3.\n* __retry_read__ (int): How many times to retry on read errors. Defaults to 3.\n* __retry_status__ (int): How many times to retry on bad status codes. Defaults to 3.\n* __retry_to_secondary__ (bool): Whether the request should be retried to secondary, if able.\nThis should only be enabled of RA-GRS accounts are used and potentially stale data can be handled.\nDefaults to `False`.\n\n### Encryption configuration\n\nUse the following keyword arguments when instantiating a client to configure encryption:\n\n* __require_encryption__ (bool): If set to True, will enforce that objects are encrypted and decrypt them.\n* __encryption_version__ (str): Specifies the version of encryption to use. Current options are `'2.0'` or `'1.0'` and\nthe default value is `'1.0'`. Version 1.0 is deprecated, and it is **highly recommended** to use version 2.0.\n* __key_encryption_key__ (object): The user-provided key-encryption-key. The instance must implement the following methods:\n - `wrap_key(key)`--wraps the specified key using an algorithm of the user's choice.\n - `get_key_wrap_algorithm()`--returns the algorithm used to wrap the specified symmetric key.\n - `get_kid()`--returns a string key id for this key-encryption-key.\n* __key_resolver_function__ (callable): The user-provided key resolver. Uses the kid string to return a key-encryption-key\nimplementing the interface defined above.\n\n### Other client / per-operation configuration\n\nOther optional configuration keyword arguments that can be specified on the client or per-operation.\n\n**Client keyword arguments:**\n\n* __connection_timeout__ (int): The number of seconds the client will wait to establish a connection to the server.\nDefaults to 20 seconds.\n* __read_timeout__ (int): The number of seconds the client will wait, between consecutive read operations, for a\nresponse from the server. This is a socket level timeout and is not affected by overall data size. Client-side read \ntimeouts will be automatically retried. Defaults to 60 seconds.\n* __transport__ (Any): User-provided transport to send the HTTP request.\n\n**Per-operation keyword arguments:**\n\n* __raw_response_hook__ (callable): The given callback uses the response returned from the service.\n* __raw_request_hook__ (callable): The given callback uses the request before being sent to service.\n* __client_request_id__ (str): Optional user specified identification of the request.\n* __user_agent__ (str): Appends the custom value to the user-agent header to be sent with the request.\n* __logging_enable__ (bool): Enables logging at the DEBUG level. Defaults to False. Can also be passed in at\nthe client level to enable it for all requests.\n* __logging_body__ (bool): Enables logging the request and response body. Defaults to False. Can also be passed in at\nthe client level to enable it for all requests.\n* __headers__ (dict): Pass in custom headers as key, value pairs. E.g. `headers={'CustomValue': value}`\n\n## Troubleshooting\n### General\nStorage Blob clients raise exceptions defined in [Azure Core](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/README.md).\n\nThis list can be used for reference to catch thrown exceptions. To get the specific error code of the exception, use the `error_code` attribute, i.e, `exception.error_code`.\n\n### Logging\nThis library uses the standard\n[logging](https://docs.python.org/3/library/logging.html) library for logging.\nBasic information about HTTP sessions (URLs, headers, etc.) is logged at INFO\nlevel.\n\nDetailed DEBUG level logging, including request/response bodies and unredacted\nheaders, can be enabled on a client with the `logging_enable` argument:\n```python\nimport sys\nimport logging\nfrom azure.storage.blob import BlobServiceClient\n\n# Create a logger for the 'azure.storage.blob' SDK\nlogger = logging.getLogger('azure.storage.blob')\nlogger.setLevel(logging.DEBUG)\n\n# Configure a console output\nhandler = logging.StreamHandler(stream=sys.stdout)\nlogger.addHandler(handler)\n\n# This client will log detailed information about its HTTP sessions, at DEBUG level\nservice_client = BlobServiceClient.from_connection_string(\"your_connection_string\", logging_enable=True)\n```\n\nSimilarly, `logging_enable` can enable detailed logging for a single operation,\neven when it isn't enabled for the client:\n```python\nservice_client.get_service_stats(logging_enable=True)\n```\n\n## Next steps\n\n### More sample code\n\nGet started with our [Blob samples](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples).\n\nSeveral Storage Blobs Python SDK samples are available to you in the SDK's GitHub repository. These samples provide example code for additional scenarios commonly encountered while working with Storage Blobs:\n\n* [blob_samples_container_access_policy.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_container_access_policy.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_container_access_policy_async.py)) - Examples to set Access policies:\n * Set up Access Policy for container\n\n* [blob_samples_hello_world.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_hello_world.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_hello_world_async.py)) - Examples for common Storage Blob tasks:\n * Set up a container\n * Create a block, page, or append blob\n * Upload blobs\n * Download blobs\n * Delete blobs\n\n* [blob_samples_authentication.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_authentication.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_authentication_async.py)) - Examples for authenticating and creating the client:\n * From a connection string\n * From a shared access key\n * From a shared access signature token\n * From active directory\n\n* [blob_samples_service.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_service.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_service_async.py)) - Examples for interacting with the blob service:\n * Get account information\n * Get and set service properties\n * Get service statistics\n * Create, list, and delete containers\n * Get the Blob or Container client\n\n* [blob_samples_containers.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_containers.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_containers_async.py)) - Examples for interacting with containers:\n * Create a container and delete containers\n * Set metadata on containers\n * Get container properties\n * Acquire a lease on container\n * Set an access policy on a container\n * Upload, list, delete blobs in container\n * Get the blob client to interact with a specific blob\n\n* [blob_samples_common.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_common.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_common_async.py)) - Examples common to all types of blobs:\n * Create a snapshot\n * Delete a blob snapshot\n * Soft delete a blob\n * Undelete a blob\n * Acquire a lease on a blob\n * Copy a blob from a URL\n\n* [blob_samples_directory_interface.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_directory_interface.py) - Examples for interfacing with Blob storage as if it were a directory on a filesystem:\n * Copy (upload or download) a single file or directory\n * List files or directories at a single level or recursively\n * Delete a single file or recursively delete a directory\n\n### Additional documentation\nFor more extensive documentation on Azure Blob storage, see the [Azure Blob storage documentation](https://docs.microsoft.com/azure/storage/blobs/) on docs.microsoft.com.\n\n## Contributing\nThis project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.", - "release_date": "2023-07-11T22:58:40", + "release_date": "2023-09-13T23:16:07", "parties": [ { "type": "person", @@ -453,6 +459,8 @@ } ], "keywords": [ + "azure", + "azure sdk", "Development Status :: 5 - Production/Stable", "Programming Language :: Python", "Programming Language :: Python :: 3", @@ -463,11 +471,11 @@ "Programming Language :: Python :: 3.9" ], "homepage_url": "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob", - "download_url": "https://files.pythonhosted.org/packages/bd/5f/64a471e09f064b3b3a53529ecd9ed8facfebfafff3dad7ee9350f3a00a30/azure-storage-blob-12.17.0.zip", - "size": 698725, + "download_url": "https://files.pythonhosted.org/packages/1c/1f/5cacdd7574538fb77071c1b4b69dbb3b1716204803fd224b799dee4e260a/azure-storage-blob-12.18.1.tar.gz", + "size": 548770, "sha1": null, - "md5": "0dcc1fe3655773d6f3817a9b8e6db855", - "sha256": "c14b785a17050b30fc326a315bdae6bc4a078855f4f94a4c303ad74a48dc8c63", + "md5": "eb7d0f1f49d5409bd4b88e14382087a5", + "sha256": "d3265c2403c28d8881326c365e9cf7ed2ad55fdac98404eae753548702b31ba2", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -487,9 +495,9 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/azure-storage-blob/12.17.0/json", + "api_data_url": "https://pypi.org/pypi/azure-storage-blob/12.18.1/json", "datasource_id": null, - "purl": "pkg:pypi/azure-storage-blob@12.17.0" + "purl": "pkg:pypi/azure-storage-blob@12.18.1" }, { "type": "pypi", @@ -889,12 +897,12 @@ "type": "pypi", "namespace": null, "name": "click", - "version": "8.1.6", + "version": "8.1.7", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "Composable command line interface toolkit\n\\$ click\\_\n==========\n\nClick is a Python package for creating beautiful command line interfaces\nin a composable way with as little code as necessary. It's the \"Command\nLine Interface Creation Kit\". It's highly configurable but comes with\nsensible defaults out of the box.\n\nIt aims to make the process of writing command line tools quick and fun\nwhile also preventing any frustration caused by the inability to\nimplement an intended CLI API.\n\nClick in three points:\n\n- Arbitrary nesting of commands\n- Automatic help page generation\n- Supports lazy loading of subcommands at runtime\n\n\nInstalling\n----------\n\nInstall and update using `pip`_:\n\n.. code-block:: text\n\n $ pip install -U click\n\n.. _pip: https://pip.pypa.io/en/stable/getting-started/\n\n\nA Simple Example\n----------------\n\n.. code-block:: python\n\n import click\n\n @click.command()\n @click.option(\"--count\", default=1, help=\"Number of greetings.\")\n @click.option(\"--name\", prompt=\"Your name\", help=\"The person to greet.\")\n def hello(count, name):\n \"\"\"Simple program that greets NAME for a total of COUNT times.\"\"\"\n for _ in range(count):\n click.echo(f\"Hello, {name}!\")\n\n if __name__ == '__main__':\n hello()\n\n.. code-block:: text\n\n $ python hello.py --count=3\n Your name: Click\n Hello, Click!\n Hello, Click!\n Hello, Click!\n\n\nDonate\n------\n\nThe Pallets organization develops and supports Click and other popular\npackages. In order to grow the community of contributors and users, and\nallow the maintainers to devote more time to the projects, `please\ndonate today`_.\n\n.. _please donate today: https://palletsprojects.com/donate\n\n\nLinks\n-----\n\n- Documentation: https://click.palletsprojects.com/\n- Changes: https://click.palletsprojects.com/changes/\n- PyPI Releases: https://pypi.org/project/click/\n- Source Code: https://github.com/pallets/click\n- Issue Tracker: https://github.com/pallets/click/issues\n- Chat: https://discord.gg/pallets", - "release_date": "2023-07-18T20:05:12", + "release_date": "2023-08-17T17:29:10", "parties": [ { "type": "person", @@ -911,11 +919,11 @@ "Programming Language :: Python" ], "homepage_url": "https://palletsprojects.com/p/click/", - "download_url": "https://files.pythonhosted.org/packages/1a/70/e63223f8116931d365993d4a6b7ef653a4d920b41d03de7c59499962821f/click-8.1.6-py3-none-any.whl", - "size": 97909, + "download_url": "https://files.pythonhosted.org/packages/00/2e/d53fa4befbf2cfa713304affc7ca780ce4fc1fd8710527771b58311a3229/click-8.1.7-py3-none-any.whl", + "size": 97941, "sha1": null, - "md5": "043416d14751ae24c8e8b0968b6fff78", - "sha256": "fa244bb30b3b5ee2cae3da8f55c9e5e0c0e86093306301fb418eb9dc40fbded5", + "md5": "37a41134cc8a13400234746942d5d180", + "sha256": "ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28", "sha512": null, "bug_tracking_url": "https://github.com/pallets/click/issues/", "code_view_url": "https://github.com/pallets/click/", @@ -935,20 +943,20 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/click/8.1.6/json", + "api_data_url": "https://pypi.org/pypi/click/8.1.7/json", "datasource_id": null, - "purl": "pkg:pypi/click@8.1.6" + "purl": "pkg:pypi/click@8.1.7" }, { "type": "pypi", "namespace": null, "name": "click", - "version": "8.1.6", + "version": "8.1.7", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "Composable command line interface toolkit\n\\$ click\\_\n==========\n\nClick is a Python package for creating beautiful command line interfaces\nin a composable way with as little code as necessary. It's the \"Command\nLine Interface Creation Kit\". It's highly configurable but comes with\nsensible defaults out of the box.\n\nIt aims to make the process of writing command line tools quick and fun\nwhile also preventing any frustration caused by the inability to\nimplement an intended CLI API.\n\nClick in three points:\n\n- Arbitrary nesting of commands\n- Automatic help page generation\n- Supports lazy loading of subcommands at runtime\n\n\nInstalling\n----------\n\nInstall and update using `pip`_:\n\n.. code-block:: text\n\n $ pip install -U click\n\n.. _pip: https://pip.pypa.io/en/stable/getting-started/\n\n\nA Simple Example\n----------------\n\n.. code-block:: python\n\n import click\n\n @click.command()\n @click.option(\"--count\", default=1, help=\"Number of greetings.\")\n @click.option(\"--name\", prompt=\"Your name\", help=\"The person to greet.\")\n def hello(count, name):\n \"\"\"Simple program that greets NAME for a total of COUNT times.\"\"\"\n for _ in range(count):\n click.echo(f\"Hello, {name}!\")\n\n if __name__ == '__main__':\n hello()\n\n.. code-block:: text\n\n $ python hello.py --count=3\n Your name: Click\n Hello, Click!\n Hello, Click!\n Hello, Click!\n\n\nDonate\n------\n\nThe Pallets organization develops and supports Click and other popular\npackages. In order to grow the community of contributors and users, and\nallow the maintainers to devote more time to the projects, `please\ndonate today`_.\n\n.. _please donate today: https://palletsprojects.com/donate\n\n\nLinks\n-----\n\n- Documentation: https://click.palletsprojects.com/\n- Changes: https://click.palletsprojects.com/changes/\n- PyPI Releases: https://pypi.org/project/click/\n- Source Code: https://github.com/pallets/click\n- Issue Tracker: https://github.com/pallets/click/issues\n- Chat: https://discord.gg/pallets", - "release_date": "2023-07-18T20:05:13", + "release_date": "2023-08-17T17:29:11", "parties": [ { "type": "person", @@ -965,11 +973,11 @@ "Programming Language :: Python" ], "homepage_url": "https://palletsprojects.com/p/click/", - "download_url": "https://files.pythonhosted.org/packages/72/bd/fedc277e7351917b6c4e0ac751853a97af261278a4c7808babafa8ef2120/click-8.1.6.tar.gz", - "size": 336051, + "download_url": "https://files.pythonhosted.org/packages/96/d3/f04c7bfcf5c1862a2a5b845c6b2b360488cf47af55dfa79c98f6a6bf98b5/click-8.1.7.tar.gz", + "size": 336121, "sha1": null, - "md5": "0ad74cc10856930a76b0560ccc55c162", - "sha256": "48ee849951919527a045bfe3bf7baa8a959c423134e1a5b98c05c20ba75a1cbd", + "md5": "7c3b52c56fd30699f453a7dc7b42cecb", + "sha256": "ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de", "sha512": null, "bug_tracking_url": "https://github.com/pallets/click/issues/", "code_view_url": "https://github.com/pallets/click/", @@ -989,20 +997,20 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/click/8.1.6/json", + "api_data_url": "https://pypi.org/pypi/click/8.1.7/json", "datasource_id": null, - "purl": "pkg:pypi/click@8.1.6" + "purl": "pkg:pypi/click@8.1.7" }, { "type": "pypi", "namespace": null, "name": "cryptography", - "version": "41.0.3", + "version": "41.0.4", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "cryptography is a package which provides cryptographic recipes and primitives to Python developers.\npyca/cryptography\n=================\n\n.. image:: https://img.shields.io/pypi/v/cryptography.svg\n :target: https://pypi.org/project/cryptography/\n :alt: Latest Version\n\n.. image:: https://readthedocs.org/projects/cryptography/badge/?version=latest\n :target: https://cryptography.io\n :alt: Latest Docs\n\n.. image:: https://github.com/pyca/cryptography/workflows/CI/badge.svg?branch=main\n :target: https://github.com/pyca/cryptography/actions?query=workflow%3ACI+branch%3Amain\n\n\n``cryptography`` is a package which provides cryptographic recipes and\nprimitives to Python developers. Our goal is for it to be your \"cryptographic\nstandard library\". It supports Python 3.7+ and PyPy3 7.3.10+.\n\n``cryptography`` includes both high level recipes and low level interfaces to\ncommon cryptographic algorithms such as symmetric ciphers, message digests, and\nkey derivation functions. For example, to encrypt something with\n``cryptography``'s high level symmetric encryption recipe:\n\n.. code-block:: pycon\n\n >>> from cryptography.fernet import Fernet\n >>> # Put this somewhere safe!\n >>> key = Fernet.generate_key()\n >>> f = Fernet(key)\n >>> token = f.encrypt(b\"A really secret message. Not for prying eyes.\")\n >>> token\n b'...'\n >>> f.decrypt(token)\n b'A really secret message. Not for prying eyes.'\n\nYou can find more information in the `documentation`_.\n\nYou can install ``cryptography`` with:\n\n.. code-block:: console\n\n $ pip install cryptography\n\nFor full details see `the installation documentation`_.\n\nDiscussion\n~~~~~~~~~~\n\nIf you run into bugs, you can file them in our `issue tracker`_.\n\nWe maintain a `cryptography-dev`_ mailing list for development discussion.\n\nYou can also join ``#pyca`` on ``irc.libera.chat`` to ask questions or get\ninvolved.\n\nSecurity\n~~~~~~~~\n\nNeed to report a security issue? Please consult our `security reporting`_\ndocumentation.\n\n\n.. _`documentation`: https://cryptography.io/\n.. _`the installation documentation`: https://cryptography.io/en/latest/installation/\n.. _`issue tracker`: https://github.com/pyca/cryptography/issues\n.. _`cryptography-dev`: https://mail.python.org/mailman/listinfo/cryptography-dev\n.. _`security reporting`: https://cryptography.io/en/latest/security/", - "release_date": "2023-08-01T20:35:42", + "release_date": "2023-09-19T16:32:09", "parties": [ { "type": "person", @@ -1034,11 +1042,11 @@ "Topic :: Security :: Cryptography" ], "homepage_url": "", - "download_url": "https://files.pythonhosted.org/packages/21/74/a7ebb5bcf733b1626e4778941e505792d7f655e799ff3bdbd9a176516ee2/cryptography-41.0.3-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", - "size": 4308894, + "download_url": "https://files.pythonhosted.org/packages/25/1d/f86ce362aedc580c3f90c0d74fa097289e3af9ba52b8d5a37369c186b0f1/cryptography-41.0.4-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", + "size": 4381291, "sha1": null, - "md5": "c7fce3b285651310e92cfe5a6e299898", - "sha256": "84537453d57f55a50a5b6835622ee405816999a7113267739a1b4581f83535bd", + "md5": "051e544f02f352ed12a9847ec5f037dc", + "sha256": "e40211b4923ba5a6dc9769eab704bdb3fbb58d56c5b336d30996c24fcf12aadb", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -1059,20 +1067,20 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/cryptography/41.0.3/json", + "api_data_url": "https://pypi.org/pypi/cryptography/41.0.4/json", "datasource_id": null, - "purl": "pkg:pypi/cryptography@41.0.3" + "purl": "pkg:pypi/cryptography@41.0.4" }, { "type": "pypi", "namespace": null, "name": "cryptography", - "version": "41.0.3", + "version": "41.0.4", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "cryptography is a package which provides cryptographic recipes and primitives to Python developers.\npyca/cryptography\n=================\n\n.. image:: https://img.shields.io/pypi/v/cryptography.svg\n :target: https://pypi.org/project/cryptography/\n :alt: Latest Version\n\n.. image:: https://readthedocs.org/projects/cryptography/badge/?version=latest\n :target: https://cryptography.io\n :alt: Latest Docs\n\n.. image:: https://github.com/pyca/cryptography/workflows/CI/badge.svg?branch=main\n :target: https://github.com/pyca/cryptography/actions?query=workflow%3ACI+branch%3Amain\n\n\n``cryptography`` is a package which provides cryptographic recipes and\nprimitives to Python developers. Our goal is for it to be your \"cryptographic\nstandard library\". It supports Python 3.7+ and PyPy3 7.3.10+.\n\n``cryptography`` includes both high level recipes and low level interfaces to\ncommon cryptographic algorithms such as symmetric ciphers, message digests, and\nkey derivation functions. For example, to encrypt something with\n``cryptography``'s high level symmetric encryption recipe:\n\n.. code-block:: pycon\n\n >>> from cryptography.fernet import Fernet\n >>> # Put this somewhere safe!\n >>> key = Fernet.generate_key()\n >>> f = Fernet(key)\n >>> token = f.encrypt(b\"A really secret message. Not for prying eyes.\")\n >>> token\n b'...'\n >>> f.decrypt(token)\n b'A really secret message. Not for prying eyes.'\n\nYou can find more information in the `documentation`_.\n\nYou can install ``cryptography`` with:\n\n.. code-block:: console\n\n $ pip install cryptography\n\nFor full details see `the installation documentation`_.\n\nDiscussion\n~~~~~~~~~~\n\nIf you run into bugs, you can file them in our `issue tracker`_.\n\nWe maintain a `cryptography-dev`_ mailing list for development discussion.\n\nYou can also join ``#pyca`` on ``irc.libera.chat`` to ask questions or get\ninvolved.\n\nSecurity\n~~~~~~~~\n\nNeed to report a security issue? Please consult our `security reporting`_\ndocumentation.\n\n\n.. _`documentation`: https://cryptography.io/\n.. _`the installation documentation`: https://cryptography.io/en/latest/installation/\n.. _`issue tracker`: https://github.com/pyca/cryptography/issues\n.. _`cryptography-dev`: https://mail.python.org/mailman/listinfo/cryptography-dev\n.. _`security reporting`: https://cryptography.io/en/latest/security/", - "release_date": "2023-08-01T20:36:22", + "release_date": "2023-09-19T16:32:46", "parties": [ { "type": "person", @@ -1104,11 +1112,11 @@ "Topic :: Security :: Cryptography" ], "homepage_url": "", - "download_url": "https://files.pythonhosted.org/packages/8e/5d/2bf54672898375d081cb24b30baeb7793568ae5d958ef781349e9635d1c8/cryptography-41.0.3.tar.gz", - "size": 630139, + "download_url": "https://files.pythonhosted.org/packages/ef/33/87512644b788b00a250203382e40ee7040ae6fa6b4c4a31dcfeeaa26043b/cryptography-41.0.4.tar.gz", + "size": 630506, "sha1": null, - "md5": "fbf930acd8de95780604c40c4e817a74", - "sha256": "6d192741113ef5e30d89dcb5b956ef4e1578f304708701b8b73d38e3e1461f34", + "md5": "e53b22d4baae5430e881f2f516effa67", + "sha256": "7febc3094125fc126a7f6fb1f420d0da639f3f32cb15c8ff0dc3997c4549f51a", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -1129,9 +1137,9 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/cryptography/41.0.3/json", + "api_data_url": "https://pypi.org/pypi/cryptography/41.0.4/json", "datasource_id": null, - "purl": "pkg:pypi/cryptography@41.0.3" + "purl": "pkg:pypi/cryptography@41.0.4" }, { "type": "pypi", @@ -2173,12 +2181,12 @@ "type": "pypi", "namespace": null, "name": "typing-extensions", - "version": "4.7.1", + "version": "4.8.0", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "Backported and Experimental Type Hints for Python 3.7+\n# Typing Extensions\n\n[![Chat at https://gitter.im/python/typing](https://badges.gitter.im/python/typing.svg)](https://gitter.im/python/typing)\n\n[Documentation](https://typing-extensions.readthedocs.io/en/latest/#) \u2013\n[PyPI](https://pypi.org/project/typing-extensions/)\n\n## Overview\n\nThe `typing_extensions` module serves two related purposes:\n\n- Enable use of new type system features on older Python versions. For example,\n `typing.TypeGuard` is new in Python 3.10, but `typing_extensions` allows\n users on previous Python versions to use it too.\n- Enable experimentation with new type system PEPs before they are accepted and\n added to the `typing` module.\n\n`typing_extensions` is treated specially by static type checkers such as\nmypy and pyright. Objects defined in `typing_extensions` are treated the same\nway as equivalent forms in `typing`.\n\n`typing_extensions` uses\n[Semantic Versioning](https://semver.org/). The\nmajor version will be incremented only for backwards-incompatible changes.\nTherefore, it's safe to depend\non `typing_extensions` like this: `typing_extensions >=x.y, <(x+1)`,\nwhere `x.y` is the first version that includes all features you need.\n\n`typing_extensions` supports Python versions 3.7 and higher.\n\n## Included items\n\nSee [the documentation](https://typing-extensions.readthedocs.io/en/latest/#) for a\ncomplete listing of module contents.\n\n## Contributing\n\nSee [CONTRIBUTING.md](https://github.com/python/typing_extensions/blob/main/CONTRIBUTING.md)\nfor how to contribute to `typing_extensions`.", - "release_date": "2023-07-02T14:20:53", + "description": "Backported and Experimental Type Hints for Python 3.8+\n# Typing Extensions\n\n[![Chat at https://gitter.im/python/typing](https://badges.gitter.im/python/typing.svg)](https://gitter.im/python/typing)\n\n[Documentation](https://typing-extensions.readthedocs.io/en/latest/#) \u2013\n[PyPI](https://pypi.org/project/typing-extensions/)\n\n## Overview\n\nThe `typing_extensions` module serves two related purposes:\n\n- Enable use of new type system features on older Python versions. For example,\n `typing.TypeGuard` is new in Python 3.10, but `typing_extensions` allows\n users on previous Python versions to use it too.\n- Enable experimentation with new type system PEPs before they are accepted and\n added to the `typing` module.\n\n`typing_extensions` is treated specially by static type checkers such as\nmypy and pyright. Objects defined in `typing_extensions` are treated the same\nway as equivalent forms in `typing`.\n\n`typing_extensions` uses\n[Semantic Versioning](https://semver.org/). The\nmajor version will be incremented only for backwards-incompatible changes.\nTherefore, it's safe to depend\non `typing_extensions` like this: `typing_extensions >=x.y, <(x+1)`,\nwhere `x.y` is the first version that includes all features you need.\n\n## Included items\n\nSee [the documentation](https://typing-extensions.readthedocs.io/en/latest/#) for a\ncomplete listing of module contents.\n\n## Contributing\n\nSee [CONTRIBUTING.md](https://github.com/python/typing_extensions/blob/main/CONTRIBUTING.md)\nfor how to contribute to `typing_extensions`.", + "release_date": "2023-09-18T04:01:55", "parties": [ { "type": "person", @@ -2210,17 +2218,16 @@ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Software Development" ], "homepage_url": "", - "download_url": "https://files.pythonhosted.org/packages/ec/6b/63cc3df74987c36fe26157ee12e09e8f9db4de771e0f3404263117e75b95/typing_extensions-4.7.1-py3-none-any.whl", - "size": 33232, + "download_url": "https://files.pythonhosted.org/packages/24/21/7d397a4b7934ff4028987914ac1044d3b7d52712f30e2ac7a2ae5bc86dd0/typing_extensions-4.8.0-py3-none-any.whl", + "size": 31584, "sha1": null, - "md5": "a9431036b53f8fda2a50a81c2e880848", - "sha256": "440d5dd3af93b060174bf433bccd69b0babc3b15b1a8dca43789fd7f61514b36", + "md5": "9c84e613da80ced7a5e86329ec75dc6c", + "sha256": "8f92fc8806f9a6b641eaa5318da32b44d401efaac0f6678c9bc448ba3605faa0", "sha512": null, "bug_tracking_url": "https://github.com/python/typing_extensions/issues", "code_view_url": null, @@ -2239,20 +2246,20 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/typing-extensions/4.7.1/json", + "api_data_url": "https://pypi.org/pypi/typing-extensions/4.8.0/json", "datasource_id": null, - "purl": "pkg:pypi/typing-extensions@4.7.1" + "purl": "pkg:pypi/typing-extensions@4.8.0" }, { "type": "pypi", "namespace": null, "name": "typing-extensions", - "version": "4.7.1", + "version": "4.8.0", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "Backported and Experimental Type Hints for Python 3.7+\n# Typing Extensions\n\n[![Chat at https://gitter.im/python/typing](https://badges.gitter.im/python/typing.svg)](https://gitter.im/python/typing)\n\n[Documentation](https://typing-extensions.readthedocs.io/en/latest/#) \u2013\n[PyPI](https://pypi.org/project/typing-extensions/)\n\n## Overview\n\nThe `typing_extensions` module serves two related purposes:\n\n- Enable use of new type system features on older Python versions. For example,\n `typing.TypeGuard` is new in Python 3.10, but `typing_extensions` allows\n users on previous Python versions to use it too.\n- Enable experimentation with new type system PEPs before they are accepted and\n added to the `typing` module.\n\n`typing_extensions` is treated specially by static type checkers such as\nmypy and pyright. Objects defined in `typing_extensions` are treated the same\nway as equivalent forms in `typing`.\n\n`typing_extensions` uses\n[Semantic Versioning](https://semver.org/). The\nmajor version will be incremented only for backwards-incompatible changes.\nTherefore, it's safe to depend\non `typing_extensions` like this: `typing_extensions >=x.y, <(x+1)`,\nwhere `x.y` is the first version that includes all features you need.\n\n`typing_extensions` supports Python versions 3.7 and higher.\n\n## Included items\n\nSee [the documentation](https://typing-extensions.readthedocs.io/en/latest/#) for a\ncomplete listing of module contents.\n\n## Contributing\n\nSee [CONTRIBUTING.md](https://github.com/python/typing_extensions/blob/main/CONTRIBUTING.md)\nfor how to contribute to `typing_extensions`.", - "release_date": "2023-07-02T14:20:55", + "description": "Backported and Experimental Type Hints for Python 3.8+\n# Typing Extensions\n\n[![Chat at https://gitter.im/python/typing](https://badges.gitter.im/python/typing.svg)](https://gitter.im/python/typing)\n\n[Documentation](https://typing-extensions.readthedocs.io/en/latest/#) \u2013\n[PyPI](https://pypi.org/project/typing-extensions/)\n\n## Overview\n\nThe `typing_extensions` module serves two related purposes:\n\n- Enable use of new type system features on older Python versions. For example,\n `typing.TypeGuard` is new in Python 3.10, but `typing_extensions` allows\n users on previous Python versions to use it too.\n- Enable experimentation with new type system PEPs before they are accepted and\n added to the `typing` module.\n\n`typing_extensions` is treated specially by static type checkers such as\nmypy and pyright. Objects defined in `typing_extensions` are treated the same\nway as equivalent forms in `typing`.\n\n`typing_extensions` uses\n[Semantic Versioning](https://semver.org/). The\nmajor version will be incremented only for backwards-incompatible changes.\nTherefore, it's safe to depend\non `typing_extensions` like this: `typing_extensions >=x.y, <(x+1)`,\nwhere `x.y` is the first version that includes all features you need.\n\n## Included items\n\nSee [the documentation](https://typing-extensions.readthedocs.io/en/latest/#) for a\ncomplete listing of module contents.\n\n## Contributing\n\nSee [CONTRIBUTING.md](https://github.com/python/typing_extensions/blob/main/CONTRIBUTING.md)\nfor how to contribute to `typing_extensions`.", + "release_date": "2023-09-18T04:01:56", "parties": [ { "type": "person", @@ -2284,17 +2291,16 @@ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Software Development" ], "homepage_url": "", - "download_url": "https://files.pythonhosted.org/packages/3c/8b/0111dd7d6c1478bf83baa1cab85c686426c7a6274119aceb2bd9d35395ad/typing_extensions-4.7.1.tar.gz", - "size": 72876, + "download_url": "https://files.pythonhosted.org/packages/1f/7a/8b94bb016069caa12fc9f587b28080ac33b4fbb8ca369b98bc0a4828543e/typing_extensions-4.8.0.tar.gz", + "size": 71456, "sha1": null, - "md5": "06e7fff4b1d51f8dc6f49b16e71de54e", - "sha256": "b75ddc264f0ba5615db7ba217daeb99701ad295353c45f9e95963337ceeeffb2", + "md5": "74bafe841fbd1c27324afdeb099babdf", + "sha256": "df8e4339e9cb77357558cbdbceca33c303714cf861d1eef15e1070055ae8b7ef", "sha512": null, "bug_tracking_url": "https://github.com/python/typing_extensions/issues", "code_view_url": null, @@ -2313,20 +2319,20 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/typing-extensions/4.7.1/json", + "api_data_url": "https://pypi.org/pypi/typing-extensions/4.8.0/json", "datasource_id": null, - "purl": "pkg:pypi/typing-extensions@4.7.1" + "purl": "pkg:pypi/typing-extensions@4.8.0" }, { "type": "pypi", "namespace": null, "name": "urllib3", - "version": "2.0.4", + "version": "2.0.5", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "HTTP library with thread-safe connection pooling, file post, and more.\n

\n\n![urllib3](https://github.com/urllib3/urllib3/raw/main/docs/_static/banner_github.svg)\n\n

\n\n

\n \"PyPI\n \"Python\n \"Join\n \"Coverage\n \"Build\n \"Documentation
\n \"OpenSSF\n \"SLSA\n \"CII\n

\n\nurllib3 is a powerful, *user-friendly* HTTP client for Python. Much of the\nPython ecosystem already uses urllib3 and you should too.\nurllib3 brings many critical features that are missing from the Python\nstandard libraries:\n\n- Thread safety.\n- Connection pooling.\n- Client-side SSL/TLS verification.\n- File uploads with multipart encoding.\n- Helpers for retrying requests and dealing with HTTP redirects.\n- Support for gzip, deflate, brotli, and zstd encoding.\n- Proxy support for HTTP and SOCKS.\n- 100% test coverage.\n\nurllib3 is powerful and easy to use:\n\n```python3\n>>> import urllib3\n>>> resp = urllib3.request(\"GET\", \"http://httpbin.org/robots.txt\")\n>>> resp.status\n200\n>>> resp.data\nb\"User-agent: *\\nDisallow: /deny\\n\"\n```\n\n## Installing\n\nurllib3 can be installed with [pip](https://pip.pypa.io):\n\n```bash\n$ python -m pip install urllib3\n```\n\nAlternatively, you can grab the latest source code from [GitHub](https://github.com/urllib3/urllib3):\n\n```bash\n$ git clone https://github.com/urllib3/urllib3.git\n$ cd urllib3\n$ pip install .\n```\n\n\n## Documentation\n\nurllib3 has usage and reference documentation at [urllib3.readthedocs.io](https://urllib3.readthedocs.io).\n\n\n## Community\n\nurllib3 has a [community Discord channel](https://discord.gg/urllib3) for asking questions and\ncollaborating with other contributors. Drop by and say hello \ud83d\udc4b\n\n\n## Contributing\n\nurllib3 happily accepts contributions. Please see our\n[contributing documentation](https://urllib3.readthedocs.io/en/latest/contributing.html)\nfor some tips on getting started.\n\n\n## Security Disclosures\n\nTo report a security vulnerability, please use the\n[Tidelift security contact](https://tidelift.com/security).\nTidelift will coordinate the fix and disclosure with maintainers.\n\n\n## Maintainers\n\n- [@sethmlarson](https://github.com/sethmlarson) (Seth M. Larson)\n- [@pquentin](https://github.com/pquentin) (Quentin Pradet)\n- [@theacodes](https://github.com/theacodes) (Thea Flowers)\n- [@haikuginger](https://github.com/haikuginger) (Jess Shapiro)\n- [@lukasa](https://github.com/lukasa) (Cory Benfield)\n- [@sigmavirus24](https://github.com/sigmavirus24) (Ian Stapleton Cordasco)\n- [@shazow](https://github.com/shazow) (Andrey Petrov)\n\n\ud83d\udc4b\n\n\n## Sponsorship\n\nIf your company benefits from this library, please consider [sponsoring its\ndevelopment](https://urllib3.readthedocs.io/en/latest/sponsors.html).\n\n\n## For Enterprise\n\nProfessional support for urllib3 is available as part of the [Tidelift\nSubscription][1]. Tidelift gives software development teams a single source for\npurchasing and maintaining their software, with professional grade assurances\nfrom the experts who know it best, while seamlessly integrating with existing\ntools.\n\n[1]: https://tidelift.com/subscription/pkg/pypi-urllib3?utm_source=pypi-urllib3&utm_medium=referral&utm_campaign=readme", - "release_date": "2023-07-19T15:51:22", + "release_date": "2023-09-20T07:30:33", "parties": [ { "type": "person", @@ -2370,11 +2376,11 @@ "Topic :: Software Development :: Libraries" ], "homepage_url": "", - "download_url": "https://files.pythonhosted.org/packages/9b/81/62fd61001fa4b9d0df6e31d47ff49cfa9de4af03adecf339c7bc30656b37/urllib3-2.0.4-py3-none-any.whl", - "size": 123908, + "download_url": "https://files.pythonhosted.org/packages/37/dc/399e63f5d1d96bb643404ee830657f4dfcf8503f5ba8fa3c6d465d0c57fe/urllib3-2.0.5-py3-none-any.whl", + "size": 123792, "sha1": null, - "md5": "eda5ecb3aab799e705b747d8646ece61", - "sha256": "de7df1803967d2c2a98e4b11bb7d6bd9210474c46e8a0401514e3a42a75ebde4", + "md5": "d7a2bde43ed2ebf36b6e09e01cce0411", + "sha256": "ef16afa8ba34a1f989db38e1dbbe0c302e4289a47856990d0682e374563ce35e", "sha512": null, "bug_tracking_url": null, "code_view_url": "https://github.com/urllib3/urllib3", @@ -2393,20 +2399,20 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/urllib3/2.0.4/json", + "api_data_url": "https://pypi.org/pypi/urllib3/2.0.5/json", "datasource_id": null, - "purl": "pkg:pypi/urllib3@2.0.4" + "purl": "pkg:pypi/urllib3@2.0.5" }, { "type": "pypi", "namespace": null, "name": "urllib3", - "version": "2.0.4", + "version": "2.0.5", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "HTTP library with thread-safe connection pooling, file post, and more.\n

\n\n![urllib3](https://github.com/urllib3/urllib3/raw/main/docs/_static/banner_github.svg)\n\n

\n\n

\n \"PyPI\n \"Python\n \"Join\n \"Coverage\n \"Build\n \"Documentation
\n \"OpenSSF\n \"SLSA\n \"CII\n

\n\nurllib3 is a powerful, *user-friendly* HTTP client for Python. Much of the\nPython ecosystem already uses urllib3 and you should too.\nurllib3 brings many critical features that are missing from the Python\nstandard libraries:\n\n- Thread safety.\n- Connection pooling.\n- Client-side SSL/TLS verification.\n- File uploads with multipart encoding.\n- Helpers for retrying requests and dealing with HTTP redirects.\n- Support for gzip, deflate, brotli, and zstd encoding.\n- Proxy support for HTTP and SOCKS.\n- 100% test coverage.\n\nurllib3 is powerful and easy to use:\n\n```python3\n>>> import urllib3\n>>> resp = urllib3.request(\"GET\", \"http://httpbin.org/robots.txt\")\n>>> resp.status\n200\n>>> resp.data\nb\"User-agent: *\\nDisallow: /deny\\n\"\n```\n\n## Installing\n\nurllib3 can be installed with [pip](https://pip.pypa.io):\n\n```bash\n$ python -m pip install urllib3\n```\n\nAlternatively, you can grab the latest source code from [GitHub](https://github.com/urllib3/urllib3):\n\n```bash\n$ git clone https://github.com/urllib3/urllib3.git\n$ cd urllib3\n$ pip install .\n```\n\n\n## Documentation\n\nurllib3 has usage and reference documentation at [urllib3.readthedocs.io](https://urllib3.readthedocs.io).\n\n\n## Community\n\nurllib3 has a [community Discord channel](https://discord.gg/urllib3) for asking questions and\ncollaborating with other contributors. Drop by and say hello \ud83d\udc4b\n\n\n## Contributing\n\nurllib3 happily accepts contributions. Please see our\n[contributing documentation](https://urllib3.readthedocs.io/en/latest/contributing.html)\nfor some tips on getting started.\n\n\n## Security Disclosures\n\nTo report a security vulnerability, please use the\n[Tidelift security contact](https://tidelift.com/security).\nTidelift will coordinate the fix and disclosure with maintainers.\n\n\n## Maintainers\n\n- [@sethmlarson](https://github.com/sethmlarson) (Seth M. Larson)\n- [@pquentin](https://github.com/pquentin) (Quentin Pradet)\n- [@theacodes](https://github.com/theacodes) (Thea Flowers)\n- [@haikuginger](https://github.com/haikuginger) (Jess Shapiro)\n- [@lukasa](https://github.com/lukasa) (Cory Benfield)\n- [@sigmavirus24](https://github.com/sigmavirus24) (Ian Stapleton Cordasco)\n- [@shazow](https://github.com/shazow) (Andrey Petrov)\n\n\ud83d\udc4b\n\n\n## Sponsorship\n\nIf your company benefits from this library, please consider [sponsoring its\ndevelopment](https://urllib3.readthedocs.io/en/latest/sponsors.html).\n\n\n## For Enterprise\n\nProfessional support for urllib3 is available as part of the [Tidelift\nSubscription][1]. Tidelift gives software development teams a single source for\npurchasing and maintaining their software, with professional grade assurances\nfrom the experts who know it best, while seamlessly integrating with existing\ntools.\n\n[1]: https://tidelift.com/subscription/pkg/pypi-urllib3?utm_source=pypi-urllib3&utm_medium=referral&utm_campaign=readme", - "release_date": "2023-07-19T15:51:23", + "release_date": "2023-09-20T07:30:34", "parties": [ { "type": "person", @@ -2450,11 +2456,11 @@ "Topic :: Software Development :: Libraries" ], "homepage_url": "", - "download_url": "https://files.pythonhosted.org/packages/31/ab/46bec149bbd71a4467a3063ac22f4486ecd2ceb70ae8c70d5d8e4c2a7946/urllib3-2.0.4.tar.gz", - "size": 281517, + "download_url": "https://files.pythonhosted.org/packages/51/13/62cb4a0af89fdf72db4a0ead8026e724c7f3cbf69706d84a4eff439be853/urllib3-2.0.5.tar.gz", + "size": 281697, "sha1": null, - "md5": "5d541b944febe50221e24c31cd6e887d", - "sha256": "8d22f86aae8ef5e410d4f539fde9ce6b2113a001bb4d189e0aed70642d602b11", + "md5": "4d824b7bba1976591fc05fad02fb258d", + "sha256": "13abf37382ea2ce6fb744d4dad67838eec857c9f4f57009891805e0b5e123594", "sha512": null, "bug_tracking_url": null, "code_view_url": "https://github.com/urllib3/urllib3", @@ -2473,18 +2479,18 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/urllib3/2.0.4/json", + "api_data_url": "https://pypi.org/pypi/urllib3/2.0.5/json", "datasource_id": null, - "purl": "pkg:pypi/urllib3@2.0.4" + "purl": "pkg:pypi/urllib3@2.0.5" } ], "resolved_dependencies_graph": [ { - "package": "pkg:pypi/azure-core@1.28.0", + "package": "pkg:pypi/azure-core@1.29.4", "dependencies": [ "pkg:pypi/requests@2.31.0", "pkg:pypi/six@1.16.0", - "pkg:pypi/typing-extensions@4.7.1" + "pkg:pypi/typing-extensions@4.8.0" ] }, { @@ -2494,12 +2500,12 @@ ] }, { - "package": "pkg:pypi/azure-storage-blob@12.17.0", + "package": "pkg:pypi/azure-storage-blob@12.18.1", "dependencies": [ - "pkg:pypi/azure-core@1.28.0", - "pkg:pypi/cryptography@41.0.3", + "pkg:pypi/azure-core@1.29.4", + "pkg:pypi/cryptography@41.0.4", "pkg:pypi/isodate@0.6.1", - "pkg:pypi/typing-extensions@4.7.1" + "pkg:pypi/typing-extensions@4.8.0" ] }, { @@ -2517,11 +2523,11 @@ "dependencies": [] }, { - "package": "pkg:pypi/click@8.1.6", + "package": "pkg:pypi/click@8.1.7", "dependencies": [] }, { - "package": "pkg:pypi/cryptography@41.0.3", + "package": "pkg:pypi/cryptography@41.0.4", "dependencies": [ "pkg:pypi/cffi@1.15.1" ] @@ -2539,7 +2545,7 @@ { "package": "pkg:pypi/msrest@0.7.1", "dependencies": [ - "pkg:pypi/azure-core@1.28.0", + "pkg:pypi/azure-core@1.29.4", "pkg:pypi/certifi@2023.7.22", "pkg:pypi/isodate@0.6.1", "pkg:pypi/requests-oauthlib@1.3.1", @@ -2567,7 +2573,7 @@ "pkg:pypi/certifi@2023.7.22", "pkg:pypi/charset-normalizer@3.2.0", "pkg:pypi/idna@3.4", - "pkg:pypi/urllib3@2.0.4" + "pkg:pypi/urllib3@2.0.5" ] }, { @@ -2575,11 +2581,11 @@ "dependencies": [] }, { - "package": "pkg:pypi/typing-extensions@4.7.1", + "package": "pkg:pypi/typing-extensions@4.8.0", "dependencies": [] }, { - "package": "pkg:pypi/urllib3@2.0.4", + "package": "pkg:pypi/urllib3@2.0.5", "dependencies": [] } ] diff --git a/tests/data/environment-marker-test-requirements.txt-expected.json b/tests/data/environment-marker-test-requirements.txt-expected.json index 9ea777a..ee4e40e 100644 --- a/tests/data/environment-marker-test-requirements.txt-expected.json +++ b/tests/data/environment-marker-test-requirements.txt-expected.json @@ -4,7 +4,7 @@ "tool_homepageurl": "https://github.com/nexB/python-inspector", "tool_version": "0.9.8", "options": [ - "--requirement /home/tg1999/Desktop/example/tools/python-inspector/tests/data/environment-marker-test-requirements.txt", + "--requirement /home/frank/sources/github/nexB/python-inspector/tests/data/environment-marker-test-requirements.txt", "--index-url https://pypi.org/simple", "--python-version 37", "--operating-system linux", @@ -17,7 +17,7 @@ "files": [ { "type": "file", - "path": "/home/tg1999/Desktop/example/tools/python-inspector/tests/data/environment-marker-test-requirements.txt", + "path": "/home/frank/sources/github/nexB/python-inspector/tests/data/environment-marker-test-requirements.txt", "package_data": [ { "type": "pypi", diff --git a/tests/data/frozen-requirements.txt-expected.json b/tests/data/frozen-requirements.txt-expected.json index 0dded3b..88a1d48 100644 --- a/tests/data/frozen-requirements.txt-expected.json +++ b/tests/data/frozen-requirements.txt-expected.json @@ -4,7 +4,7 @@ "tool_homepageurl": "https://github.com/nexB/python-inspector", "tool_version": "0.9.8", "options": [ - "--requirement /home/tg1999/Desktop/example/tools/python-inspector/tests/data/frozen-requirements.txt", + "--requirement /home/frank/sources/github/nexB/python-inspector/tests/data/frozen-requirements.txt", "--index-url https://pypi.org/simple", "--python-version 38", "--operating-system linux", @@ -17,7 +17,7 @@ "files": [ { "type": "file", - "path": "/home/tg1999/Desktop/example/tools/python-inspector/tests/data/frozen-requirements.txt", + "path": "/home/frank/sources/github/nexB/python-inspector/tests/data/frozen-requirements.txt", "package_data": [ { "type": "pypi", diff --git a/tests/data/insecure-setup-2/setup.py-expected.json b/tests/data/insecure-setup-2/setup.py-expected.json index ce59933..d9d4043 100644 --- a/tests/data/insecure-setup-2/setup.py-expected.json +++ b/tests/data/insecure-setup-2/setup.py-expected.json @@ -16,7 +16,7 @@ "files": [ { "type": "file", - "path": "/home/tg1999/Desktop/example/tools/python-inspector/tests/data/insecure-setup-2/setup.py", + "path": "/home/frank/sources/github/nexB/python-inspector/tests/data/insecure-setup-2/setup.py", "package_data": [ { "type": "pypi", @@ -6556,12 +6556,12 @@ "type": "pypi", "namespace": null, "name": "pytz", - "version": "2023.3", + "version": "2023.3.post1", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "World timezone definitions, modern and historical\npytz - World Timezone Definitions for Python\n============================================\n\n:Author: Stuart Bishop \n\nIntroduction\n~~~~~~~~~~~~\n\npytz brings the Olson tz database into Python. This library allows\naccurate and cross platform timezone calculations using Python 2.4\nor higher. It also solves the issue of ambiguous times at the end\nof daylight saving time, which you can read more about in the Python\nLibrary Reference (``datetime.tzinfo``).\n\nAlmost all of the Olson timezones are supported.\n\n.. note::\n\n Projects using Python 3.9 or later should be using the support\n now included as part of the standard library, and third party\n packages work with it such as `tzdata `_.\n pytz offers no advantages beyond backwards compatibility with\n code written for earlier versions of Python.\n\n.. note::\n\n This library differs from the documented Python API for\n tzinfo implementations; if you want to create local wallclock\n times you need to use the ``localize()`` method documented in this\n document. In addition, if you perform date arithmetic on local\n times that cross DST boundaries, the result may be in an incorrect\n timezone (ie. subtract 1 minute from 2002-10-27 1:00 EST and you get\n 2002-10-27 0:59 EST instead of the correct 2002-10-27 1:59 EDT). A\n ``normalize()`` method is provided to correct this. Unfortunately these\n issues cannot be resolved without modifying the Python datetime\n implementation (see PEP-431).\n\n\nInstallation\n~~~~~~~~~~~~\n\nThis package can either be installed using ``pip`` or from a tarball using the\nstandard Python distutils.\n\nIf you are installing using ``pip``, you don't need to download anything as the\nlatest version will be downloaded for you from PyPI::\n\n pip install pytz\n\nIf you are installing from a tarball, run the following command as an\nadministrative user::\n\n python setup.py install\n\n\npytz for Enterprise\n~~~~~~~~~~~~~~~~~~~\n\nAvailable as part of the Tidelift Subscription.\n\nThe maintainers of pytz and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. `Learn more. `_.\n\n\nExample & Usage\n~~~~~~~~~~~~~~~\n\nLocalized times and date arithmetic\n-----------------------------------\n\n>>> from datetime import datetime, timedelta\n>>> from pytz import timezone\n>>> import pytz\n>>> utc = pytz.utc\n>>> utc.zone\n'UTC'\n>>> eastern = timezone('US/Eastern')\n>>> eastern.zone\n'US/Eastern'\n>>> amsterdam = timezone('Europe/Amsterdam')\n>>> fmt = '%Y-%m-%d %H:%M:%S %Z%z'\n\nThis library only supports two ways of building a localized time. The\nfirst is to use the ``localize()`` method provided by the pytz library.\nThis is used to localize a naive datetime (datetime with no timezone\ninformation):\n\n>>> loc_dt = eastern.localize(datetime(2002, 10, 27, 6, 0, 0))\n>>> print(loc_dt.strftime(fmt))\n2002-10-27 06:00:00 EST-0500\n\nThe second way of building a localized time is by converting an existing\nlocalized time using the standard ``astimezone()`` method:\n\n>>> ams_dt = loc_dt.astimezone(amsterdam)\n>>> ams_dt.strftime(fmt)\n'2002-10-27 12:00:00 CET+0100'\n\nUnfortunately using the tzinfo argument of the standard datetime\nconstructors ''does not work'' with pytz for many timezones.\n\n>>> datetime(2002, 10, 27, 12, 0, 0, tzinfo=amsterdam).strftime(fmt) # /!\\ Does not work this way!\n'2002-10-27 12:00:00 LMT+0018'\n\nIt is safe for timezones without daylight saving transitions though, such\nas UTC:\n\n>>> datetime(2002, 10, 27, 12, 0, 0, tzinfo=pytz.utc).strftime(fmt) # /!\\ Not recommended except for UTC\n'2002-10-27 12:00:00 UTC+0000'\n\nThe preferred way of dealing with times is to always work in UTC,\nconverting to localtime only when generating output to be read\nby humans.\n\n>>> utc_dt = datetime(2002, 10, 27, 6, 0, 0, tzinfo=utc)\n>>> loc_dt = utc_dt.astimezone(eastern)\n>>> loc_dt.strftime(fmt)\n'2002-10-27 01:00:00 EST-0500'\n\nThis library also allows you to do date arithmetic using local\ntimes, although it is more complicated than working in UTC as you\nneed to use the ``normalize()`` method to handle daylight saving time\nand other timezone transitions. In this example, ``loc_dt`` is set\nto the instant when daylight saving time ends in the US/Eastern\ntimezone.\n\n>>> before = loc_dt - timedelta(minutes=10)\n>>> before.strftime(fmt)\n'2002-10-27 00:50:00 EST-0500'\n>>> eastern.normalize(before).strftime(fmt)\n'2002-10-27 01:50:00 EDT-0400'\n>>> after = eastern.normalize(before + timedelta(minutes=20))\n>>> after.strftime(fmt)\n'2002-10-27 01:10:00 EST-0500'\n\nCreating local times is also tricky, and the reason why working with\nlocal times is not recommended. Unfortunately, you cannot just pass\na ``tzinfo`` argument when constructing a datetime (see the next\nsection for more details)\n\n>>> dt = datetime(2002, 10, 27, 1, 30, 0)\n>>> dt1 = eastern.localize(dt, is_dst=True)\n>>> dt1.strftime(fmt)\n'2002-10-27 01:30:00 EDT-0400'\n>>> dt2 = eastern.localize(dt, is_dst=False)\n>>> dt2.strftime(fmt)\n'2002-10-27 01:30:00 EST-0500'\n\nConverting between timezones is more easily done, using the\nstandard astimezone method.\n\n>>> utc_dt = utc.localize(datetime.utcfromtimestamp(1143408899))\n>>> utc_dt.strftime(fmt)\n'2006-03-26 21:34:59 UTC+0000'\n>>> au_tz = timezone('Australia/Sydney')\n>>> au_dt = utc_dt.astimezone(au_tz)\n>>> au_dt.strftime(fmt)\n'2006-03-27 08:34:59 AEDT+1100'\n>>> utc_dt2 = au_dt.astimezone(utc)\n>>> utc_dt2.strftime(fmt)\n'2006-03-26 21:34:59 UTC+0000'\n>>> utc_dt == utc_dt2\nTrue\n\nYou can take shortcuts when dealing with the UTC side of timezone\nconversions. ``normalize()`` and ``localize()`` are not really\nnecessary when there are no daylight saving time transitions to\ndeal with.\n\n>>> utc_dt = datetime.utcfromtimestamp(1143408899).replace(tzinfo=utc)\n>>> utc_dt.strftime(fmt)\n'2006-03-26 21:34:59 UTC+0000'\n>>> au_tz = timezone('Australia/Sydney')\n>>> au_dt = au_tz.normalize(utc_dt.astimezone(au_tz))\n>>> au_dt.strftime(fmt)\n'2006-03-27 08:34:59 AEDT+1100'\n>>> utc_dt2 = au_dt.astimezone(utc)\n>>> utc_dt2.strftime(fmt)\n'2006-03-26 21:34:59 UTC+0000'\n\n\n``tzinfo`` API\n--------------\n\nThe ``tzinfo`` instances returned by the ``timezone()`` function have\nbeen extended to cope with ambiguous times by adding an ``is_dst``\nparameter to the ``utcoffset()``, ``dst()`` && ``tzname()`` methods.\n\n>>> tz = timezone('America/St_Johns')\n\n>>> normal = datetime(2009, 9, 1)\n>>> ambiguous = datetime(2009, 10, 31, 23, 30)\n\nThe ``is_dst`` parameter is ignored for most timestamps. It is only used\nduring DST transition ambiguous periods to resolve that ambiguity.\n\n>>> print(tz.utcoffset(normal, is_dst=True))\n-1 day, 21:30:00\n>>> print(tz.dst(normal, is_dst=True))\n1:00:00\n>>> tz.tzname(normal, is_dst=True)\n'NDT'\n\n>>> print(tz.utcoffset(ambiguous, is_dst=True))\n-1 day, 21:30:00\n>>> print(tz.dst(ambiguous, is_dst=True))\n1:00:00\n>>> tz.tzname(ambiguous, is_dst=True)\n'NDT'\n\n>>> print(tz.utcoffset(normal, is_dst=False))\n-1 day, 21:30:00\n>>> tz.dst(normal, is_dst=False).seconds\n3600\n>>> tz.tzname(normal, is_dst=False)\n'NDT'\n\n>>> print(tz.utcoffset(ambiguous, is_dst=False))\n-1 day, 20:30:00\n>>> tz.dst(ambiguous, is_dst=False)\ndatetime.timedelta(0)\n>>> tz.tzname(ambiguous, is_dst=False)\n'NST'\n\nIf ``is_dst`` is not specified, ambiguous timestamps will raise\nan ``pytz.exceptions.AmbiguousTimeError`` exception.\n\n>>> print(tz.utcoffset(normal))\n-1 day, 21:30:00\n>>> print(tz.dst(normal))\n1:00:00\n>>> tz.tzname(normal)\n'NDT'\n\n>>> import pytz.exceptions\n>>> try:\n... tz.utcoffset(ambiguous)\n... except pytz.exceptions.AmbiguousTimeError:\n... print('pytz.exceptions.AmbiguousTimeError: %s' % ambiguous)\npytz.exceptions.AmbiguousTimeError: 2009-10-31 23:30:00\n>>> try:\n... tz.dst(ambiguous)\n... except pytz.exceptions.AmbiguousTimeError:\n... print('pytz.exceptions.AmbiguousTimeError: %s' % ambiguous)\npytz.exceptions.AmbiguousTimeError: 2009-10-31 23:30:00\n>>> try:\n... tz.tzname(ambiguous)\n... except pytz.exceptions.AmbiguousTimeError:\n... print('pytz.exceptions.AmbiguousTimeError: %s' % ambiguous)\npytz.exceptions.AmbiguousTimeError: 2009-10-31 23:30:00\n\n\nProblems with Localtime\n~~~~~~~~~~~~~~~~~~~~~~~\n\nThe major problem we have to deal with is that certain datetimes\nmay occur twice in a year. For example, in the US/Eastern timezone\non the last Sunday morning in October, the following sequence\nhappens:\n\n - 01:00 EDT occurs\n - 1 hour later, instead of 2:00am the clock is turned back 1 hour\n and 01:00 happens again (this time 01:00 EST)\n\nIn fact, every instant between 01:00 and 02:00 occurs twice. This means\nthat if you try and create a time in the 'US/Eastern' timezone\nthe standard datetime syntax, there is no way to specify if you meant\nbefore of after the end-of-daylight-saving-time transition. Using the\npytz custom syntax, the best you can do is make an educated guess:\n\n>>> loc_dt = eastern.localize(datetime(2002, 10, 27, 1, 30, 00))\n>>> loc_dt.strftime(fmt)\n'2002-10-27 01:30:00 EST-0500'\n\nAs you can see, the system has chosen one for you and there is a 50%\nchance of it being out by one hour. For some applications, this does\nnot matter. However, if you are trying to schedule meetings with people\nin different timezones or analyze log files it is not acceptable.\n\nThe best and simplest solution is to stick with using UTC. The pytz\npackage encourages using UTC for internal timezone representation by\nincluding a special UTC implementation based on the standard Python\nreference implementation in the Python documentation.\n\nThe UTC timezone unpickles to be the same instance, and pickles to a\nsmaller size than other pytz tzinfo instances. The UTC implementation\ncan be obtained as pytz.utc, pytz.UTC, or pytz.timezone('UTC').\n\n>>> import pickle, pytz\n>>> dt = datetime(2005, 3, 1, 14, 13, 21, tzinfo=utc)\n>>> naive = dt.replace(tzinfo=None)\n>>> p = pickle.dumps(dt, 1)\n>>> naive_p = pickle.dumps(naive, 1)\n>>> len(p) - len(naive_p)\n17\n>>> new = pickle.loads(p)\n>>> new == dt\nTrue\n>>> new is dt\nFalse\n>>> new.tzinfo is dt.tzinfo\nTrue\n>>> pytz.utc is pytz.UTC is pytz.timezone('UTC')\nTrue\n\nNote that some other timezones are commonly thought of as the same (GMT,\nGreenwich, Universal, etc.). The definition of UTC is distinct from these\nother timezones, and they are not equivalent. For this reason, they will\nnot compare the same in Python.\n\n>>> utc == pytz.timezone('GMT')\nFalse\n\nSee the section `What is UTC`_, below.\n\nIf you insist on working with local times, this library provides a\nfacility for constructing them unambiguously:\n\n>>> loc_dt = datetime(2002, 10, 27, 1, 30, 00)\n>>> est_dt = eastern.localize(loc_dt, is_dst=True)\n>>> edt_dt = eastern.localize(loc_dt, is_dst=False)\n>>> print(est_dt.strftime(fmt) + ' / ' + edt_dt.strftime(fmt))\n2002-10-27 01:30:00 EDT-0400 / 2002-10-27 01:30:00 EST-0500\n\nIf you pass None as the is_dst flag to localize(), pytz will refuse to\nguess and raise exceptions if you try to build ambiguous or non-existent\ntimes.\n\nFor example, 1:30am on 27th Oct 2002 happened twice in the US/Eastern\ntimezone when the clocks where put back at the end of Daylight Saving\nTime:\n\n>>> dt = datetime(2002, 10, 27, 1, 30, 00)\n>>> try:\n... eastern.localize(dt, is_dst=None)\n... except pytz.exceptions.AmbiguousTimeError:\n... print('pytz.exceptions.AmbiguousTimeError: %s' % dt)\npytz.exceptions.AmbiguousTimeError: 2002-10-27 01:30:00\n\nSimilarly, 2:30am on 7th April 2002 never happened at all in the\nUS/Eastern timezone, as the clocks where put forward at 2:00am skipping\nthe entire hour:\n\n>>> dt = datetime(2002, 4, 7, 2, 30, 00)\n>>> try:\n... eastern.localize(dt, is_dst=None)\n... except pytz.exceptions.NonExistentTimeError:\n... print('pytz.exceptions.NonExistentTimeError: %s' % dt)\npytz.exceptions.NonExistentTimeError: 2002-04-07 02:30:00\n\nBoth of these exceptions share a common base class to make error handling\neasier:\n\n>>> isinstance(pytz.AmbiguousTimeError(), pytz.InvalidTimeError)\nTrue\n>>> isinstance(pytz.NonExistentTimeError(), pytz.InvalidTimeError)\nTrue\n\n\nA special case is where countries change their timezone definitions\nwith no daylight savings time switch. For example, in 1915 Warsaw\nswitched from Warsaw time to Central European time with no daylight savings\ntransition. So at the stroke of midnight on August 5th 1915 the clocks\nwere wound back 24 minutes creating an ambiguous time period that cannot\nbe specified without referring to the timezone abbreviation or the\nactual UTC offset. In this case midnight happened twice, neither time\nduring a daylight saving time period. pytz handles this transition by\ntreating the ambiguous period before the switch as daylight savings\ntime, and the ambiguous period after as standard time.\n\n\n>>> warsaw = pytz.timezone('Europe/Warsaw')\n>>> amb_dt1 = warsaw.localize(datetime(1915, 8, 4, 23, 59, 59), is_dst=True)\n>>> amb_dt1.strftime(fmt)\n'1915-08-04 23:59:59 WMT+0124'\n>>> amb_dt2 = warsaw.localize(datetime(1915, 8, 4, 23, 59, 59), is_dst=False)\n>>> amb_dt2.strftime(fmt)\n'1915-08-04 23:59:59 CET+0100'\n>>> switch_dt = warsaw.localize(datetime(1915, 8, 5, 00, 00, 00), is_dst=False)\n>>> switch_dt.strftime(fmt)\n'1915-08-05 00:00:00 CET+0100'\n>>> str(switch_dt - amb_dt1)\n'0:24:01'\n>>> str(switch_dt - amb_dt2)\n'0:00:01'\n\nThe best way of creating a time during an ambiguous time period is\nby converting from another timezone such as UTC:\n\n>>> utc_dt = datetime(1915, 8, 4, 22, 36, tzinfo=pytz.utc)\n>>> utc_dt.astimezone(warsaw).strftime(fmt)\n'1915-08-04 23:36:00 CET+0100'\n\nThe standard Python way of handling all these ambiguities is not to\nhandle them, such as demonstrated in this example using the US/Eastern\ntimezone definition from the Python documentation (Note that this\nimplementation only works for dates between 1987 and 2006 - it is\nincluded for tests only!):\n\n>>> from pytz.reference import Eastern # pytz.reference only for tests\n>>> dt = datetime(2002, 10, 27, 0, 30, tzinfo=Eastern)\n>>> str(dt)\n'2002-10-27 00:30:00-04:00'\n>>> str(dt + timedelta(hours=1))\n'2002-10-27 01:30:00-05:00'\n>>> str(dt + timedelta(hours=2))\n'2002-10-27 02:30:00-05:00'\n>>> str(dt + timedelta(hours=3))\n'2002-10-27 03:30:00-05:00'\n\nNotice the first two results? At first glance you might think they are\ncorrect, but taking the UTC offset into account you find that they are\nactually two hours appart instead of the 1 hour we asked for.\n\n>>> from pytz.reference import UTC # pytz.reference only for tests\n>>> str(dt.astimezone(UTC))\n'2002-10-27 04:30:00+00:00'\n>>> str((dt + timedelta(hours=1)).astimezone(UTC))\n'2002-10-27 06:30:00+00:00'\n\n\nCountry Information\n~~~~~~~~~~~~~~~~~~~\n\nA mechanism is provided to access the timezones commonly in use\nfor a particular country, looked up using the ISO 3166 country code.\nIt returns a list of strings that can be used to retrieve the relevant\ntzinfo instance using ``pytz.timezone()``:\n\n>>> print(' '.join(pytz.country_timezones['nz']))\nPacific/Auckland Pacific/Chatham\n\nThe Olson database comes with a ISO 3166 country code to English country\nname mapping that pytz exposes as a dictionary:\n\n>>> print(pytz.country_names['nz'])\nNew Zealand\n\n\nWhat is UTC\n~~~~~~~~~~~\n\n'UTC' is `Coordinated Universal Time`_. It is a successor to, but distinct\nfrom, Greenwich Mean Time (GMT) and the various definitions of Universal\nTime. UTC is now the worldwide standard for regulating clocks and time\nmeasurement.\n\nAll other timezones are defined relative to UTC, and include offsets like\nUTC+0800 - hours to add or subtract from UTC to derive the local time. No\ndaylight saving time occurs in UTC, making it a useful timezone to perform\ndate arithmetic without worrying about the confusion and ambiguities caused\nby daylight saving time transitions, your country changing its timezone, or\nmobile computers that roam through multiple timezones.\n\n.. _Coordinated Universal Time: https://en.wikipedia.org/wiki/Coordinated_Universal_Time\n\n\nHelpers\n~~~~~~~\n\nThere are two lists of timezones provided.\n\n``all_timezones`` is the exhaustive list of the timezone names that can\nbe used.\n\n>>> from pytz import all_timezones\n>>> len(all_timezones) >= 500\nTrue\n>>> 'Etc/Greenwich' in all_timezones\nTrue\n\n``common_timezones`` is a list of useful, current timezones. It doesn't\ncontain deprecated zones or historical zones, except for a few I've\ndeemed in common usage, such as US/Eastern (open a bug report if you\nthink other timezones are deserving of being included here). It is also\na sequence of strings.\n\n>>> from pytz import common_timezones\n>>> len(common_timezones) < len(all_timezones)\nTrue\n>>> 'Etc/Greenwich' in common_timezones\nFalse\n>>> 'Australia/Melbourne' in common_timezones\nTrue\n>>> 'US/Eastern' in common_timezones\nTrue\n>>> 'Canada/Eastern' in common_timezones\nTrue\n>>> 'Australia/Yancowinna' in all_timezones\nTrue\n>>> 'Australia/Yancowinna' in common_timezones\nFalse\n\nBoth ``common_timezones`` and ``all_timezones`` are alphabetically\nsorted:\n\n>>> common_timezones_dupe = common_timezones[:]\n>>> common_timezones_dupe.sort()\n>>> common_timezones == common_timezones_dupe\nTrue\n>>> all_timezones_dupe = all_timezones[:]\n>>> all_timezones_dupe.sort()\n>>> all_timezones == all_timezones_dupe\nTrue\n\n``all_timezones`` and ``common_timezones`` are also available as sets.\n\n>>> from pytz import all_timezones_set, common_timezones_set\n>>> 'US/Eastern' in all_timezones_set\nTrue\n>>> 'US/Eastern' in common_timezones_set\nTrue\n>>> 'Australia/Victoria' in common_timezones_set\nFalse\n\nYou can also retrieve lists of timezones used by particular countries\nusing the ``country_timezones()`` function. It requires an ISO-3166\ntwo letter country code.\n\n>>> from pytz import country_timezones\n>>> print(' '.join(country_timezones('ch')))\nEurope/Zurich\n>>> print(' '.join(country_timezones('CH')))\nEurope/Zurich\n\n\nInternationalization - i18n/l10n\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nPytz is an interface to the IANA database, which uses ASCII names. The `Unicode Consortium's Unicode Locales (CLDR) `_\nproject provides translations. Python packages such as\n`Babel `_\nand Thomas Khyn's `l18n `_ package can be used\nto access these translations from Python.\n\n\nLicense\n~~~~~~~\n\nMIT license.\n\nThis code is also available as part of Zope 3 under the Zope Public\nLicense, Version 2.1 (ZPL).\n\nI'm happy to relicense this code if necessary for inclusion in other\nopen source projects.\n\n\nLatest Versions\n~~~~~~~~~~~~~~~\n\nThis package will be updated after releases of the Olson timezone\ndatabase. The latest version can be downloaded from the `Python Package\nIndex `_. The code that is used\nto generate this distribution is hosted on Github and available\nusing git::\n\n git clone https://github.com/stub42/pytz.git\n\nAnnouncements of new releases are made on\n`Launchpad `_, and the\n`Atom feed `_\nhosted there.\n\n\nBugs, Feature Requests & Patches\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nBugs should be reported on `Github `_.\nFeature requests are unlikely to be considered, and efforts instead directed\nto timezone support now built into Python or packages that work with it.\n\n\nSecurity Issues\n~~~~~~~~~~~~~~~\n\nReports about security issues can be made via `Tidelift `_.\n\n\nIssues & Limitations\n~~~~~~~~~~~~~~~~~~~~\n\n- This project is in maintenance mode. Projects using Python 3.9 or later\n are best served by using the timezone functionaly now included in core\n Python and packages that work with it such as `tzdata `_.\n\n- Offsets from UTC are rounded to the nearest whole minute, so timezones\n such as Europe/Amsterdam pre 1937 will be up to 30 seconds out. This\n was a limitation of the Python datetime library.\n\n- If you think a timezone definition is incorrect, I probably can't fix\n it. pytz is a direct translation of the Olson timezone database, and\n changes to the timezone definitions need to be made to this source.\n If you find errors they should be reported to the time zone mailing\n list, linked from http://www.iana.org/time-zones.\n\n\nFurther Reading\n~~~~~~~~~~~~~~~\n\nMore info than you want to know about timezones:\nhttps://data.iana.org/time-zones/tz-link.html\n\n\nContact\n~~~~~~~\n\nStuart Bishop ", - "release_date": "2023-03-29T04:23:25", + "description": "World timezone definitions, modern and historical\npytz - World Timezone Definitions for Python\n============================================\n\n:Author: Stuart Bishop \n\nIntroduction\n~~~~~~~~~~~~\n\npytz brings the Olson tz database into Python. This library allows\naccurate and cross platform timezone calculations using Python 2.4\nor higher. It also solves the issue of ambiguous times at the end\nof daylight saving time, which you can read more about in the Python\nLibrary Reference (``datetime.tzinfo``).\n\nAlmost all of the Olson timezones are supported.\n\n.. note::\n\n Projects using Python 3.9 or later should be using the support\n now included as part of the standard library, and third party\n packages work with it such as `tzdata `_.\n pytz offers no advantages beyond backwards compatibility with\n code written for earlier versions of Python.\n\n.. note::\n\n This library differs from the documented Python API for\n tzinfo implementations; if you want to create local wallclock\n times you need to use the ``localize()`` method documented in this\n document. In addition, if you perform date arithmetic on local\n times that cross DST boundaries, the result may be in an incorrect\n timezone (ie. subtract 1 minute from 2002-10-27 1:00 EST and you get\n 2002-10-27 0:59 EST instead of the correct 2002-10-27 1:59 EDT). A\n ``normalize()`` method is provided to correct this. Unfortunately these\n issues cannot be resolved without modifying the Python datetime\n implementation (see PEP-431).\n\n\nInstallation\n~~~~~~~~~~~~\n\nThis package can either be installed using ``pip`` or from a tarball using the\nstandard Python distutils.\n\nIf you are installing using ``pip``, you don't need to download anything as the\nlatest version will be downloaded for you from PyPI::\n\n pip install pytz\n\nIf you are installing from a tarball, run the following command as an\nadministrative user::\n\n python setup.py install\n\n\npytz for Enterprise\n~~~~~~~~~~~~~~~~~~~\n\nAvailable as part of the Tidelift Subscription.\n\nThe maintainers of pytz and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. `Learn more. `_.\n\n\nExample & Usage\n~~~~~~~~~~~~~~~\n\nLocalized times and date arithmetic\n-----------------------------------\n\n>>> from datetime import datetime, timedelta\n>>> from pytz import timezone\n>>> import pytz\n>>> utc = pytz.utc\n>>> utc.zone\n'UTC'\n>>> eastern = timezone('US/Eastern')\n>>> eastern.zone\n'US/Eastern'\n>>> amsterdam = timezone('Europe/Amsterdam')\n>>> fmt = '%Y-%m-%d %H:%M:%S %Z%z'\n\nThis library only supports two ways of building a localized time. The\nfirst is to use the ``localize()`` method provided by the pytz library.\nThis is used to localize a naive datetime (datetime with no timezone\ninformation):\n\n>>> loc_dt = eastern.localize(datetime(2002, 10, 27, 6, 0, 0))\n>>> print(loc_dt.strftime(fmt))\n2002-10-27 06:00:00 EST-0500\n\nThe second way of building a localized time is by converting an existing\nlocalized time using the standard ``astimezone()`` method:\n\n>>> ams_dt = loc_dt.astimezone(amsterdam)\n>>> ams_dt.strftime(fmt)\n'2002-10-27 12:00:00 CET+0100'\n\nUnfortunately using the tzinfo argument of the standard datetime\nconstructors ''does not work'' with pytz for many timezones.\n\n>>> datetime(2002, 10, 27, 12, 0, 0, tzinfo=amsterdam).strftime(fmt) # /!\\ Does not work this way!\n'2002-10-27 12:00:00 LMT+0018'\n\nIt is safe for timezones without daylight saving transitions though, such\nas UTC:\n\n>>> datetime(2002, 10, 27, 12, 0, 0, tzinfo=pytz.utc).strftime(fmt) # /!\\ Not recommended except for UTC\n'2002-10-27 12:00:00 UTC+0000'\n\nThe preferred way of dealing with times is to always work in UTC,\nconverting to localtime only when generating output to be read\nby humans.\n\n>>> utc_dt = datetime(2002, 10, 27, 6, 0, 0, tzinfo=utc)\n>>> loc_dt = utc_dt.astimezone(eastern)\n>>> loc_dt.strftime(fmt)\n'2002-10-27 01:00:00 EST-0500'\n\nThis library also allows you to do date arithmetic using local\ntimes, although it is more complicated than working in UTC as you\nneed to use the ``normalize()`` method to handle daylight saving time\nand other timezone transitions. In this example, ``loc_dt`` is set\nto the instant when daylight saving time ends in the US/Eastern\ntimezone.\n\n>>> before = loc_dt - timedelta(minutes=10)\n>>> before.strftime(fmt)\n'2002-10-27 00:50:00 EST-0500'\n>>> eastern.normalize(before).strftime(fmt)\n'2002-10-27 01:50:00 EDT-0400'\n>>> after = eastern.normalize(before + timedelta(minutes=20))\n>>> after.strftime(fmt)\n'2002-10-27 01:10:00 EST-0500'\n\nCreating local times is also tricky, and the reason why working with\nlocal times is not recommended. Unfortunately, you cannot just pass\na ``tzinfo`` argument when constructing a datetime (see the next\nsection for more details)\n\n>>> dt = datetime(2002, 10, 27, 1, 30, 0)\n>>> dt1 = eastern.localize(dt, is_dst=True)\n>>> dt1.strftime(fmt)\n'2002-10-27 01:30:00 EDT-0400'\n>>> dt2 = eastern.localize(dt, is_dst=False)\n>>> dt2.strftime(fmt)\n'2002-10-27 01:30:00 EST-0500'\n\nConverting between timezones is more easily done, using the\nstandard astimezone method.\n\n>>> utc_dt = datetime.fromtimestamp(1143408899, tz=utc)\n>>> utc_dt.strftime(fmt)\n'2006-03-26 21:34:59 UTC+0000'\n>>> au_tz = timezone('Australia/Sydney')\n>>> au_dt = utc_dt.astimezone(au_tz)\n>>> au_dt.strftime(fmt)\n'2006-03-27 08:34:59 AEDT+1100'\n>>> utc_dt2 = au_dt.astimezone(utc)\n>>> utc_dt2.strftime(fmt)\n'2006-03-26 21:34:59 UTC+0000'\n>>> utc_dt == utc_dt2\nTrue\n\nYou can take shortcuts when dealing with the UTC side of timezone\nconversions. ``normalize()`` and ``localize()`` are not really\nnecessary when there are no daylight saving time transitions to\ndeal with.\n\n>>> utc_dt = datetime.fromtimestamp(1143408899, tz=utc)\n>>> utc_dt.strftime(fmt)\n'2006-03-26 21:34:59 UTC+0000'\n>>> au_tz = timezone('Australia/Sydney')\n>>> au_dt = au_tz.normalize(utc_dt.astimezone(au_tz))\n>>> au_dt.strftime(fmt)\n'2006-03-27 08:34:59 AEDT+1100'\n>>> utc_dt2 = au_dt.astimezone(utc)\n>>> utc_dt2.strftime(fmt)\n'2006-03-26 21:34:59 UTC+0000'\n\n\n``tzinfo`` API\n--------------\n\nThe ``tzinfo`` instances returned by the ``timezone()`` function have\nbeen extended to cope with ambiguous times by adding an ``is_dst``\nparameter to the ``utcoffset()``, ``dst()`` && ``tzname()`` methods.\n\n>>> tz = timezone('America/St_Johns')\n\n>>> normal = datetime(2009, 9, 1)\n>>> ambiguous = datetime(2009, 10, 31, 23, 30)\n\nThe ``is_dst`` parameter is ignored for most timestamps. It is only used\nduring DST transition ambiguous periods to resolve that ambiguity.\n\n>>> print(tz.utcoffset(normal, is_dst=True))\n-1 day, 21:30:00\n>>> print(tz.dst(normal, is_dst=True))\n1:00:00\n>>> tz.tzname(normal, is_dst=True)\n'NDT'\n\n>>> print(tz.utcoffset(ambiguous, is_dst=True))\n-1 day, 21:30:00\n>>> print(tz.dst(ambiguous, is_dst=True))\n1:00:00\n>>> tz.tzname(ambiguous, is_dst=True)\n'NDT'\n\n>>> print(tz.utcoffset(normal, is_dst=False))\n-1 day, 21:30:00\n>>> tz.dst(normal, is_dst=False).seconds\n3600\n>>> tz.tzname(normal, is_dst=False)\n'NDT'\n\n>>> print(tz.utcoffset(ambiguous, is_dst=False))\n-1 day, 20:30:00\n>>> tz.dst(ambiguous, is_dst=False)\ndatetime.timedelta(0)\n>>> tz.tzname(ambiguous, is_dst=False)\n'NST'\n\nIf ``is_dst`` is not specified, ambiguous timestamps will raise\nan ``pytz.exceptions.AmbiguousTimeError`` exception.\n\n>>> print(tz.utcoffset(normal))\n-1 day, 21:30:00\n>>> print(tz.dst(normal))\n1:00:00\n>>> tz.tzname(normal)\n'NDT'\n\n>>> import pytz.exceptions\n>>> try:\n... tz.utcoffset(ambiguous)\n... except pytz.exceptions.AmbiguousTimeError:\n... print('pytz.exceptions.AmbiguousTimeError: %s' % ambiguous)\npytz.exceptions.AmbiguousTimeError: 2009-10-31 23:30:00\n>>> try:\n... tz.dst(ambiguous)\n... except pytz.exceptions.AmbiguousTimeError:\n... print('pytz.exceptions.AmbiguousTimeError: %s' % ambiguous)\npytz.exceptions.AmbiguousTimeError: 2009-10-31 23:30:00\n>>> try:\n... tz.tzname(ambiguous)\n... except pytz.exceptions.AmbiguousTimeError:\n... print('pytz.exceptions.AmbiguousTimeError: %s' % ambiguous)\npytz.exceptions.AmbiguousTimeError: 2009-10-31 23:30:00\n\n\nProblems with Localtime\n~~~~~~~~~~~~~~~~~~~~~~~\n\nThe major problem we have to deal with is that certain datetimes\nmay occur twice in a year. For example, in the US/Eastern timezone\non the last Sunday morning in October, the following sequence\nhappens:\n\n - 01:00 EDT occurs\n - 1 hour later, instead of 2:00am the clock is turned back 1 hour\n and 01:00 happens again (this time 01:00 EST)\n\nIn fact, every instant between 01:00 and 02:00 occurs twice. This means\nthat if you try and create a time in the 'US/Eastern' timezone\nthe standard datetime syntax, there is no way to specify if you meant\nbefore of after the end-of-daylight-saving-time transition. Using the\npytz custom syntax, the best you can do is make an educated guess:\n\n>>> loc_dt = eastern.localize(datetime(2002, 10, 27, 1, 30, 00))\n>>> loc_dt.strftime(fmt)\n'2002-10-27 01:30:00 EST-0500'\n\nAs you can see, the system has chosen one for you and there is a 50%\nchance of it being out by one hour. For some applications, this does\nnot matter. However, if you are trying to schedule meetings with people\nin different timezones or analyze log files it is not acceptable.\n\nThe best and simplest solution is to stick with using UTC. The pytz\npackage encourages using UTC for internal timezone representation by\nincluding a special UTC implementation based on the standard Python\nreference implementation in the Python documentation.\n\nThe UTC timezone unpickles to be the same instance, and pickles to a\nsmaller size than other pytz tzinfo instances. The UTC implementation\ncan be obtained as pytz.utc, pytz.UTC, or pytz.timezone('UTC').\n\n>>> import pickle, pytz\n>>> dt = datetime(2005, 3, 1, 14, 13, 21, tzinfo=utc)\n>>> naive = dt.replace(tzinfo=None)\n>>> p = pickle.dumps(dt, 1)\n>>> naive_p = pickle.dumps(naive, 1)\n>>> len(p) - len(naive_p)\n17\n>>> new = pickle.loads(p)\n>>> new == dt\nTrue\n>>> new is dt\nFalse\n>>> new.tzinfo is dt.tzinfo\nTrue\n>>> pytz.utc is pytz.UTC is pytz.timezone('UTC')\nTrue\n\nNote that some other timezones are commonly thought of as the same (GMT,\nGreenwich, Universal, etc.). The definition of UTC is distinct from these\nother timezones, and they are not equivalent. For this reason, they will\nnot compare the same in Python.\n\n>>> utc == pytz.timezone('GMT')\nFalse\n\nSee the section `What is UTC`_, below.\n\nIf you insist on working with local times, this library provides a\nfacility for constructing them unambiguously:\n\n>>> loc_dt = datetime(2002, 10, 27, 1, 30, 00)\n>>> est_dt = eastern.localize(loc_dt, is_dst=True)\n>>> edt_dt = eastern.localize(loc_dt, is_dst=False)\n>>> print(est_dt.strftime(fmt) + ' / ' + edt_dt.strftime(fmt))\n2002-10-27 01:30:00 EDT-0400 / 2002-10-27 01:30:00 EST-0500\n\nIf you pass None as the is_dst flag to localize(), pytz will refuse to\nguess and raise exceptions if you try to build ambiguous or non-existent\ntimes.\n\nFor example, 1:30am on 27th Oct 2002 happened twice in the US/Eastern\ntimezone when the clocks where put back at the end of Daylight Saving\nTime:\n\n>>> dt = datetime(2002, 10, 27, 1, 30, 00)\n>>> try:\n... eastern.localize(dt, is_dst=None)\n... except pytz.exceptions.AmbiguousTimeError:\n... print('pytz.exceptions.AmbiguousTimeError: %s' % dt)\npytz.exceptions.AmbiguousTimeError: 2002-10-27 01:30:00\n\nSimilarly, 2:30am on 7th April 2002 never happened at all in the\nUS/Eastern timezone, as the clocks where put forward at 2:00am skipping\nthe entire hour:\n\n>>> dt = datetime(2002, 4, 7, 2, 30, 00)\n>>> try:\n... eastern.localize(dt, is_dst=None)\n... except pytz.exceptions.NonExistentTimeError:\n... print('pytz.exceptions.NonExistentTimeError: %s' % dt)\npytz.exceptions.NonExistentTimeError: 2002-04-07 02:30:00\n\nBoth of these exceptions share a common base class to make error handling\neasier:\n\n>>> isinstance(pytz.AmbiguousTimeError(), pytz.InvalidTimeError)\nTrue\n>>> isinstance(pytz.NonExistentTimeError(), pytz.InvalidTimeError)\nTrue\n\n\nA special case is where countries change their timezone definitions\nwith no daylight savings time switch. For example, in 1915 Warsaw\nswitched from Warsaw time to Central European time with no daylight savings\ntransition. So at the stroke of midnight on August 5th 1915 the clocks\nwere wound back 24 minutes creating an ambiguous time period that cannot\nbe specified without referring to the timezone abbreviation or the\nactual UTC offset. In this case midnight happened twice, neither time\nduring a daylight saving time period. pytz handles this transition by\ntreating the ambiguous period before the switch as daylight savings\ntime, and the ambiguous period after as standard time.\n\n\n>>> warsaw = pytz.timezone('Europe/Warsaw')\n>>> amb_dt1 = warsaw.localize(datetime(1915, 8, 4, 23, 59, 59), is_dst=True)\n>>> amb_dt1.strftime(fmt)\n'1915-08-04 23:59:59 WMT+0124'\n>>> amb_dt2 = warsaw.localize(datetime(1915, 8, 4, 23, 59, 59), is_dst=False)\n>>> amb_dt2.strftime(fmt)\n'1915-08-04 23:59:59 CET+0100'\n>>> switch_dt = warsaw.localize(datetime(1915, 8, 5, 00, 00, 00), is_dst=False)\n>>> switch_dt.strftime(fmt)\n'1915-08-05 00:00:00 CET+0100'\n>>> str(switch_dt - amb_dt1)\n'0:24:01'\n>>> str(switch_dt - amb_dt2)\n'0:00:01'\n\nThe best way of creating a time during an ambiguous time period is\nby converting from another timezone such as UTC:\n\n>>> utc_dt = datetime(1915, 8, 4, 22, 36, tzinfo=pytz.utc)\n>>> utc_dt.astimezone(warsaw).strftime(fmt)\n'1915-08-04 23:36:00 CET+0100'\n\nThe standard Python way of handling all these ambiguities is not to\nhandle them, such as demonstrated in this example using the US/Eastern\ntimezone definition from the Python documentation (Note that this\nimplementation only works for dates between 1987 and 2006 - it is\nincluded for tests only!):\n\n>>> from pytz.reference import Eastern # pytz.reference only for tests\n>>> dt = datetime(2002, 10, 27, 0, 30, tzinfo=Eastern)\n>>> str(dt)\n'2002-10-27 00:30:00-04:00'\n>>> str(dt + timedelta(hours=1))\n'2002-10-27 01:30:00-05:00'\n>>> str(dt + timedelta(hours=2))\n'2002-10-27 02:30:00-05:00'\n>>> str(dt + timedelta(hours=3))\n'2002-10-27 03:30:00-05:00'\n\nNotice the first two results? At first glance you might think they are\ncorrect, but taking the UTC offset into account you find that they are\nactually two hours appart instead of the 1 hour we asked for.\n\n>>> from pytz.reference import UTC # pytz.reference only for tests\n>>> str(dt.astimezone(UTC))\n'2002-10-27 04:30:00+00:00'\n>>> str((dt + timedelta(hours=1)).astimezone(UTC))\n'2002-10-27 06:30:00+00:00'\n\n\nCountry Information\n~~~~~~~~~~~~~~~~~~~\n\nA mechanism is provided to access the timezones commonly in use\nfor a particular country, looked up using the ISO 3166 country code.\nIt returns a list of strings that can be used to retrieve the relevant\ntzinfo instance using ``pytz.timezone()``:\n\n>>> print(' '.join(pytz.country_timezones['nz']))\nPacific/Auckland Pacific/Chatham\n\nThe Olson database comes with a ISO 3166 country code to English country\nname mapping that pytz exposes as a dictionary:\n\n>>> print(pytz.country_names['nz'])\nNew Zealand\n\n\nWhat is UTC\n~~~~~~~~~~~\n\n'UTC' is `Coordinated Universal Time`_. It is a successor to, but distinct\nfrom, Greenwich Mean Time (GMT) and the various definitions of Universal\nTime. UTC is now the worldwide standard for regulating clocks and time\nmeasurement.\n\nAll other timezones are defined relative to UTC, and include offsets like\nUTC+0800 - hours to add or subtract from UTC to derive the local time. No\ndaylight saving time occurs in UTC, making it a useful timezone to perform\ndate arithmetic without worrying about the confusion and ambiguities caused\nby daylight saving time transitions, your country changing its timezone, or\nmobile computers that roam through multiple timezones.\n\n.. _Coordinated Universal Time: https://en.wikipedia.org/wiki/Coordinated_Universal_Time\n\n\nHelpers\n~~~~~~~\n\nThere are two lists of timezones provided.\n\n``all_timezones`` is the exhaustive list of the timezone names that can\nbe used.\n\n>>> from pytz import all_timezones\n>>> len(all_timezones) >= 500\nTrue\n>>> 'Etc/Greenwich' in all_timezones\nTrue\n\n``common_timezones`` is a list of useful, current timezones. It doesn't\ncontain deprecated zones or historical zones, except for a few I've\ndeemed in common usage, such as US/Eastern (open a bug report if you\nthink other timezones are deserving of being included here). It is also\na sequence of strings.\n\n>>> from pytz import common_timezones\n>>> len(common_timezones) < len(all_timezones)\nTrue\n>>> 'Etc/Greenwich' in common_timezones\nFalse\n>>> 'Australia/Melbourne' in common_timezones\nTrue\n>>> 'US/Eastern' in common_timezones\nTrue\n>>> 'Canada/Eastern' in common_timezones\nTrue\n>>> 'Australia/Yancowinna' in all_timezones\nTrue\n>>> 'Australia/Yancowinna' in common_timezones\nFalse\n\nBoth ``common_timezones`` and ``all_timezones`` are alphabetically\nsorted:\n\n>>> common_timezones_dupe = common_timezones[:]\n>>> common_timezones_dupe.sort()\n>>> common_timezones == common_timezones_dupe\nTrue\n>>> all_timezones_dupe = all_timezones[:]\n>>> all_timezones_dupe.sort()\n>>> all_timezones == all_timezones_dupe\nTrue\n\n``all_timezones`` and ``common_timezones`` are also available as sets.\n\n>>> from pytz import all_timezones_set, common_timezones_set\n>>> 'US/Eastern' in all_timezones_set\nTrue\n>>> 'US/Eastern' in common_timezones_set\nTrue\n>>> 'Australia/Victoria' in common_timezones_set\nFalse\n\nYou can also retrieve lists of timezones used by particular countries\nusing the ``country_timezones()`` function. It requires an ISO-3166\ntwo letter country code.\n\n>>> from pytz import country_timezones\n>>> print(' '.join(country_timezones('ch')))\nEurope/Zurich\n>>> print(' '.join(country_timezones('CH')))\nEurope/Zurich\n\n\nInternationalization - i18n/l10n\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nPytz is an interface to the IANA database, which uses ASCII names. The `Unicode Consortium's Unicode Locales (CLDR) `_\nproject provides translations. Python packages such as\n`Babel `_\nand Thomas Khyn's `l18n `_ package can be used\nto access these translations from Python.\n\n\nLicense\n~~~~~~~\n\nMIT license.\n\nThis code is also available as part of Zope 3 under the Zope Public\nLicense, Version 2.1 (ZPL).\n\nI'm happy to relicense this code if necessary for inclusion in other\nopen source projects.\n\n\nLatest Versions\n~~~~~~~~~~~~~~~\n\nThis package will be updated after releases of the Olson timezone\ndatabase. The latest version can be downloaded from the `Python Package\nIndex `_. The code that is used\nto generate this distribution is hosted on Github and available\nusing git::\n\n git clone https://github.com/stub42/pytz.git\n\nAnnouncements of new releases are made on\n`Launchpad `_, and the\n`Atom feed `_\nhosted there.\n\n\nBugs, Feature Requests & Patches\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nBugs should be reported on `Github `_.\nFeature requests are unlikely to be considered, and efforts instead directed\nto timezone support now built into Python or packages that work with it.\n\n\nSecurity Issues\n~~~~~~~~~~~~~~~\n\nReports about security issues can be made via `Tidelift `_.\n\n\nIssues & Limitations\n~~~~~~~~~~~~~~~~~~~~\n\n- This project is in maintenance mode. Projects using Python 3.9 or later\n are best served by using the timezone functionaly now included in core\n Python and packages that work with it such as `tzdata `_.\n\n- Offsets from UTC are rounded to the nearest whole minute, so timezones\n such as Europe/Amsterdam pre 1937 will be up to 30 seconds out. This\n was a limitation of the Python datetime library.\n\n- If you think a timezone definition is incorrect, I probably can't fix\n it. pytz is a direct translation of the Olson timezone database, and\n changes to the timezone definitions need to be made to this source.\n If you find errors they should be reported to the time zone mailing\n list, linked from http://www.iana.org/time-zones.\n\n\nFurther Reading\n~~~~~~~~~~~~~~~\n\nMore info than you want to know about timezones:\nhttps://data.iana.org/time-zones/tz-link.html\n\n\nContact\n~~~~~~~\n\nStuart Bishop ", + "release_date": "2023-09-05T01:56:55", "parties": [ { "type": "person", @@ -6598,6 +6598,7 @@ "Programming Language :: Python :: 3.1", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", @@ -6609,11 +6610,11 @@ "Topic :: Software Development :: Libraries :: Python Modules" ], "homepage_url": "http://pythonhosted.org/pytz", - "download_url": "https://files.pythonhosted.org/packages/7f/99/ad6bd37e748257dd70d6f85d916cafe79c0b0f5e2e95b11f7fbc82bf3110/pytz-2023.3-py2.py3-none-any.whl", - "size": 502345, + "download_url": "https://files.pythonhosted.org/packages/32/4d/aaf7eff5deb402fd9a24a1449a8119f00d74ae9c2efa79f8ef9994261fc2/pytz-2023.3.post1-py2.py3-none-any.whl", + "size": 502454, "sha1": null, - "md5": "5db8e1e106eb6fb36be6a7e63ee71fa3", - "sha256": "a151b3abb88eda1d4e34a9814df37de2a80e301e68ba0fd856fb9b46bfbbbffb", + "md5": "689e3bcbde7448826b0e4df41a5fbd0e", + "sha256": "ce42d816b81b68506614c11e8937d3aa9e41007ceb50bfdcb0749b921bf646c7", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -6633,20 +6634,20 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/pytz/2023.3/json", + "api_data_url": "https://pypi.org/pypi/pytz/2023.3.post1/json", "datasource_id": null, - "purl": "pkg:pypi/pytz@2023.3" + "purl": "pkg:pypi/pytz@2023.3.post1" }, { "type": "pypi", "namespace": null, "name": "pytz", - "version": "2023.3", + "version": "2023.3.post1", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "World timezone definitions, modern and historical\npytz - World Timezone Definitions for Python\n============================================\n\n:Author: Stuart Bishop \n\nIntroduction\n~~~~~~~~~~~~\n\npytz brings the Olson tz database into Python. This library allows\naccurate and cross platform timezone calculations using Python 2.4\nor higher. It also solves the issue of ambiguous times at the end\nof daylight saving time, which you can read more about in the Python\nLibrary Reference (``datetime.tzinfo``).\n\nAlmost all of the Olson timezones are supported.\n\n.. note::\n\n Projects using Python 3.9 or later should be using the support\n now included as part of the standard library, and third party\n packages work with it such as `tzdata `_.\n pytz offers no advantages beyond backwards compatibility with\n code written for earlier versions of Python.\n\n.. note::\n\n This library differs from the documented Python API for\n tzinfo implementations; if you want to create local wallclock\n times you need to use the ``localize()`` method documented in this\n document. In addition, if you perform date arithmetic on local\n times that cross DST boundaries, the result may be in an incorrect\n timezone (ie. subtract 1 minute from 2002-10-27 1:00 EST and you get\n 2002-10-27 0:59 EST instead of the correct 2002-10-27 1:59 EDT). A\n ``normalize()`` method is provided to correct this. Unfortunately these\n issues cannot be resolved without modifying the Python datetime\n implementation (see PEP-431).\n\n\nInstallation\n~~~~~~~~~~~~\n\nThis package can either be installed using ``pip`` or from a tarball using the\nstandard Python distutils.\n\nIf you are installing using ``pip``, you don't need to download anything as the\nlatest version will be downloaded for you from PyPI::\n\n pip install pytz\n\nIf you are installing from a tarball, run the following command as an\nadministrative user::\n\n python setup.py install\n\n\npytz for Enterprise\n~~~~~~~~~~~~~~~~~~~\n\nAvailable as part of the Tidelift Subscription.\n\nThe maintainers of pytz and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. `Learn more. `_.\n\n\nExample & Usage\n~~~~~~~~~~~~~~~\n\nLocalized times and date arithmetic\n-----------------------------------\n\n>>> from datetime import datetime, timedelta\n>>> from pytz import timezone\n>>> import pytz\n>>> utc = pytz.utc\n>>> utc.zone\n'UTC'\n>>> eastern = timezone('US/Eastern')\n>>> eastern.zone\n'US/Eastern'\n>>> amsterdam = timezone('Europe/Amsterdam')\n>>> fmt = '%Y-%m-%d %H:%M:%S %Z%z'\n\nThis library only supports two ways of building a localized time. The\nfirst is to use the ``localize()`` method provided by the pytz library.\nThis is used to localize a naive datetime (datetime with no timezone\ninformation):\n\n>>> loc_dt = eastern.localize(datetime(2002, 10, 27, 6, 0, 0))\n>>> print(loc_dt.strftime(fmt))\n2002-10-27 06:00:00 EST-0500\n\nThe second way of building a localized time is by converting an existing\nlocalized time using the standard ``astimezone()`` method:\n\n>>> ams_dt = loc_dt.astimezone(amsterdam)\n>>> ams_dt.strftime(fmt)\n'2002-10-27 12:00:00 CET+0100'\n\nUnfortunately using the tzinfo argument of the standard datetime\nconstructors ''does not work'' with pytz for many timezones.\n\n>>> datetime(2002, 10, 27, 12, 0, 0, tzinfo=amsterdam).strftime(fmt) # /!\\ Does not work this way!\n'2002-10-27 12:00:00 LMT+0018'\n\nIt is safe for timezones without daylight saving transitions though, such\nas UTC:\n\n>>> datetime(2002, 10, 27, 12, 0, 0, tzinfo=pytz.utc).strftime(fmt) # /!\\ Not recommended except for UTC\n'2002-10-27 12:00:00 UTC+0000'\n\nThe preferred way of dealing with times is to always work in UTC,\nconverting to localtime only when generating output to be read\nby humans.\n\n>>> utc_dt = datetime(2002, 10, 27, 6, 0, 0, tzinfo=utc)\n>>> loc_dt = utc_dt.astimezone(eastern)\n>>> loc_dt.strftime(fmt)\n'2002-10-27 01:00:00 EST-0500'\n\nThis library also allows you to do date arithmetic using local\ntimes, although it is more complicated than working in UTC as you\nneed to use the ``normalize()`` method to handle daylight saving time\nand other timezone transitions. In this example, ``loc_dt`` is set\nto the instant when daylight saving time ends in the US/Eastern\ntimezone.\n\n>>> before = loc_dt - timedelta(minutes=10)\n>>> before.strftime(fmt)\n'2002-10-27 00:50:00 EST-0500'\n>>> eastern.normalize(before).strftime(fmt)\n'2002-10-27 01:50:00 EDT-0400'\n>>> after = eastern.normalize(before + timedelta(minutes=20))\n>>> after.strftime(fmt)\n'2002-10-27 01:10:00 EST-0500'\n\nCreating local times is also tricky, and the reason why working with\nlocal times is not recommended. Unfortunately, you cannot just pass\na ``tzinfo`` argument when constructing a datetime (see the next\nsection for more details)\n\n>>> dt = datetime(2002, 10, 27, 1, 30, 0)\n>>> dt1 = eastern.localize(dt, is_dst=True)\n>>> dt1.strftime(fmt)\n'2002-10-27 01:30:00 EDT-0400'\n>>> dt2 = eastern.localize(dt, is_dst=False)\n>>> dt2.strftime(fmt)\n'2002-10-27 01:30:00 EST-0500'\n\nConverting between timezones is more easily done, using the\nstandard astimezone method.\n\n>>> utc_dt = utc.localize(datetime.utcfromtimestamp(1143408899))\n>>> utc_dt.strftime(fmt)\n'2006-03-26 21:34:59 UTC+0000'\n>>> au_tz = timezone('Australia/Sydney')\n>>> au_dt = utc_dt.astimezone(au_tz)\n>>> au_dt.strftime(fmt)\n'2006-03-27 08:34:59 AEDT+1100'\n>>> utc_dt2 = au_dt.astimezone(utc)\n>>> utc_dt2.strftime(fmt)\n'2006-03-26 21:34:59 UTC+0000'\n>>> utc_dt == utc_dt2\nTrue\n\nYou can take shortcuts when dealing with the UTC side of timezone\nconversions. ``normalize()`` and ``localize()`` are not really\nnecessary when there are no daylight saving time transitions to\ndeal with.\n\n>>> utc_dt = datetime.utcfromtimestamp(1143408899).replace(tzinfo=utc)\n>>> utc_dt.strftime(fmt)\n'2006-03-26 21:34:59 UTC+0000'\n>>> au_tz = timezone('Australia/Sydney')\n>>> au_dt = au_tz.normalize(utc_dt.astimezone(au_tz))\n>>> au_dt.strftime(fmt)\n'2006-03-27 08:34:59 AEDT+1100'\n>>> utc_dt2 = au_dt.astimezone(utc)\n>>> utc_dt2.strftime(fmt)\n'2006-03-26 21:34:59 UTC+0000'\n\n\n``tzinfo`` API\n--------------\n\nThe ``tzinfo`` instances returned by the ``timezone()`` function have\nbeen extended to cope with ambiguous times by adding an ``is_dst``\nparameter to the ``utcoffset()``, ``dst()`` && ``tzname()`` methods.\n\n>>> tz = timezone('America/St_Johns')\n\n>>> normal = datetime(2009, 9, 1)\n>>> ambiguous = datetime(2009, 10, 31, 23, 30)\n\nThe ``is_dst`` parameter is ignored for most timestamps. It is only used\nduring DST transition ambiguous periods to resolve that ambiguity.\n\n>>> print(tz.utcoffset(normal, is_dst=True))\n-1 day, 21:30:00\n>>> print(tz.dst(normal, is_dst=True))\n1:00:00\n>>> tz.tzname(normal, is_dst=True)\n'NDT'\n\n>>> print(tz.utcoffset(ambiguous, is_dst=True))\n-1 day, 21:30:00\n>>> print(tz.dst(ambiguous, is_dst=True))\n1:00:00\n>>> tz.tzname(ambiguous, is_dst=True)\n'NDT'\n\n>>> print(tz.utcoffset(normal, is_dst=False))\n-1 day, 21:30:00\n>>> tz.dst(normal, is_dst=False).seconds\n3600\n>>> tz.tzname(normal, is_dst=False)\n'NDT'\n\n>>> print(tz.utcoffset(ambiguous, is_dst=False))\n-1 day, 20:30:00\n>>> tz.dst(ambiguous, is_dst=False)\ndatetime.timedelta(0)\n>>> tz.tzname(ambiguous, is_dst=False)\n'NST'\n\nIf ``is_dst`` is not specified, ambiguous timestamps will raise\nan ``pytz.exceptions.AmbiguousTimeError`` exception.\n\n>>> print(tz.utcoffset(normal))\n-1 day, 21:30:00\n>>> print(tz.dst(normal))\n1:00:00\n>>> tz.tzname(normal)\n'NDT'\n\n>>> import pytz.exceptions\n>>> try:\n... tz.utcoffset(ambiguous)\n... except pytz.exceptions.AmbiguousTimeError:\n... print('pytz.exceptions.AmbiguousTimeError: %s' % ambiguous)\npytz.exceptions.AmbiguousTimeError: 2009-10-31 23:30:00\n>>> try:\n... tz.dst(ambiguous)\n... except pytz.exceptions.AmbiguousTimeError:\n... print('pytz.exceptions.AmbiguousTimeError: %s' % ambiguous)\npytz.exceptions.AmbiguousTimeError: 2009-10-31 23:30:00\n>>> try:\n... tz.tzname(ambiguous)\n... except pytz.exceptions.AmbiguousTimeError:\n... print('pytz.exceptions.AmbiguousTimeError: %s' % ambiguous)\npytz.exceptions.AmbiguousTimeError: 2009-10-31 23:30:00\n\n\nProblems with Localtime\n~~~~~~~~~~~~~~~~~~~~~~~\n\nThe major problem we have to deal with is that certain datetimes\nmay occur twice in a year. For example, in the US/Eastern timezone\non the last Sunday morning in October, the following sequence\nhappens:\n\n - 01:00 EDT occurs\n - 1 hour later, instead of 2:00am the clock is turned back 1 hour\n and 01:00 happens again (this time 01:00 EST)\n\nIn fact, every instant between 01:00 and 02:00 occurs twice. This means\nthat if you try and create a time in the 'US/Eastern' timezone\nthe standard datetime syntax, there is no way to specify if you meant\nbefore of after the end-of-daylight-saving-time transition. Using the\npytz custom syntax, the best you can do is make an educated guess:\n\n>>> loc_dt = eastern.localize(datetime(2002, 10, 27, 1, 30, 00))\n>>> loc_dt.strftime(fmt)\n'2002-10-27 01:30:00 EST-0500'\n\nAs you can see, the system has chosen one for you and there is a 50%\nchance of it being out by one hour. For some applications, this does\nnot matter. However, if you are trying to schedule meetings with people\nin different timezones or analyze log files it is not acceptable.\n\nThe best and simplest solution is to stick with using UTC. The pytz\npackage encourages using UTC for internal timezone representation by\nincluding a special UTC implementation based on the standard Python\nreference implementation in the Python documentation.\n\nThe UTC timezone unpickles to be the same instance, and pickles to a\nsmaller size than other pytz tzinfo instances. The UTC implementation\ncan be obtained as pytz.utc, pytz.UTC, or pytz.timezone('UTC').\n\n>>> import pickle, pytz\n>>> dt = datetime(2005, 3, 1, 14, 13, 21, tzinfo=utc)\n>>> naive = dt.replace(tzinfo=None)\n>>> p = pickle.dumps(dt, 1)\n>>> naive_p = pickle.dumps(naive, 1)\n>>> len(p) - len(naive_p)\n17\n>>> new = pickle.loads(p)\n>>> new == dt\nTrue\n>>> new is dt\nFalse\n>>> new.tzinfo is dt.tzinfo\nTrue\n>>> pytz.utc is pytz.UTC is pytz.timezone('UTC')\nTrue\n\nNote that some other timezones are commonly thought of as the same (GMT,\nGreenwich, Universal, etc.). The definition of UTC is distinct from these\nother timezones, and they are not equivalent. For this reason, they will\nnot compare the same in Python.\n\n>>> utc == pytz.timezone('GMT')\nFalse\n\nSee the section `What is UTC`_, below.\n\nIf you insist on working with local times, this library provides a\nfacility for constructing them unambiguously:\n\n>>> loc_dt = datetime(2002, 10, 27, 1, 30, 00)\n>>> est_dt = eastern.localize(loc_dt, is_dst=True)\n>>> edt_dt = eastern.localize(loc_dt, is_dst=False)\n>>> print(est_dt.strftime(fmt) + ' / ' + edt_dt.strftime(fmt))\n2002-10-27 01:30:00 EDT-0400 / 2002-10-27 01:30:00 EST-0500\n\nIf you pass None as the is_dst flag to localize(), pytz will refuse to\nguess and raise exceptions if you try to build ambiguous or non-existent\ntimes.\n\nFor example, 1:30am on 27th Oct 2002 happened twice in the US/Eastern\ntimezone when the clocks where put back at the end of Daylight Saving\nTime:\n\n>>> dt = datetime(2002, 10, 27, 1, 30, 00)\n>>> try:\n... eastern.localize(dt, is_dst=None)\n... except pytz.exceptions.AmbiguousTimeError:\n... print('pytz.exceptions.AmbiguousTimeError: %s' % dt)\npytz.exceptions.AmbiguousTimeError: 2002-10-27 01:30:00\n\nSimilarly, 2:30am on 7th April 2002 never happened at all in the\nUS/Eastern timezone, as the clocks where put forward at 2:00am skipping\nthe entire hour:\n\n>>> dt = datetime(2002, 4, 7, 2, 30, 00)\n>>> try:\n... eastern.localize(dt, is_dst=None)\n... except pytz.exceptions.NonExistentTimeError:\n... print('pytz.exceptions.NonExistentTimeError: %s' % dt)\npytz.exceptions.NonExistentTimeError: 2002-04-07 02:30:00\n\nBoth of these exceptions share a common base class to make error handling\neasier:\n\n>>> isinstance(pytz.AmbiguousTimeError(), pytz.InvalidTimeError)\nTrue\n>>> isinstance(pytz.NonExistentTimeError(), pytz.InvalidTimeError)\nTrue\n\n\nA special case is where countries change their timezone definitions\nwith no daylight savings time switch. For example, in 1915 Warsaw\nswitched from Warsaw time to Central European time with no daylight savings\ntransition. So at the stroke of midnight on August 5th 1915 the clocks\nwere wound back 24 minutes creating an ambiguous time period that cannot\nbe specified without referring to the timezone abbreviation or the\nactual UTC offset. In this case midnight happened twice, neither time\nduring a daylight saving time period. pytz handles this transition by\ntreating the ambiguous period before the switch as daylight savings\ntime, and the ambiguous period after as standard time.\n\n\n>>> warsaw = pytz.timezone('Europe/Warsaw')\n>>> amb_dt1 = warsaw.localize(datetime(1915, 8, 4, 23, 59, 59), is_dst=True)\n>>> amb_dt1.strftime(fmt)\n'1915-08-04 23:59:59 WMT+0124'\n>>> amb_dt2 = warsaw.localize(datetime(1915, 8, 4, 23, 59, 59), is_dst=False)\n>>> amb_dt2.strftime(fmt)\n'1915-08-04 23:59:59 CET+0100'\n>>> switch_dt = warsaw.localize(datetime(1915, 8, 5, 00, 00, 00), is_dst=False)\n>>> switch_dt.strftime(fmt)\n'1915-08-05 00:00:00 CET+0100'\n>>> str(switch_dt - amb_dt1)\n'0:24:01'\n>>> str(switch_dt - amb_dt2)\n'0:00:01'\n\nThe best way of creating a time during an ambiguous time period is\nby converting from another timezone such as UTC:\n\n>>> utc_dt = datetime(1915, 8, 4, 22, 36, tzinfo=pytz.utc)\n>>> utc_dt.astimezone(warsaw).strftime(fmt)\n'1915-08-04 23:36:00 CET+0100'\n\nThe standard Python way of handling all these ambiguities is not to\nhandle them, such as demonstrated in this example using the US/Eastern\ntimezone definition from the Python documentation (Note that this\nimplementation only works for dates between 1987 and 2006 - it is\nincluded for tests only!):\n\n>>> from pytz.reference import Eastern # pytz.reference only for tests\n>>> dt = datetime(2002, 10, 27, 0, 30, tzinfo=Eastern)\n>>> str(dt)\n'2002-10-27 00:30:00-04:00'\n>>> str(dt + timedelta(hours=1))\n'2002-10-27 01:30:00-05:00'\n>>> str(dt + timedelta(hours=2))\n'2002-10-27 02:30:00-05:00'\n>>> str(dt + timedelta(hours=3))\n'2002-10-27 03:30:00-05:00'\n\nNotice the first two results? At first glance you might think they are\ncorrect, but taking the UTC offset into account you find that they are\nactually two hours appart instead of the 1 hour we asked for.\n\n>>> from pytz.reference import UTC # pytz.reference only for tests\n>>> str(dt.astimezone(UTC))\n'2002-10-27 04:30:00+00:00'\n>>> str((dt + timedelta(hours=1)).astimezone(UTC))\n'2002-10-27 06:30:00+00:00'\n\n\nCountry Information\n~~~~~~~~~~~~~~~~~~~\n\nA mechanism is provided to access the timezones commonly in use\nfor a particular country, looked up using the ISO 3166 country code.\nIt returns a list of strings that can be used to retrieve the relevant\ntzinfo instance using ``pytz.timezone()``:\n\n>>> print(' '.join(pytz.country_timezones['nz']))\nPacific/Auckland Pacific/Chatham\n\nThe Olson database comes with a ISO 3166 country code to English country\nname mapping that pytz exposes as a dictionary:\n\n>>> print(pytz.country_names['nz'])\nNew Zealand\n\n\nWhat is UTC\n~~~~~~~~~~~\n\n'UTC' is `Coordinated Universal Time`_. It is a successor to, but distinct\nfrom, Greenwich Mean Time (GMT) and the various definitions of Universal\nTime. UTC is now the worldwide standard for regulating clocks and time\nmeasurement.\n\nAll other timezones are defined relative to UTC, and include offsets like\nUTC+0800 - hours to add or subtract from UTC to derive the local time. No\ndaylight saving time occurs in UTC, making it a useful timezone to perform\ndate arithmetic without worrying about the confusion and ambiguities caused\nby daylight saving time transitions, your country changing its timezone, or\nmobile computers that roam through multiple timezones.\n\n.. _Coordinated Universal Time: https://en.wikipedia.org/wiki/Coordinated_Universal_Time\n\n\nHelpers\n~~~~~~~\n\nThere are two lists of timezones provided.\n\n``all_timezones`` is the exhaustive list of the timezone names that can\nbe used.\n\n>>> from pytz import all_timezones\n>>> len(all_timezones) >= 500\nTrue\n>>> 'Etc/Greenwich' in all_timezones\nTrue\n\n``common_timezones`` is a list of useful, current timezones. It doesn't\ncontain deprecated zones or historical zones, except for a few I've\ndeemed in common usage, such as US/Eastern (open a bug report if you\nthink other timezones are deserving of being included here). It is also\na sequence of strings.\n\n>>> from pytz import common_timezones\n>>> len(common_timezones) < len(all_timezones)\nTrue\n>>> 'Etc/Greenwich' in common_timezones\nFalse\n>>> 'Australia/Melbourne' in common_timezones\nTrue\n>>> 'US/Eastern' in common_timezones\nTrue\n>>> 'Canada/Eastern' in common_timezones\nTrue\n>>> 'Australia/Yancowinna' in all_timezones\nTrue\n>>> 'Australia/Yancowinna' in common_timezones\nFalse\n\nBoth ``common_timezones`` and ``all_timezones`` are alphabetically\nsorted:\n\n>>> common_timezones_dupe = common_timezones[:]\n>>> common_timezones_dupe.sort()\n>>> common_timezones == common_timezones_dupe\nTrue\n>>> all_timezones_dupe = all_timezones[:]\n>>> all_timezones_dupe.sort()\n>>> all_timezones == all_timezones_dupe\nTrue\n\n``all_timezones`` and ``common_timezones`` are also available as sets.\n\n>>> from pytz import all_timezones_set, common_timezones_set\n>>> 'US/Eastern' in all_timezones_set\nTrue\n>>> 'US/Eastern' in common_timezones_set\nTrue\n>>> 'Australia/Victoria' in common_timezones_set\nFalse\n\nYou can also retrieve lists of timezones used by particular countries\nusing the ``country_timezones()`` function. It requires an ISO-3166\ntwo letter country code.\n\n>>> from pytz import country_timezones\n>>> print(' '.join(country_timezones('ch')))\nEurope/Zurich\n>>> print(' '.join(country_timezones('CH')))\nEurope/Zurich\n\n\nInternationalization - i18n/l10n\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nPytz is an interface to the IANA database, which uses ASCII names. The `Unicode Consortium's Unicode Locales (CLDR) `_\nproject provides translations. Python packages such as\n`Babel `_\nand Thomas Khyn's `l18n `_ package can be used\nto access these translations from Python.\n\n\nLicense\n~~~~~~~\n\nMIT license.\n\nThis code is also available as part of Zope 3 under the Zope Public\nLicense, Version 2.1 (ZPL).\n\nI'm happy to relicense this code if necessary for inclusion in other\nopen source projects.\n\n\nLatest Versions\n~~~~~~~~~~~~~~~\n\nThis package will be updated after releases of the Olson timezone\ndatabase. The latest version can be downloaded from the `Python Package\nIndex `_. The code that is used\nto generate this distribution is hosted on Github and available\nusing git::\n\n git clone https://github.com/stub42/pytz.git\n\nAnnouncements of new releases are made on\n`Launchpad `_, and the\n`Atom feed `_\nhosted there.\n\n\nBugs, Feature Requests & Patches\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nBugs should be reported on `Github `_.\nFeature requests are unlikely to be considered, and efforts instead directed\nto timezone support now built into Python or packages that work with it.\n\n\nSecurity Issues\n~~~~~~~~~~~~~~~\n\nReports about security issues can be made via `Tidelift `_.\n\n\nIssues & Limitations\n~~~~~~~~~~~~~~~~~~~~\n\n- This project is in maintenance mode. Projects using Python 3.9 or later\n are best served by using the timezone functionaly now included in core\n Python and packages that work with it such as `tzdata `_.\n\n- Offsets from UTC are rounded to the nearest whole minute, so timezones\n such as Europe/Amsterdam pre 1937 will be up to 30 seconds out. This\n was a limitation of the Python datetime library.\n\n- If you think a timezone definition is incorrect, I probably can't fix\n it. pytz is a direct translation of the Olson timezone database, and\n changes to the timezone definitions need to be made to this source.\n If you find errors they should be reported to the time zone mailing\n list, linked from http://www.iana.org/time-zones.\n\n\nFurther Reading\n~~~~~~~~~~~~~~~\n\nMore info than you want to know about timezones:\nhttps://data.iana.org/time-zones/tz-link.html\n\n\nContact\n~~~~~~~\n\nStuart Bishop ", - "release_date": "2023-03-29T04:23:28", + "description": "World timezone definitions, modern and historical\npytz - World Timezone Definitions for Python\n============================================\n\n:Author: Stuart Bishop \n\nIntroduction\n~~~~~~~~~~~~\n\npytz brings the Olson tz database into Python. This library allows\naccurate and cross platform timezone calculations using Python 2.4\nor higher. It also solves the issue of ambiguous times at the end\nof daylight saving time, which you can read more about in the Python\nLibrary Reference (``datetime.tzinfo``).\n\nAlmost all of the Olson timezones are supported.\n\n.. note::\n\n Projects using Python 3.9 or later should be using the support\n now included as part of the standard library, and third party\n packages work with it such as `tzdata `_.\n pytz offers no advantages beyond backwards compatibility with\n code written for earlier versions of Python.\n\n.. note::\n\n This library differs from the documented Python API for\n tzinfo implementations; if you want to create local wallclock\n times you need to use the ``localize()`` method documented in this\n document. In addition, if you perform date arithmetic on local\n times that cross DST boundaries, the result may be in an incorrect\n timezone (ie. subtract 1 minute from 2002-10-27 1:00 EST and you get\n 2002-10-27 0:59 EST instead of the correct 2002-10-27 1:59 EDT). A\n ``normalize()`` method is provided to correct this. Unfortunately these\n issues cannot be resolved without modifying the Python datetime\n implementation (see PEP-431).\n\n\nInstallation\n~~~~~~~~~~~~\n\nThis package can either be installed using ``pip`` or from a tarball using the\nstandard Python distutils.\n\nIf you are installing using ``pip``, you don't need to download anything as the\nlatest version will be downloaded for you from PyPI::\n\n pip install pytz\n\nIf you are installing from a tarball, run the following command as an\nadministrative user::\n\n python setup.py install\n\n\npytz for Enterprise\n~~~~~~~~~~~~~~~~~~~\n\nAvailable as part of the Tidelift Subscription.\n\nThe maintainers of pytz and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. `Learn more. `_.\n\n\nExample & Usage\n~~~~~~~~~~~~~~~\n\nLocalized times and date arithmetic\n-----------------------------------\n\n>>> from datetime import datetime, timedelta\n>>> from pytz import timezone\n>>> import pytz\n>>> utc = pytz.utc\n>>> utc.zone\n'UTC'\n>>> eastern = timezone('US/Eastern')\n>>> eastern.zone\n'US/Eastern'\n>>> amsterdam = timezone('Europe/Amsterdam')\n>>> fmt = '%Y-%m-%d %H:%M:%S %Z%z'\n\nThis library only supports two ways of building a localized time. The\nfirst is to use the ``localize()`` method provided by the pytz library.\nThis is used to localize a naive datetime (datetime with no timezone\ninformation):\n\n>>> loc_dt = eastern.localize(datetime(2002, 10, 27, 6, 0, 0))\n>>> print(loc_dt.strftime(fmt))\n2002-10-27 06:00:00 EST-0500\n\nThe second way of building a localized time is by converting an existing\nlocalized time using the standard ``astimezone()`` method:\n\n>>> ams_dt = loc_dt.astimezone(amsterdam)\n>>> ams_dt.strftime(fmt)\n'2002-10-27 12:00:00 CET+0100'\n\nUnfortunately using the tzinfo argument of the standard datetime\nconstructors ''does not work'' with pytz for many timezones.\n\n>>> datetime(2002, 10, 27, 12, 0, 0, tzinfo=amsterdam).strftime(fmt) # /!\\ Does not work this way!\n'2002-10-27 12:00:00 LMT+0018'\n\nIt is safe for timezones without daylight saving transitions though, such\nas UTC:\n\n>>> datetime(2002, 10, 27, 12, 0, 0, tzinfo=pytz.utc).strftime(fmt) # /!\\ Not recommended except for UTC\n'2002-10-27 12:00:00 UTC+0000'\n\nThe preferred way of dealing with times is to always work in UTC,\nconverting to localtime only when generating output to be read\nby humans.\n\n>>> utc_dt = datetime(2002, 10, 27, 6, 0, 0, tzinfo=utc)\n>>> loc_dt = utc_dt.astimezone(eastern)\n>>> loc_dt.strftime(fmt)\n'2002-10-27 01:00:00 EST-0500'\n\nThis library also allows you to do date arithmetic using local\ntimes, although it is more complicated than working in UTC as you\nneed to use the ``normalize()`` method to handle daylight saving time\nand other timezone transitions. In this example, ``loc_dt`` is set\nto the instant when daylight saving time ends in the US/Eastern\ntimezone.\n\n>>> before = loc_dt - timedelta(minutes=10)\n>>> before.strftime(fmt)\n'2002-10-27 00:50:00 EST-0500'\n>>> eastern.normalize(before).strftime(fmt)\n'2002-10-27 01:50:00 EDT-0400'\n>>> after = eastern.normalize(before + timedelta(minutes=20))\n>>> after.strftime(fmt)\n'2002-10-27 01:10:00 EST-0500'\n\nCreating local times is also tricky, and the reason why working with\nlocal times is not recommended. Unfortunately, you cannot just pass\na ``tzinfo`` argument when constructing a datetime (see the next\nsection for more details)\n\n>>> dt = datetime(2002, 10, 27, 1, 30, 0)\n>>> dt1 = eastern.localize(dt, is_dst=True)\n>>> dt1.strftime(fmt)\n'2002-10-27 01:30:00 EDT-0400'\n>>> dt2 = eastern.localize(dt, is_dst=False)\n>>> dt2.strftime(fmt)\n'2002-10-27 01:30:00 EST-0500'\n\nConverting between timezones is more easily done, using the\nstandard astimezone method.\n\n>>> utc_dt = datetime.fromtimestamp(1143408899, tz=utc)\n>>> utc_dt.strftime(fmt)\n'2006-03-26 21:34:59 UTC+0000'\n>>> au_tz = timezone('Australia/Sydney')\n>>> au_dt = utc_dt.astimezone(au_tz)\n>>> au_dt.strftime(fmt)\n'2006-03-27 08:34:59 AEDT+1100'\n>>> utc_dt2 = au_dt.astimezone(utc)\n>>> utc_dt2.strftime(fmt)\n'2006-03-26 21:34:59 UTC+0000'\n>>> utc_dt == utc_dt2\nTrue\n\nYou can take shortcuts when dealing with the UTC side of timezone\nconversions. ``normalize()`` and ``localize()`` are not really\nnecessary when there are no daylight saving time transitions to\ndeal with.\n\n>>> utc_dt = datetime.fromtimestamp(1143408899, tz=utc)\n>>> utc_dt.strftime(fmt)\n'2006-03-26 21:34:59 UTC+0000'\n>>> au_tz = timezone('Australia/Sydney')\n>>> au_dt = au_tz.normalize(utc_dt.astimezone(au_tz))\n>>> au_dt.strftime(fmt)\n'2006-03-27 08:34:59 AEDT+1100'\n>>> utc_dt2 = au_dt.astimezone(utc)\n>>> utc_dt2.strftime(fmt)\n'2006-03-26 21:34:59 UTC+0000'\n\n\n``tzinfo`` API\n--------------\n\nThe ``tzinfo`` instances returned by the ``timezone()`` function have\nbeen extended to cope with ambiguous times by adding an ``is_dst``\nparameter to the ``utcoffset()``, ``dst()`` && ``tzname()`` methods.\n\n>>> tz = timezone('America/St_Johns')\n\n>>> normal = datetime(2009, 9, 1)\n>>> ambiguous = datetime(2009, 10, 31, 23, 30)\n\nThe ``is_dst`` parameter is ignored for most timestamps. It is only used\nduring DST transition ambiguous periods to resolve that ambiguity.\n\n>>> print(tz.utcoffset(normal, is_dst=True))\n-1 day, 21:30:00\n>>> print(tz.dst(normal, is_dst=True))\n1:00:00\n>>> tz.tzname(normal, is_dst=True)\n'NDT'\n\n>>> print(tz.utcoffset(ambiguous, is_dst=True))\n-1 day, 21:30:00\n>>> print(tz.dst(ambiguous, is_dst=True))\n1:00:00\n>>> tz.tzname(ambiguous, is_dst=True)\n'NDT'\n\n>>> print(tz.utcoffset(normal, is_dst=False))\n-1 day, 21:30:00\n>>> tz.dst(normal, is_dst=False).seconds\n3600\n>>> tz.tzname(normal, is_dst=False)\n'NDT'\n\n>>> print(tz.utcoffset(ambiguous, is_dst=False))\n-1 day, 20:30:00\n>>> tz.dst(ambiguous, is_dst=False)\ndatetime.timedelta(0)\n>>> tz.tzname(ambiguous, is_dst=False)\n'NST'\n\nIf ``is_dst`` is not specified, ambiguous timestamps will raise\nan ``pytz.exceptions.AmbiguousTimeError`` exception.\n\n>>> print(tz.utcoffset(normal))\n-1 day, 21:30:00\n>>> print(tz.dst(normal))\n1:00:00\n>>> tz.tzname(normal)\n'NDT'\n\n>>> import pytz.exceptions\n>>> try:\n... tz.utcoffset(ambiguous)\n... except pytz.exceptions.AmbiguousTimeError:\n... print('pytz.exceptions.AmbiguousTimeError: %s' % ambiguous)\npytz.exceptions.AmbiguousTimeError: 2009-10-31 23:30:00\n>>> try:\n... tz.dst(ambiguous)\n... except pytz.exceptions.AmbiguousTimeError:\n... print('pytz.exceptions.AmbiguousTimeError: %s' % ambiguous)\npytz.exceptions.AmbiguousTimeError: 2009-10-31 23:30:00\n>>> try:\n... tz.tzname(ambiguous)\n... except pytz.exceptions.AmbiguousTimeError:\n... print('pytz.exceptions.AmbiguousTimeError: %s' % ambiguous)\npytz.exceptions.AmbiguousTimeError: 2009-10-31 23:30:00\n\n\nProblems with Localtime\n~~~~~~~~~~~~~~~~~~~~~~~\n\nThe major problem we have to deal with is that certain datetimes\nmay occur twice in a year. For example, in the US/Eastern timezone\non the last Sunday morning in October, the following sequence\nhappens:\n\n - 01:00 EDT occurs\n - 1 hour later, instead of 2:00am the clock is turned back 1 hour\n and 01:00 happens again (this time 01:00 EST)\n\nIn fact, every instant between 01:00 and 02:00 occurs twice. This means\nthat if you try and create a time in the 'US/Eastern' timezone\nthe standard datetime syntax, there is no way to specify if you meant\nbefore of after the end-of-daylight-saving-time transition. Using the\npytz custom syntax, the best you can do is make an educated guess:\n\n>>> loc_dt = eastern.localize(datetime(2002, 10, 27, 1, 30, 00))\n>>> loc_dt.strftime(fmt)\n'2002-10-27 01:30:00 EST-0500'\n\nAs you can see, the system has chosen one for you and there is a 50%\nchance of it being out by one hour. For some applications, this does\nnot matter. However, if you are trying to schedule meetings with people\nin different timezones or analyze log files it is not acceptable.\n\nThe best and simplest solution is to stick with using UTC. The pytz\npackage encourages using UTC for internal timezone representation by\nincluding a special UTC implementation based on the standard Python\nreference implementation in the Python documentation.\n\nThe UTC timezone unpickles to be the same instance, and pickles to a\nsmaller size than other pytz tzinfo instances. The UTC implementation\ncan be obtained as pytz.utc, pytz.UTC, or pytz.timezone('UTC').\n\n>>> import pickle, pytz\n>>> dt = datetime(2005, 3, 1, 14, 13, 21, tzinfo=utc)\n>>> naive = dt.replace(tzinfo=None)\n>>> p = pickle.dumps(dt, 1)\n>>> naive_p = pickle.dumps(naive, 1)\n>>> len(p) - len(naive_p)\n17\n>>> new = pickle.loads(p)\n>>> new == dt\nTrue\n>>> new is dt\nFalse\n>>> new.tzinfo is dt.tzinfo\nTrue\n>>> pytz.utc is pytz.UTC is pytz.timezone('UTC')\nTrue\n\nNote that some other timezones are commonly thought of as the same (GMT,\nGreenwich, Universal, etc.). The definition of UTC is distinct from these\nother timezones, and they are not equivalent. For this reason, they will\nnot compare the same in Python.\n\n>>> utc == pytz.timezone('GMT')\nFalse\n\nSee the section `What is UTC`_, below.\n\nIf you insist on working with local times, this library provides a\nfacility for constructing them unambiguously:\n\n>>> loc_dt = datetime(2002, 10, 27, 1, 30, 00)\n>>> est_dt = eastern.localize(loc_dt, is_dst=True)\n>>> edt_dt = eastern.localize(loc_dt, is_dst=False)\n>>> print(est_dt.strftime(fmt) + ' / ' + edt_dt.strftime(fmt))\n2002-10-27 01:30:00 EDT-0400 / 2002-10-27 01:30:00 EST-0500\n\nIf you pass None as the is_dst flag to localize(), pytz will refuse to\nguess and raise exceptions if you try to build ambiguous or non-existent\ntimes.\n\nFor example, 1:30am on 27th Oct 2002 happened twice in the US/Eastern\ntimezone when the clocks where put back at the end of Daylight Saving\nTime:\n\n>>> dt = datetime(2002, 10, 27, 1, 30, 00)\n>>> try:\n... eastern.localize(dt, is_dst=None)\n... except pytz.exceptions.AmbiguousTimeError:\n... print('pytz.exceptions.AmbiguousTimeError: %s' % dt)\npytz.exceptions.AmbiguousTimeError: 2002-10-27 01:30:00\n\nSimilarly, 2:30am on 7th April 2002 never happened at all in the\nUS/Eastern timezone, as the clocks where put forward at 2:00am skipping\nthe entire hour:\n\n>>> dt = datetime(2002, 4, 7, 2, 30, 00)\n>>> try:\n... eastern.localize(dt, is_dst=None)\n... except pytz.exceptions.NonExistentTimeError:\n... print('pytz.exceptions.NonExistentTimeError: %s' % dt)\npytz.exceptions.NonExistentTimeError: 2002-04-07 02:30:00\n\nBoth of these exceptions share a common base class to make error handling\neasier:\n\n>>> isinstance(pytz.AmbiguousTimeError(), pytz.InvalidTimeError)\nTrue\n>>> isinstance(pytz.NonExistentTimeError(), pytz.InvalidTimeError)\nTrue\n\n\nA special case is where countries change their timezone definitions\nwith no daylight savings time switch. For example, in 1915 Warsaw\nswitched from Warsaw time to Central European time with no daylight savings\ntransition. So at the stroke of midnight on August 5th 1915 the clocks\nwere wound back 24 minutes creating an ambiguous time period that cannot\nbe specified without referring to the timezone abbreviation or the\nactual UTC offset. In this case midnight happened twice, neither time\nduring a daylight saving time period. pytz handles this transition by\ntreating the ambiguous period before the switch as daylight savings\ntime, and the ambiguous period after as standard time.\n\n\n>>> warsaw = pytz.timezone('Europe/Warsaw')\n>>> amb_dt1 = warsaw.localize(datetime(1915, 8, 4, 23, 59, 59), is_dst=True)\n>>> amb_dt1.strftime(fmt)\n'1915-08-04 23:59:59 WMT+0124'\n>>> amb_dt2 = warsaw.localize(datetime(1915, 8, 4, 23, 59, 59), is_dst=False)\n>>> amb_dt2.strftime(fmt)\n'1915-08-04 23:59:59 CET+0100'\n>>> switch_dt = warsaw.localize(datetime(1915, 8, 5, 00, 00, 00), is_dst=False)\n>>> switch_dt.strftime(fmt)\n'1915-08-05 00:00:00 CET+0100'\n>>> str(switch_dt - amb_dt1)\n'0:24:01'\n>>> str(switch_dt - amb_dt2)\n'0:00:01'\n\nThe best way of creating a time during an ambiguous time period is\nby converting from another timezone such as UTC:\n\n>>> utc_dt = datetime(1915, 8, 4, 22, 36, tzinfo=pytz.utc)\n>>> utc_dt.astimezone(warsaw).strftime(fmt)\n'1915-08-04 23:36:00 CET+0100'\n\nThe standard Python way of handling all these ambiguities is not to\nhandle them, such as demonstrated in this example using the US/Eastern\ntimezone definition from the Python documentation (Note that this\nimplementation only works for dates between 1987 and 2006 - it is\nincluded for tests only!):\n\n>>> from pytz.reference import Eastern # pytz.reference only for tests\n>>> dt = datetime(2002, 10, 27, 0, 30, tzinfo=Eastern)\n>>> str(dt)\n'2002-10-27 00:30:00-04:00'\n>>> str(dt + timedelta(hours=1))\n'2002-10-27 01:30:00-05:00'\n>>> str(dt + timedelta(hours=2))\n'2002-10-27 02:30:00-05:00'\n>>> str(dt + timedelta(hours=3))\n'2002-10-27 03:30:00-05:00'\n\nNotice the first two results? At first glance you might think they are\ncorrect, but taking the UTC offset into account you find that they are\nactually two hours appart instead of the 1 hour we asked for.\n\n>>> from pytz.reference import UTC # pytz.reference only for tests\n>>> str(dt.astimezone(UTC))\n'2002-10-27 04:30:00+00:00'\n>>> str((dt + timedelta(hours=1)).astimezone(UTC))\n'2002-10-27 06:30:00+00:00'\n\n\nCountry Information\n~~~~~~~~~~~~~~~~~~~\n\nA mechanism is provided to access the timezones commonly in use\nfor a particular country, looked up using the ISO 3166 country code.\nIt returns a list of strings that can be used to retrieve the relevant\ntzinfo instance using ``pytz.timezone()``:\n\n>>> print(' '.join(pytz.country_timezones['nz']))\nPacific/Auckland Pacific/Chatham\n\nThe Olson database comes with a ISO 3166 country code to English country\nname mapping that pytz exposes as a dictionary:\n\n>>> print(pytz.country_names['nz'])\nNew Zealand\n\n\nWhat is UTC\n~~~~~~~~~~~\n\n'UTC' is `Coordinated Universal Time`_. It is a successor to, but distinct\nfrom, Greenwich Mean Time (GMT) and the various definitions of Universal\nTime. UTC is now the worldwide standard for regulating clocks and time\nmeasurement.\n\nAll other timezones are defined relative to UTC, and include offsets like\nUTC+0800 - hours to add or subtract from UTC to derive the local time. No\ndaylight saving time occurs in UTC, making it a useful timezone to perform\ndate arithmetic without worrying about the confusion and ambiguities caused\nby daylight saving time transitions, your country changing its timezone, or\nmobile computers that roam through multiple timezones.\n\n.. _Coordinated Universal Time: https://en.wikipedia.org/wiki/Coordinated_Universal_Time\n\n\nHelpers\n~~~~~~~\n\nThere are two lists of timezones provided.\n\n``all_timezones`` is the exhaustive list of the timezone names that can\nbe used.\n\n>>> from pytz import all_timezones\n>>> len(all_timezones) >= 500\nTrue\n>>> 'Etc/Greenwich' in all_timezones\nTrue\n\n``common_timezones`` is a list of useful, current timezones. It doesn't\ncontain deprecated zones or historical zones, except for a few I've\ndeemed in common usage, such as US/Eastern (open a bug report if you\nthink other timezones are deserving of being included here). It is also\na sequence of strings.\n\n>>> from pytz import common_timezones\n>>> len(common_timezones) < len(all_timezones)\nTrue\n>>> 'Etc/Greenwich' in common_timezones\nFalse\n>>> 'Australia/Melbourne' in common_timezones\nTrue\n>>> 'US/Eastern' in common_timezones\nTrue\n>>> 'Canada/Eastern' in common_timezones\nTrue\n>>> 'Australia/Yancowinna' in all_timezones\nTrue\n>>> 'Australia/Yancowinna' in common_timezones\nFalse\n\nBoth ``common_timezones`` and ``all_timezones`` are alphabetically\nsorted:\n\n>>> common_timezones_dupe = common_timezones[:]\n>>> common_timezones_dupe.sort()\n>>> common_timezones == common_timezones_dupe\nTrue\n>>> all_timezones_dupe = all_timezones[:]\n>>> all_timezones_dupe.sort()\n>>> all_timezones == all_timezones_dupe\nTrue\n\n``all_timezones`` and ``common_timezones`` are also available as sets.\n\n>>> from pytz import all_timezones_set, common_timezones_set\n>>> 'US/Eastern' in all_timezones_set\nTrue\n>>> 'US/Eastern' in common_timezones_set\nTrue\n>>> 'Australia/Victoria' in common_timezones_set\nFalse\n\nYou can also retrieve lists of timezones used by particular countries\nusing the ``country_timezones()`` function. It requires an ISO-3166\ntwo letter country code.\n\n>>> from pytz import country_timezones\n>>> print(' '.join(country_timezones('ch')))\nEurope/Zurich\n>>> print(' '.join(country_timezones('CH')))\nEurope/Zurich\n\n\nInternationalization - i18n/l10n\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nPytz is an interface to the IANA database, which uses ASCII names. The `Unicode Consortium's Unicode Locales (CLDR) `_\nproject provides translations. Python packages such as\n`Babel `_\nand Thomas Khyn's `l18n `_ package can be used\nto access these translations from Python.\n\n\nLicense\n~~~~~~~\n\nMIT license.\n\nThis code is also available as part of Zope 3 under the Zope Public\nLicense, Version 2.1 (ZPL).\n\nI'm happy to relicense this code if necessary for inclusion in other\nopen source projects.\n\n\nLatest Versions\n~~~~~~~~~~~~~~~\n\nThis package will be updated after releases of the Olson timezone\ndatabase. The latest version can be downloaded from the `Python Package\nIndex `_. The code that is used\nto generate this distribution is hosted on Github and available\nusing git::\n\n git clone https://github.com/stub42/pytz.git\n\nAnnouncements of new releases are made on\n`Launchpad `_, and the\n`Atom feed `_\nhosted there.\n\n\nBugs, Feature Requests & Patches\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nBugs should be reported on `Github `_.\nFeature requests are unlikely to be considered, and efforts instead directed\nto timezone support now built into Python or packages that work with it.\n\n\nSecurity Issues\n~~~~~~~~~~~~~~~\n\nReports about security issues can be made via `Tidelift `_.\n\n\nIssues & Limitations\n~~~~~~~~~~~~~~~~~~~~\n\n- This project is in maintenance mode. Projects using Python 3.9 or later\n are best served by using the timezone functionaly now included in core\n Python and packages that work with it such as `tzdata `_.\n\n- Offsets from UTC are rounded to the nearest whole minute, so timezones\n such as Europe/Amsterdam pre 1937 will be up to 30 seconds out. This\n was a limitation of the Python datetime library.\n\n- If you think a timezone definition is incorrect, I probably can't fix\n it. pytz is a direct translation of the Olson timezone database, and\n changes to the timezone definitions need to be made to this source.\n If you find errors they should be reported to the time zone mailing\n list, linked from http://www.iana.org/time-zones.\n\n\nFurther Reading\n~~~~~~~~~~~~~~~\n\nMore info than you want to know about timezones:\nhttps://data.iana.org/time-zones/tz-link.html\n\n\nContact\n~~~~~~~\n\nStuart Bishop ", + "release_date": "2023-09-05T01:56:58", "parties": [ { "type": "person", @@ -6683,6 +6684,7 @@ "Programming Language :: Python :: 3.1", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", @@ -6694,11 +6696,11 @@ "Topic :: Software Development :: Libraries :: Python Modules" ], "homepage_url": "http://pythonhosted.org/pytz", - "download_url": "https://files.pythonhosted.org/packages/5e/32/12032aa8c673ee16707a9b6cdda2b09c0089131f35af55d443b6a9c69c1d/pytz-2023.3.tar.gz", - "size": 317095, + "download_url": "https://files.pythonhosted.org/packages/69/4f/7bf883f12ad496ecc9514cd9e267b29a68b3e9629661a2bbc24f80eff168/pytz-2023.3.post1.tar.gz", + "size": 316899, "sha1": null, - "md5": "fe54c8f8a1544b4e78b523b264ab071b", - "sha256": "1d8ce29db189191fb55338ee6d0387d82ab59f3d00eac103412d64e0ebd0c588", + "md5": "84e6569fcc917b096cca1063819c4ab0", + "sha256": "7b4fddbeb94a1eba4b557da24f19fdf9db575192544270a9101d8509f9f43d7b", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -6718,9 +6720,9 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/pytz/2023.3/json", + "api_data_url": "https://pypi.org/pypi/pytz/2023.3.post1/json", "datasource_id": null, - "purl": "pkg:pypi/pytz@2023.3" + "purl": "pkg:pypi/pytz@2023.3.post1" }, { "type": "pypi", @@ -8207,7 +8209,7 @@ { "package": "pkg:pypi/babel@2.9.1", "dependencies": [ - "pkg:pypi/pytz@2023.3" + "pkg:pypi/pytz@2023.3.post1" ] }, { @@ -8243,7 +8245,7 @@ "dependencies": [ "pkg:pypi/billiard@3.6.4.0", "pkg:pypi/kombu@4.6.11", - "pkg:pypi/pytz@2023.3", + "pkg:pypi/pytz@2023.3.post1", "pkg:pypi/vine@1.3.0" ] }, @@ -8560,7 +8562,7 @@ "dependencies": [] }, { - "package": "pkg:pypi/pytz@2023.3", + "package": "pkg:pypi/pytz@2023.3.post1", "dependencies": [] }, { diff --git a/tests/data/insecure-setup/setup.py-expected.json b/tests/data/insecure-setup/setup.py-expected.json index 91ce7d1..ec7aa5c 100644 --- a/tests/data/insecure-setup/setup.py-expected.json +++ b/tests/data/insecure-setup/setup.py-expected.json @@ -16,7 +16,7 @@ "files": [ { "type": "file", - "path": "/home/tg1999/Desktop/example/tools/python-inspector/tests/data/insecure-setup/setup.py", + "path": "/home/frank/sources/github/nexB/python-inspector/tests/data/insecure-setup/setup.py", "package_data": [ { "type": "pypi", diff --git a/tests/data/pdt-requirements.txt-expected.json b/tests/data/pdt-requirements.txt-expected.json index 759729f..fc82409 100644 --- a/tests/data/pdt-requirements.txt-expected.json +++ b/tests/data/pdt-requirements.txt-expected.json @@ -4,7 +4,7 @@ "tool_homepageurl": "https://github.com/nexB/python-inspector", "tool_version": "0.9.8", "options": [ - "--requirement /home/tg1999/Desktop/example/tools/python-inspector/tests/data/pdt-requirements.txt", + "--requirement /home/frank/sources/github/nexB/python-inspector/tests/data/pdt-requirements.txt", "--index-url https://pypi.org/simple", "--python-version 38", "--operating-system linux", @@ -17,7 +17,7 @@ "files": [ { "type": "file", - "path": "/home/tg1999/Desktop/example/tools/python-inspector/tests/data/pdt-requirements.txt", + "path": "/home/frank/sources/github/nexB/python-inspector/tests/data/pdt-requirements.txt", "package_data": [ { "type": "pypi", diff --git a/tests/data/pinned-pdt-requirements.txt-expected.json b/tests/data/pinned-pdt-requirements.txt-expected.json index bf65322..34511f3 100644 --- a/tests/data/pinned-pdt-requirements.txt-expected.json +++ b/tests/data/pinned-pdt-requirements.txt-expected.json @@ -4,7 +4,7 @@ "tool_homepageurl": "https://github.com/nexB/python-inspector", "tool_version": "0.9.8", "options": [ - "--requirement /home/tg1999/Desktop/example/tools/python-inspector/tests/data/pinned-pdt-requirements.txt", + "--requirement /home/frank/sources/github/nexB/python-inspector/tests/data/pinned-pdt-requirements.txt", "--index-url https://pypi.org/simple", "--python-version 38", "--operating-system linux", @@ -17,7 +17,7 @@ "files": [ { "type": "file", - "path": "/home/tg1999/Desktop/example/tools/python-inspector/tests/data/pinned-pdt-requirements.txt", + "path": "/home/frank/sources/github/nexB/python-inspector/tests/data/pinned-pdt-requirements.txt", "package_data": [ { "type": "pypi", diff --git a/tests/data/pinned-requirements.txt-expected.json b/tests/data/pinned-requirements.txt-expected.json index 94e3456..ff84303 100644 --- a/tests/data/pinned-requirements.txt-expected.json +++ b/tests/data/pinned-requirements.txt-expected.json @@ -4,7 +4,7 @@ "tool_homepageurl": "https://github.com/nexB/python-inspector", "tool_version": "0.9.8", "options": [ - "--requirement /home/tg1999/Desktop/example/tools/python-inspector/tests/data/pinned-requirements.txt", + "--requirement /home/frank/sources/github/nexB/python-inspector/tests/data/pinned-requirements.txt", "--index-url https://pypi.org/simple", "--python-version 38", "--operating-system linux", @@ -17,7 +17,7 @@ "files": [ { "type": "file", - "path": "/home/tg1999/Desktop/example/tools/python-inspector/tests/data/pinned-requirements.txt", + "path": "/home/frank/sources/github/nexB/python-inspector/tests/data/pinned-requirements.txt", "package_data": [ { "type": "pypi", diff --git a/tests/data/setup/no-direct-dependencies-setup.py-expected.json b/tests/data/setup/no-direct-dependencies-setup.py-expected.json index 23268a9..5e01946 100644 --- a/tests/data/setup/no-direct-dependencies-setup.py-expected.json +++ b/tests/data/setup/no-direct-dependencies-setup.py-expected.json @@ -16,7 +16,7 @@ "files": [ { "type": "file", - "path": "/home/tg1999/Desktop/example/tools/python-inspector/tests/data/setup/no-direct-dependencies-setup.py", + "path": "/home/frank/sources/github/nexB/python-inspector/tests/data/setup/no-direct-dependencies-setup.py", "package_data": [ { "type": "pypi", diff --git a/tests/data/setup/simple-setup.py-expected.json b/tests/data/setup/simple-setup.py-expected.json index 9d6ef61..e0fc596 100644 --- a/tests/data/setup/simple-setup.py-expected.json +++ b/tests/data/setup/simple-setup.py-expected.json @@ -16,7 +16,7 @@ "files": [ { "type": "file", - "path": "/home/tg1999/Desktop/example/tools/python-inspector/tests/data/setup/simple-setup.py", + "path": "/home/frank/sources/github/nexB/python-inspector/tests/data/setup/simple-setup.py", "package_data": [ { "type": "pypi", diff --git a/tests/data/setup/spdx-setup.py-expected.json b/tests/data/setup/spdx-setup.py-expected.json index 0dd39ee..a0faf5e 100644 --- a/tests/data/setup/spdx-setup.py-expected.json +++ b/tests/data/setup/spdx-setup.py-expected.json @@ -16,7 +16,7 @@ "files": [ { "type": "file", - "path": "/home/tg1999/Desktop/example/tools/python-inspector/tests/data/setup/spdx-setup.py", + "path": "/home/frank/sources/github/nexB/python-inspector/tests/data/setup/spdx-setup.py", "package_data": [ { "type": "pypi", diff --git a/tests/data/single-url-except-simple-expected.json b/tests/data/single-url-except-simple-expected.json index bb3fa21..a701e95 100644 --- a/tests/data/single-url-except-simple-expected.json +++ b/tests/data/single-url-except-simple-expected.json @@ -152,12 +152,12 @@ "type": "pypi", "namespace": null, "name": "click", - "version": "8.1.6", + "version": "8.1.7", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "Composable command line interface toolkit\n\\$ click\\_\n==========\n\nClick is a Python package for creating beautiful command line interfaces\nin a composable way with as little code as necessary. It's the \"Command\nLine Interface Creation Kit\". It's highly configurable but comes with\nsensible defaults out of the box.\n\nIt aims to make the process of writing command line tools quick and fun\nwhile also preventing any frustration caused by the inability to\nimplement an intended CLI API.\n\nClick in three points:\n\n- Arbitrary nesting of commands\n- Automatic help page generation\n- Supports lazy loading of subcommands at runtime\n\n\nInstalling\n----------\n\nInstall and update using `pip`_:\n\n.. code-block:: text\n\n $ pip install -U click\n\n.. _pip: https://pip.pypa.io/en/stable/getting-started/\n\n\nA Simple Example\n----------------\n\n.. code-block:: python\n\n import click\n\n @click.command()\n @click.option(\"--count\", default=1, help=\"Number of greetings.\")\n @click.option(\"--name\", prompt=\"Your name\", help=\"The person to greet.\")\n def hello(count, name):\n \"\"\"Simple program that greets NAME for a total of COUNT times.\"\"\"\n for _ in range(count):\n click.echo(f\"Hello, {name}!\")\n\n if __name__ == '__main__':\n hello()\n\n.. code-block:: text\n\n $ python hello.py --count=3\n Your name: Click\n Hello, Click!\n Hello, Click!\n Hello, Click!\n\n\nDonate\n------\n\nThe Pallets organization develops and supports Click and other popular\npackages. In order to grow the community of contributors and users, and\nallow the maintainers to devote more time to the projects, `please\ndonate today`_.\n\n.. _please donate today: https://palletsprojects.com/donate\n\n\nLinks\n-----\n\n- Documentation: https://click.palletsprojects.com/\n- Changes: https://click.palletsprojects.com/changes/\n- PyPI Releases: https://pypi.org/project/click/\n- Source Code: https://github.com/pallets/click\n- Issue Tracker: https://github.com/pallets/click/issues\n- Chat: https://discord.gg/pallets", - "release_date": "2023-07-18T20:05:12", + "release_date": "2023-08-17T17:29:10", "parties": [ { "type": "person", @@ -174,11 +174,11 @@ "Programming Language :: Python" ], "homepage_url": "https://palletsprojects.com/p/click/", - "download_url": "https://files.pythonhosted.org/packages/1a/70/e63223f8116931d365993d4a6b7ef653a4d920b41d03de7c59499962821f/click-8.1.6-py3-none-any.whl", - "size": 97909, + "download_url": "https://files.pythonhosted.org/packages/00/2e/d53fa4befbf2cfa713304affc7ca780ce4fc1fd8710527771b58311a3229/click-8.1.7-py3-none-any.whl", + "size": 97941, "sha1": null, - "md5": "043416d14751ae24c8e8b0968b6fff78", - "sha256": "fa244bb30b3b5ee2cae3da8f55c9e5e0c0e86093306301fb418eb9dc40fbded5", + "md5": "37a41134cc8a13400234746942d5d180", + "sha256": "ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28", "sha512": null, "bug_tracking_url": "https://github.com/pallets/click/issues/", "code_view_url": "https://github.com/pallets/click/", @@ -198,20 +198,20 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/click/8.1.6/json", + "api_data_url": "https://pypi.org/pypi/click/8.1.7/json", "datasource_id": null, - "purl": "pkg:pypi/click@8.1.6" + "purl": "pkg:pypi/click@8.1.7" }, { "type": "pypi", "namespace": null, "name": "click", - "version": "8.1.6", + "version": "8.1.7", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "Composable command line interface toolkit\n\\$ click\\_\n==========\n\nClick is a Python package for creating beautiful command line interfaces\nin a composable way with as little code as necessary. It's the \"Command\nLine Interface Creation Kit\". It's highly configurable but comes with\nsensible defaults out of the box.\n\nIt aims to make the process of writing command line tools quick and fun\nwhile also preventing any frustration caused by the inability to\nimplement an intended CLI API.\n\nClick in three points:\n\n- Arbitrary nesting of commands\n- Automatic help page generation\n- Supports lazy loading of subcommands at runtime\n\n\nInstalling\n----------\n\nInstall and update using `pip`_:\n\n.. code-block:: text\n\n $ pip install -U click\n\n.. _pip: https://pip.pypa.io/en/stable/getting-started/\n\n\nA Simple Example\n----------------\n\n.. code-block:: python\n\n import click\n\n @click.command()\n @click.option(\"--count\", default=1, help=\"Number of greetings.\")\n @click.option(\"--name\", prompt=\"Your name\", help=\"The person to greet.\")\n def hello(count, name):\n \"\"\"Simple program that greets NAME for a total of COUNT times.\"\"\"\n for _ in range(count):\n click.echo(f\"Hello, {name}!\")\n\n if __name__ == '__main__':\n hello()\n\n.. code-block:: text\n\n $ python hello.py --count=3\n Your name: Click\n Hello, Click!\n Hello, Click!\n Hello, Click!\n\n\nDonate\n------\n\nThe Pallets organization develops and supports Click and other popular\npackages. In order to grow the community of contributors and users, and\nallow the maintainers to devote more time to the projects, `please\ndonate today`_.\n\n.. _please donate today: https://palletsprojects.com/donate\n\n\nLinks\n-----\n\n- Documentation: https://click.palletsprojects.com/\n- Changes: https://click.palletsprojects.com/changes/\n- PyPI Releases: https://pypi.org/project/click/\n- Source Code: https://github.com/pallets/click\n- Issue Tracker: https://github.com/pallets/click/issues\n- Chat: https://discord.gg/pallets", - "release_date": "2023-07-18T20:05:13", + "release_date": "2023-08-17T17:29:11", "parties": [ { "type": "person", @@ -228,11 +228,11 @@ "Programming Language :: Python" ], "homepage_url": "https://palletsprojects.com/p/click/", - "download_url": "https://files.pythonhosted.org/packages/72/bd/fedc277e7351917b6c4e0ac751853a97af261278a4c7808babafa8ef2120/click-8.1.6.tar.gz", - "size": 336051, + "download_url": "https://files.pythonhosted.org/packages/96/d3/f04c7bfcf5c1862a2a5b845c6b2b360488cf47af55dfa79c98f6a6bf98b5/click-8.1.7.tar.gz", + "size": 336121, "sha1": null, - "md5": "0ad74cc10856930a76b0560ccc55c162", - "sha256": "48ee849951919527a045bfe3bf7baa8a959c423134e1a5b98c05c20ba75a1cbd", + "md5": "7c3b52c56fd30699f453a7dc7b42cecb", + "sha256": "ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de", "sha512": null, "bug_tracking_url": "https://github.com/pallets/click/issues/", "code_view_url": "https://github.com/pallets/click/", @@ -252,28 +252,21 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/click/8.1.6/json", + "api_data_url": "https://pypi.org/pypi/click/8.1.7/json", "datasource_id": null, - "purl": "pkg:pypi/click@8.1.6" + "purl": "pkg:pypi/click@8.1.7" }, { "type": "pypi", "namespace": null, "name": "flask", - "version": "2.3.2", + "version": "2.3.3", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "A simple framework for building complex web applications.\nFlask\n=====\n\nFlask is a lightweight `WSGI`_ web application framework. It is designed\nto make getting started quick and easy, with the ability to scale up to\ncomplex applications. It began as a simple wrapper around `Werkzeug`_\nand `Jinja`_ and has become one of the most popular Python web\napplication frameworks.\n\nFlask offers suggestions, but doesn't enforce any dependencies or\nproject layout. It is up to the developer to choose the tools and\nlibraries they want to use. There are many extensions provided by the\ncommunity that make adding new functionality easy.\n\n.. _WSGI: https://wsgi.readthedocs.io/\n.. _Werkzeug: https://werkzeug.palletsprojects.com/\n.. _Jinja: https://jinja.palletsprojects.com/\n\n\nInstalling\n----------\n\nInstall and update using `pip`_:\n\n.. code-block:: text\n\n $ pip install -U Flask\n\n.. _pip: https://pip.pypa.io/en/stable/getting-started/\n\n\nA Simple Example\n----------------\n\n.. code-block:: python\n\n # save this as app.py\n from flask import Flask\n\n app = Flask(__name__)\n\n @app.route(\"/\")\n def hello():\n return \"Hello, World!\"\n\n.. code-block:: text\n\n $ flask run\n * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)\n\n\nContributing\n------------\n\nFor guidance on setting up a development environment and how to make a\ncontribution to Flask, see the `contributing guidelines`_.\n\n.. _contributing guidelines: https://github.com/pallets/flask/blob/main/CONTRIBUTING.rst\n\n\nDonate\n------\n\nThe Pallets organization develops and supports Flask and the libraries\nit uses. In order to grow the community of contributors and users, and\nallow the maintainers to devote more time to the projects, `please\ndonate today`_.\n\n.. _please donate today: https://palletsprojects.com/donate\n\n\nLinks\n-----\n\n- Documentation: https://flask.palletsprojects.com/\n- Changes: https://flask.palletsprojects.com/changes/\n- PyPI Releases: https://pypi.org/project/Flask/\n- Source Code: https://github.com/pallets/flask/\n- Issue Tracker: https://github.com/pallets/flask/issues/\n- Chat: https://discord.gg/pallets", - "release_date": "2023-05-01T15:42:08", + "release_date": "2023-08-21T19:52:33", "parties": [ - { - "type": "person", - "role": "author", - "name": null, - "email": "Armin Ronacher ", - "url": null - }, { "type": "person", "role": "maintainer", @@ -295,11 +288,11 @@ "Topic :: Software Development :: Libraries :: Application Frameworks" ], "homepage_url": "", - "download_url": "https://files.pythonhosted.org/packages/fa/1a/f191d32818e5cd985bdd3f47a6e4f525e2db1ce5e8150045ca0c31813686/Flask-2.3.2-py3-none-any.whl", - "size": 96867, + "download_url": "https://files.pythonhosted.org/packages/fd/56/26f0be8adc2b4257df20c1c4260ddd0aa396cf8e75d90ab2f7ff99bc34f9/flask-2.3.3-py3-none-any.whl", + "size": 96112, "sha1": null, - "md5": "2f059837d4c9e51a62de0fd061e9c947", - "sha256": "77fd4e1249d8c9923de34907236b747ced06e5467ecac1a7bb7115ae0e9670b0", + "md5": "acbf286236b8040816042af736f2adb5", + "sha256": "f69fcd559dc907ed196ab9df0e48471709175e696d6e698dd4dbe940f96ce66b", "sha512": null, "bug_tracking_url": "https://github.com/pallets/flask/issues/", "code_view_url": "https://github.com/pallets/flask/", @@ -307,7 +300,6 @@ "copyright": null, "license_expression": null, "declared_license": { - "license": "BSD-3-Clause", "classifiers": [ "License :: OSI Approved :: BSD License" ] @@ -319,28 +311,21 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/flask/2.3.2/json", + "api_data_url": "https://pypi.org/pypi/flask/2.3.3/json", "datasource_id": null, - "purl": "pkg:pypi/flask@2.3.2" + "purl": "pkg:pypi/flask@2.3.3" }, { "type": "pypi", "namespace": null, "name": "flask", - "version": "2.3.2", + "version": "2.3.3", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "A simple framework for building complex web applications.\nFlask\n=====\n\nFlask is a lightweight `WSGI`_ web application framework. It is designed\nto make getting started quick and easy, with the ability to scale up to\ncomplex applications. It began as a simple wrapper around `Werkzeug`_\nand `Jinja`_ and has become one of the most popular Python web\napplication frameworks.\n\nFlask offers suggestions, but doesn't enforce any dependencies or\nproject layout. It is up to the developer to choose the tools and\nlibraries they want to use. There are many extensions provided by the\ncommunity that make adding new functionality easy.\n\n.. _WSGI: https://wsgi.readthedocs.io/\n.. _Werkzeug: https://werkzeug.palletsprojects.com/\n.. _Jinja: https://jinja.palletsprojects.com/\n\n\nInstalling\n----------\n\nInstall and update using `pip`_:\n\n.. code-block:: text\n\n $ pip install -U Flask\n\n.. _pip: https://pip.pypa.io/en/stable/getting-started/\n\n\nA Simple Example\n----------------\n\n.. code-block:: python\n\n # save this as app.py\n from flask import Flask\n\n app = Flask(__name__)\n\n @app.route(\"/\")\n def hello():\n return \"Hello, World!\"\n\n.. code-block:: text\n\n $ flask run\n * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)\n\n\nContributing\n------------\n\nFor guidance on setting up a development environment and how to make a\ncontribution to Flask, see the `contributing guidelines`_.\n\n.. _contributing guidelines: https://github.com/pallets/flask/blob/main/CONTRIBUTING.rst\n\n\nDonate\n------\n\nThe Pallets organization develops and supports Flask and the libraries\nit uses. In order to grow the community of contributors and users, and\nallow the maintainers to devote more time to the projects, `please\ndonate today`_.\n\n.. _please donate today: https://palletsprojects.com/donate\n\n\nLinks\n-----\n\n- Documentation: https://flask.palletsprojects.com/\n- Changes: https://flask.palletsprojects.com/changes/\n- PyPI Releases: https://pypi.org/project/Flask/\n- Source Code: https://github.com/pallets/flask/\n- Issue Tracker: https://github.com/pallets/flask/issues/\n- Chat: https://discord.gg/pallets", - "release_date": "2023-05-01T15:42:12", + "release_date": "2023-08-21T19:52:35", "parties": [ - { - "type": "person", - "role": "author", - "name": null, - "email": "Armin Ronacher ", - "url": null - }, { "type": "person", "role": "maintainer", @@ -362,11 +347,11 @@ "Topic :: Software Development :: Libraries :: Application Frameworks" ], "homepage_url": "", - "download_url": "https://files.pythonhosted.org/packages/4d/00/ef81c18da32fdfcde6381c315f4b11597fb6691180a330418848efee0ae7/Flask-2.3.2.tar.gz", - "size": 686251, + "download_url": "https://files.pythonhosted.org/packages/46/b7/4ace17e37abd9c21715dea5ee11774a25e404c486a7893fa18e764326ead/flask-2.3.3.tar.gz", + "size": 672756, "sha1": null, - "md5": "a5d5fe05dff5c6e0d28ece3fb03ef5cd", - "sha256": "8c2f9abd47a9e8df7f0c3f091ce9497d011dc3b31effcf4c85a6e2b50f4114ef", + "md5": "87c2f9544380d251e7054b960547ee7f", + "sha256": "09c347a92aa7ff4a8e7f3206795f30d826654baf38b873d0744cd571ca609efc", "sha512": null, "bug_tracking_url": "https://github.com/pallets/flask/issues/", "code_view_url": "https://github.com/pallets/flask/", @@ -374,7 +359,6 @@ "copyright": null, "license_expression": null, "declared_license": { - "license": "BSD-3-Clause", "classifiers": [ "License :: OSI Approved :: BSD License" ] @@ -386,9 +370,9 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/flask/2.3.2/json", + "api_data_url": "https://pypi.org/pypi/flask/2.3.3/json", "datasource_id": null, - "purl": "pkg:pypi/flask@2.3.2" + "purl": "pkg:pypi/flask@2.3.3" }, { "type": "pypi", @@ -864,12 +848,12 @@ "type": "pypi", "namespace": null, "name": "werkzeug", - "version": "2.3.6", + "version": "2.3.7", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "The comprehensive WSGI web application library.\nWerkzeug\n========\n\n*werkzeug* German noun: \"tool\". Etymology: *werk* (\"work\"), *zeug* (\"stuff\")\n\nWerkzeug is a comprehensive `WSGI`_ web application library. It began as\na simple collection of various utilities for WSGI applications and has\nbecome one of the most advanced WSGI utility libraries.\n\nIt includes:\n\n- An interactive debugger that allows inspecting stack traces and\n source code in the browser with an interactive interpreter for any\n frame in the stack.\n- A full-featured request object with objects to interact with\n headers, query args, form data, files, and cookies.\n- A response object that can wrap other WSGI applications and handle\n streaming data.\n- A routing system for matching URLs to endpoints and generating URLs\n for endpoints, with an extensible system for capturing variables\n from URLs.\n- HTTP utilities to handle entity tags, cache control, dates, user\n agents, cookies, files, and more.\n- A threaded WSGI server for use while developing applications\n locally.\n- A test client for simulating HTTP requests during testing without\n requiring running a server.\n\nWerkzeug doesn't enforce any dependencies. It is up to the developer to\nchoose a template engine, database adapter, and even how to handle\nrequests. It can be used to build all sorts of end user applications\nsuch as blogs, wikis, or bulletin boards.\n\n`Flask`_ wraps Werkzeug, using it to handle the details of WSGI while\nproviding more structure and patterns for defining powerful\napplications.\n\n.. _WSGI: https://wsgi.readthedocs.io/en/latest/\n.. _Flask: https://www.palletsprojects.com/p/flask/\n\n\nInstalling\n----------\n\nInstall and update using `pip`_:\n\n.. code-block:: text\n\n pip install -U Werkzeug\n\n.. _pip: https://pip.pypa.io/en/stable/getting-started/\n\n\nA Simple Example\n----------------\n\n.. code-block:: python\n\n from werkzeug.wrappers import Request, Response\n\n @Request.application\n def application(request):\n return Response('Hello, World!')\n\n if __name__ == '__main__':\n from werkzeug.serving import run_simple\n run_simple('localhost', 4000, application)\n\n\nDonate\n------\n\nThe Pallets organization develops and supports Werkzeug and other\npopular packages. In order to grow the community of contributors and\nusers, and allow the maintainers to devote more time to the projects,\n`please donate today`_.\n\n.. _please donate today: https://palletsprojects.com/donate\n\n\nLinks\n-----\n\n- Documentation: https://werkzeug.palletsprojects.com/\n- Changes: https://werkzeug.palletsprojects.com/changes/\n- PyPI Releases: https://pypi.org/project/Werkzeug/\n- Source Code: https://github.com/pallets/werkzeug/\n- Issue Tracker: https://github.com/pallets/werkzeug/issues/\n- Chat: https://discord.gg/pallets", - "release_date": "2023-06-08T21:26:53", + "release_date": "2023-08-14T09:30:45", "parties": [ { "type": "person", @@ -892,11 +876,11 @@ "Topic :: Software Development :: Libraries :: Application Frameworks" ], "homepage_url": "", - "download_url": "https://files.pythonhosted.org/packages/ba/d6/8040faecaba2feb84e1647af174b3243c9b90c163c7ea407820839931efe/Werkzeug-2.3.6-py3-none-any.whl", - "size": 242499, + "download_url": "https://files.pythonhosted.org/packages/9b/59/a7c32e3d8d0e546a206e0552a2c04444544f15c1da4a01df8938d20c6ffc/werkzeug-2.3.7-py3-none-any.whl", + "size": 242216, "sha1": null, - "md5": "17e53591926aee3ce1663b03a1497758", - "sha256": "935539fa1413afbb9195b24880778422ed620c0fc09670945185cce4d91a8890", + "md5": "201b5bf3fa4dd3eb572704a6e61e69de", + "sha256": "effc12dba7f3bd72e605ce49807bbe692bd729c3bb122a3b91747a6ae77df528", "sha512": null, "bug_tracking_url": "https://github.com/pallets/werkzeug/issues/", "code_view_url": "https://github.com/pallets/werkzeug/", @@ -904,7 +888,6 @@ "copyright": null, "license_expression": null, "declared_license": { - "license": "BSD-3-Clause", "classifiers": [ "License :: OSI Approved :: BSD License" ] @@ -916,20 +899,20 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/werkzeug/2.3.6/json", + "api_data_url": "https://pypi.org/pypi/werkzeug/2.3.7/json", "datasource_id": null, - "purl": "pkg:pypi/werkzeug@2.3.6" + "purl": "pkg:pypi/werkzeug@2.3.7" }, { "type": "pypi", "namespace": null, "name": "werkzeug", - "version": "2.3.6", + "version": "2.3.7", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "The comprehensive WSGI web application library.\nWerkzeug\n========\n\n*werkzeug* German noun: \"tool\". Etymology: *werk* (\"work\"), *zeug* (\"stuff\")\n\nWerkzeug is a comprehensive `WSGI`_ web application library. It began as\na simple collection of various utilities for WSGI applications and has\nbecome one of the most advanced WSGI utility libraries.\n\nIt includes:\n\n- An interactive debugger that allows inspecting stack traces and\n source code in the browser with an interactive interpreter for any\n frame in the stack.\n- A full-featured request object with objects to interact with\n headers, query args, form data, files, and cookies.\n- A response object that can wrap other WSGI applications and handle\n streaming data.\n- A routing system for matching URLs to endpoints and generating URLs\n for endpoints, with an extensible system for capturing variables\n from URLs.\n- HTTP utilities to handle entity tags, cache control, dates, user\n agents, cookies, files, and more.\n- A threaded WSGI server for use while developing applications\n locally.\n- A test client for simulating HTTP requests during testing without\n requiring running a server.\n\nWerkzeug doesn't enforce any dependencies. It is up to the developer to\nchoose a template engine, database adapter, and even how to handle\nrequests. It can be used to build all sorts of end user applications\nsuch as blogs, wikis, or bulletin boards.\n\n`Flask`_ wraps Werkzeug, using it to handle the details of WSGI while\nproviding more structure and patterns for defining powerful\napplications.\n\n.. _WSGI: https://wsgi.readthedocs.io/en/latest/\n.. _Flask: https://www.palletsprojects.com/p/flask/\n\n\nInstalling\n----------\n\nInstall and update using `pip`_:\n\n.. code-block:: text\n\n pip install -U Werkzeug\n\n.. _pip: https://pip.pypa.io/en/stable/getting-started/\n\n\nA Simple Example\n----------------\n\n.. code-block:: python\n\n from werkzeug.wrappers import Request, Response\n\n @Request.application\n def application(request):\n return Response('Hello, World!')\n\n if __name__ == '__main__':\n from werkzeug.serving import run_simple\n run_simple('localhost', 4000, application)\n\n\nDonate\n------\n\nThe Pallets organization develops and supports Werkzeug and other\npopular packages. In order to grow the community of contributors and\nusers, and allow the maintainers to devote more time to the projects,\n`please donate today`_.\n\n.. _please donate today: https://palletsprojects.com/donate\n\n\nLinks\n-----\n\n- Documentation: https://werkzeug.palletsprojects.com/\n- Changes: https://werkzeug.palletsprojects.com/changes/\n- PyPI Releases: https://pypi.org/project/Werkzeug/\n- Source Code: https://github.com/pallets/werkzeug/\n- Issue Tracker: https://github.com/pallets/werkzeug/issues/\n- Chat: https://discord.gg/pallets", - "release_date": "2023-06-08T21:26:55", + "release_date": "2023-08-14T09:30:46", "parties": [ { "type": "person", @@ -952,11 +935,11 @@ "Topic :: Software Development :: Libraries :: Application Frameworks" ], "homepage_url": "", - "download_url": "https://files.pythonhosted.org/packages/d1/7e/c35cea5749237d40effc50ed1a1c7518d9f2e768fcf30b4e9ea119e74975/Werkzeug-2.3.6.tar.gz", - "size": 833282, + "download_url": "https://files.pythonhosted.org/packages/ef/56/0acc9f560053478a4987fa35c95d904f04b6915f6b5c4d1c14dc8862ba0a/werkzeug-2.3.7.tar.gz", + "size": 819625, "sha1": null, - "md5": "de26f240d6f95689a8d15170c2d958b6", - "sha256": "98c774df2f91b05550078891dee5f0eb0cb797a522c757a2452b9cee5b202330", + "md5": "31bb8f7f0be8724e6da89df0f6fc5d12", + "sha256": "2b8c0e447b4b9dbcc85dd97b6eeb4dcbaf6c8b6c3be0bd654e25553e0a2157d8", "sha512": null, "bug_tracking_url": "https://github.com/pallets/werkzeug/issues/", "code_view_url": "https://github.com/pallets/werkzeug/", @@ -964,7 +947,6 @@ "copyright": null, "license_expression": null, "declared_license": { - "license": "BSD-3-Clause", "classifiers": [ "License :: OSI Approved :: BSD License" ] @@ -976,20 +958,20 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/werkzeug/2.3.6/json", + "api_data_url": "https://pypi.org/pypi/werkzeug/2.3.7/json", "datasource_id": null, - "purl": "pkg:pypi/werkzeug@2.3.6" + "purl": "pkg:pypi/werkzeug@2.3.7" }, { "type": "pypi", "namespace": null, "name": "zipp", - "version": "3.16.2", + "version": "3.17.0", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "Backport of pathlib-compatible object wrapper for zip files\n.. image:: https://img.shields.io/pypi/v/zipp.svg\n :target: https://pypi.org/project/zipp\n\n.. image:: https://img.shields.io/pypi/pyversions/zipp.svg\n\n.. image:: https://github.com/jaraco/zipp/workflows/tests/badge.svg\n :target: https://github.com/jaraco/zipp/actions?query=workflow%3A%22tests%22\n :alt: tests\n\n.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json\n :target: https://github.com/astral-sh/ruff\n :alt: Ruff\n\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n :target: https://github.com/psf/black\n :alt: Code style: Black\n\n.. .. image:: https://readthedocs.org/projects/PROJECT_RTD/badge/?version=latest\n.. :target: https://PROJECT_RTD.readthedocs.io/en/latest/?badge=latest\n\n.. image:: https://img.shields.io/badge/skeleton-2023-informational\n :target: https://blog.jaraco.com/skeleton\n\n.. image:: https://tidelift.com/badges/package/pypi/zipp\n :target: https://tidelift.com/subscription/pkg/pypi-zipp?utm_source=pypi-zipp&utm_medium=readme\n\n\nA pathlib-compatible Zipfile object wrapper. Official backport of the standard library\n`Path object `_.\n\n\nCompatibility\n=============\n\nNew features are introduced in this third-party library and later merged\ninto CPython. The following table indicates which versions of this library\nwere contributed to different versions in the standard library:\n\n.. list-table::\n :header-rows: 1\n\n * - zipp\n - stdlib\n * - 3.15\n - 3.12\n * - 3.5\n - 3.11\n * - 3.2\n - 3.10\n * - 3.3 ??\n - 3.9\n * - 1.0\n - 3.8\n\n\nUsage\n=====\n\nUse ``zipp.Path`` in place of ``zipfile.Path`` on any Python.\n\nFor Enterprise\n==============\n\nAvailable as part of the Tidelift Subscription.\n\nThis project and the maintainers of thousands of other packages are working with Tidelift to deliver one enterprise subscription that covers all of the open source you use.\n\n`Learn more `_.", - "release_date": "2023-07-14T19:23:31", + "release_date": "2023-09-18T15:18:23", "parties": [ { "type": "person", @@ -1006,11 +988,11 @@ "Programming Language :: Python :: 3 :: Only" ], "homepage_url": "https://github.com/jaraco/zipp", - "download_url": "https://files.pythonhosted.org/packages/8c/08/d3006317aefe25ea79d3b76c9650afabaf6d63d1c8443b236e7405447503/zipp-3.16.2-py3-none-any.whl", - "size": 7203, + "download_url": "https://files.pythonhosted.org/packages/d9/66/48866fc6b158c81cc2bfecc04c480f105c6040e8b077bc54c634b4a67926/zipp-3.17.0-py3-none-any.whl", + "size": 7396, "sha1": null, - "md5": "4145fd62be41c39ea8d127e63b171f72", - "sha256": "679e51dd4403591b2d6838a48de3d283f3d188412a9782faadf845f298736ba0", + "md5": "d93f0b8485000b37800a6de09ed6c1cb", + "sha256": "0e923e726174922dce09c53c59ad483ff7bbb8e572e00c7f7c46b88556409f31", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -1029,20 +1011,20 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/zipp/3.16.2/json", + "api_data_url": "https://pypi.org/pypi/zipp/3.17.0/json", "datasource_id": null, - "purl": "pkg:pypi/zipp@3.16.2" + "purl": "pkg:pypi/zipp@3.17.0" }, { "type": "pypi", "namespace": null, "name": "zipp", - "version": "3.16.2", + "version": "3.17.0", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "Backport of pathlib-compatible object wrapper for zip files\n.. image:: https://img.shields.io/pypi/v/zipp.svg\n :target: https://pypi.org/project/zipp\n\n.. image:: https://img.shields.io/pypi/pyversions/zipp.svg\n\n.. image:: https://github.com/jaraco/zipp/workflows/tests/badge.svg\n :target: https://github.com/jaraco/zipp/actions?query=workflow%3A%22tests%22\n :alt: tests\n\n.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json\n :target: https://github.com/astral-sh/ruff\n :alt: Ruff\n\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n :target: https://github.com/psf/black\n :alt: Code style: Black\n\n.. .. image:: https://readthedocs.org/projects/PROJECT_RTD/badge/?version=latest\n.. :target: https://PROJECT_RTD.readthedocs.io/en/latest/?badge=latest\n\n.. image:: https://img.shields.io/badge/skeleton-2023-informational\n :target: https://blog.jaraco.com/skeleton\n\n.. image:: https://tidelift.com/badges/package/pypi/zipp\n :target: https://tidelift.com/subscription/pkg/pypi-zipp?utm_source=pypi-zipp&utm_medium=readme\n\n\nA pathlib-compatible Zipfile object wrapper. Official backport of the standard library\n`Path object `_.\n\n\nCompatibility\n=============\n\nNew features are introduced in this third-party library and later merged\ninto CPython. The following table indicates which versions of this library\nwere contributed to different versions in the standard library:\n\n.. list-table::\n :header-rows: 1\n\n * - zipp\n - stdlib\n * - 3.15\n - 3.12\n * - 3.5\n - 3.11\n * - 3.2\n - 3.10\n * - 3.3 ??\n - 3.9\n * - 1.0\n - 3.8\n\n\nUsage\n=====\n\nUse ``zipp.Path`` in place of ``zipfile.Path`` on any Python.\n\nFor Enterprise\n==============\n\nAvailable as part of the Tidelift Subscription.\n\nThis project and the maintainers of thousands of other packages are working with Tidelift to deliver one enterprise subscription that covers all of the open source you use.\n\n`Learn more `_.", - "release_date": "2023-07-14T19:23:33", + "release_date": "2023-09-18T15:18:24", "parties": [ { "type": "person", @@ -1059,11 +1041,11 @@ "Programming Language :: Python :: 3 :: Only" ], "homepage_url": "https://github.com/jaraco/zipp", - "download_url": "https://files.pythonhosted.org/packages/e2/45/f3b987ad5bf9e08095c1ebe6352238be36f25dd106fde424a160061dce6d/zipp-3.16.2.tar.gz", - "size": 20002, + "download_url": "https://files.pythonhosted.org/packages/58/03/dd5ccf4e06dec9537ecba8fcc67bbd4ea48a2791773e469e73f94c3ba9a6/zipp-3.17.0.tar.gz", + "size": 20367, "sha1": null, - "md5": "f5c13dccedc282cbe50aae5983de7fe4", - "sha256": "ebc15946aa78bd63458992fc81ec3b6f7b1e92d51c35e6de1c3804e73b799147", + "md5": "a4cf8c530da863c27a04251724436681", + "sha256": "84e64a1c28cf7e91ed2078bb8cc8c259cb19b76942096c8d7b84947690cabaf0", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -1082,9 +1064,9 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/zipp/3.16.2/json", + "api_data_url": "https://pypi.org/pypi/zipp/3.17.0/json", "datasource_id": null, - "purl": "pkg:pypi/zipp@3.16.2" + "purl": "pkg:pypi/zipp@3.17.0" } ], "resolved_dependencies_graph": [ @@ -1093,24 +1075,24 @@ "dependencies": [] }, { - "package": "pkg:pypi/click@8.1.6", + "package": "pkg:pypi/click@8.1.7", "dependencies": [] }, { - "package": "pkg:pypi/flask@2.3.2", + "package": "pkg:pypi/flask@2.3.3", "dependencies": [ "pkg:pypi/blinker@1.6.2", - "pkg:pypi/click@8.1.6", + "pkg:pypi/click@8.1.7", "pkg:pypi/importlib-metadata@6.8.0", "pkg:pypi/itsdangerous@2.1.2", "pkg:pypi/jinja2@3.1.2", - "pkg:pypi/werkzeug@2.3.6" + "pkg:pypi/werkzeug@2.3.7" ] }, { "package": "pkg:pypi/importlib-metadata@6.8.0", "dependencies": [ - "pkg:pypi/zipp@3.16.2" + "pkg:pypi/zipp@3.17.0" ] }, { @@ -1128,13 +1110,13 @@ "dependencies": [] }, { - "package": "pkg:pypi/werkzeug@2.3.6", + "package": "pkg:pypi/werkzeug@2.3.7", "dependencies": [ "pkg:pypi/markupsafe@2.1.3" ] }, { - "package": "pkg:pypi/zipp@3.16.2", + "package": "pkg:pypi/zipp@3.17.0", "dependencies": [] } ] diff --git a/tests/data/test-api-expected.json b/tests/data/test-api-expected.json index 899b288..5f7fbed 100644 --- a/tests/data/test-api-expected.json +++ b/tests/data/test-api-expected.json @@ -5,12 +5,12 @@ "type": "pypi", "namespace": null, "name": "click", - "version": "8.1.6", + "version": "8.1.7", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "Composable command line interface toolkit\n\\$ click\\_\n==========\n\nClick is a Python package for creating beautiful command line interfaces\nin a composable way with as little code as necessary. It's the \"Command\nLine Interface Creation Kit\". It's highly configurable but comes with\nsensible defaults out of the box.\n\nIt aims to make the process of writing command line tools quick and fun\nwhile also preventing any frustration caused by the inability to\nimplement an intended CLI API.\n\nClick in three points:\n\n- Arbitrary nesting of commands\n- Automatic help page generation\n- Supports lazy loading of subcommands at runtime\n\n\nInstalling\n----------\n\nInstall and update using `pip`_:\n\n.. code-block:: text\n\n $ pip install -U click\n\n.. _pip: https://pip.pypa.io/en/stable/getting-started/\n\n\nA Simple Example\n----------------\n\n.. code-block:: python\n\n import click\n\n @click.command()\n @click.option(\"--count\", default=1, help=\"Number of greetings.\")\n @click.option(\"--name\", prompt=\"Your name\", help=\"The person to greet.\")\n def hello(count, name):\n \"\"\"Simple program that greets NAME for a total of COUNT times.\"\"\"\n for _ in range(count):\n click.echo(f\"Hello, {name}!\")\n\n if __name__ == '__main__':\n hello()\n\n.. code-block:: text\n\n $ python hello.py --count=3\n Your name: Click\n Hello, Click!\n Hello, Click!\n Hello, Click!\n\n\nDonate\n------\n\nThe Pallets organization develops and supports Click and other popular\npackages. In order to grow the community of contributors and users, and\nallow the maintainers to devote more time to the projects, `please\ndonate today`_.\n\n.. _please donate today: https://palletsprojects.com/donate\n\n\nLinks\n-----\n\n- Documentation: https://click.palletsprojects.com/\n- Changes: https://click.palletsprojects.com/changes/\n- PyPI Releases: https://pypi.org/project/click/\n- Source Code: https://github.com/pallets/click\n- Issue Tracker: https://github.com/pallets/click/issues\n- Chat: https://discord.gg/pallets", - "release_date": "2023-07-18T20:05:12", + "release_date": "2023-08-17T17:29:10", "parties": [ { "type": "person", @@ -27,11 +27,11 @@ "Programming Language :: Python" ], "homepage_url": "https://palletsprojects.com/p/click/", - "download_url": "https://files.pythonhosted.org/packages/1a/70/e63223f8116931d365993d4a6b7ef653a4d920b41d03de7c59499962821f/click-8.1.6-py3-none-any.whl", - "size": 97909, + "download_url": "https://files.pythonhosted.org/packages/00/2e/d53fa4befbf2cfa713304affc7ca780ce4fc1fd8710527771b58311a3229/click-8.1.7-py3-none-any.whl", + "size": 97941, "sha1": null, - "md5": "043416d14751ae24c8e8b0968b6fff78", - "sha256": "fa244bb30b3b5ee2cae3da8f55c9e5e0c0e86093306301fb418eb9dc40fbded5", + "md5": "37a41134cc8a13400234746942d5d180", + "sha256": "ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28", "sha512": null, "bug_tracking_url": "https://github.com/pallets/click/issues/", "code_view_url": "https://github.com/pallets/click/", @@ -51,20 +51,20 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/click/8.1.6/json", + "api_data_url": "https://pypi.org/pypi/click/8.1.7/json", "datasource_id": null, - "purl": "pkg:pypi/click@8.1.6" + "purl": "pkg:pypi/click@8.1.7" }, { "type": "pypi", "namespace": null, "name": "click", - "version": "8.1.6", + "version": "8.1.7", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "Composable command line interface toolkit\n\\$ click\\_\n==========\n\nClick is a Python package for creating beautiful command line interfaces\nin a composable way with as little code as necessary. It's the \"Command\nLine Interface Creation Kit\". It's highly configurable but comes with\nsensible defaults out of the box.\n\nIt aims to make the process of writing command line tools quick and fun\nwhile also preventing any frustration caused by the inability to\nimplement an intended CLI API.\n\nClick in three points:\n\n- Arbitrary nesting of commands\n- Automatic help page generation\n- Supports lazy loading of subcommands at runtime\n\n\nInstalling\n----------\n\nInstall and update using `pip`_:\n\n.. code-block:: text\n\n $ pip install -U click\n\n.. _pip: https://pip.pypa.io/en/stable/getting-started/\n\n\nA Simple Example\n----------------\n\n.. code-block:: python\n\n import click\n\n @click.command()\n @click.option(\"--count\", default=1, help=\"Number of greetings.\")\n @click.option(\"--name\", prompt=\"Your name\", help=\"The person to greet.\")\n def hello(count, name):\n \"\"\"Simple program that greets NAME for a total of COUNT times.\"\"\"\n for _ in range(count):\n click.echo(f\"Hello, {name}!\")\n\n if __name__ == '__main__':\n hello()\n\n.. code-block:: text\n\n $ python hello.py --count=3\n Your name: Click\n Hello, Click!\n Hello, Click!\n Hello, Click!\n\n\nDonate\n------\n\nThe Pallets organization develops and supports Click and other popular\npackages. In order to grow the community of contributors and users, and\nallow the maintainers to devote more time to the projects, `please\ndonate today`_.\n\n.. _please donate today: https://palletsprojects.com/donate\n\n\nLinks\n-----\n\n- Documentation: https://click.palletsprojects.com/\n- Changes: https://click.palletsprojects.com/changes/\n- PyPI Releases: https://pypi.org/project/click/\n- Source Code: https://github.com/pallets/click\n- Issue Tracker: https://github.com/pallets/click/issues\n- Chat: https://discord.gg/pallets", - "release_date": "2023-07-18T20:05:13", + "release_date": "2023-08-17T17:29:11", "parties": [ { "type": "person", @@ -81,11 +81,11 @@ "Programming Language :: Python" ], "homepage_url": "https://palletsprojects.com/p/click/", - "download_url": "https://files.pythonhosted.org/packages/72/bd/fedc277e7351917b6c4e0ac751853a97af261278a4c7808babafa8ef2120/click-8.1.6.tar.gz", - "size": 336051, + "download_url": "https://files.pythonhosted.org/packages/96/d3/f04c7bfcf5c1862a2a5b845c6b2b360488cf47af55dfa79c98f6a6bf98b5/click-8.1.7.tar.gz", + "size": 336121, "sha1": null, - "md5": "0ad74cc10856930a76b0560ccc55c162", - "sha256": "48ee849951919527a045bfe3bf7baa8a959c423134e1a5b98c05c20ba75a1cbd", + "md5": "7c3b52c56fd30699f453a7dc7b42cecb", + "sha256": "ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de", "sha512": null, "bug_tracking_url": "https://github.com/pallets/click/issues/", "code_view_url": "https://github.com/pallets/click/", @@ -105,9 +105,9 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/click/8.1.6/json", + "api_data_url": "https://pypi.org/pypi/click/8.1.7/json", "datasource_id": null, - "purl": "pkg:pypi/click@8.1.6" + "purl": "pkg:pypi/click@8.1.7" }, { "type": "pypi", @@ -611,12 +611,12 @@ "type": "pypi", "namespace": null, "name": "werkzeug", - "version": "2.3.6", + "version": "2.3.7", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "The comprehensive WSGI web application library.\nWerkzeug\n========\n\n*werkzeug* German noun: \"tool\". Etymology: *werk* (\"work\"), *zeug* (\"stuff\")\n\nWerkzeug is a comprehensive `WSGI`_ web application library. It began as\na simple collection of various utilities for WSGI applications and has\nbecome one of the most advanced WSGI utility libraries.\n\nIt includes:\n\n- An interactive debugger that allows inspecting stack traces and\n source code in the browser with an interactive interpreter for any\n frame in the stack.\n- A full-featured request object with objects to interact with\n headers, query args, form data, files, and cookies.\n- A response object that can wrap other WSGI applications and handle\n streaming data.\n- A routing system for matching URLs to endpoints and generating URLs\n for endpoints, with an extensible system for capturing variables\n from URLs.\n- HTTP utilities to handle entity tags, cache control, dates, user\n agents, cookies, files, and more.\n- A threaded WSGI server for use while developing applications\n locally.\n- A test client for simulating HTTP requests during testing without\n requiring running a server.\n\nWerkzeug doesn't enforce any dependencies. It is up to the developer to\nchoose a template engine, database adapter, and even how to handle\nrequests. It can be used to build all sorts of end user applications\nsuch as blogs, wikis, or bulletin boards.\n\n`Flask`_ wraps Werkzeug, using it to handle the details of WSGI while\nproviding more structure and patterns for defining powerful\napplications.\n\n.. _WSGI: https://wsgi.readthedocs.io/en/latest/\n.. _Flask: https://www.palletsprojects.com/p/flask/\n\n\nInstalling\n----------\n\nInstall and update using `pip`_:\n\n.. code-block:: text\n\n pip install -U Werkzeug\n\n.. _pip: https://pip.pypa.io/en/stable/getting-started/\n\n\nA Simple Example\n----------------\n\n.. code-block:: python\n\n from werkzeug.wrappers import Request, Response\n\n @Request.application\n def application(request):\n return Response('Hello, World!')\n\n if __name__ == '__main__':\n from werkzeug.serving import run_simple\n run_simple('localhost', 4000, application)\n\n\nDonate\n------\n\nThe Pallets organization develops and supports Werkzeug and other\npopular packages. In order to grow the community of contributors and\nusers, and allow the maintainers to devote more time to the projects,\n`please donate today`_.\n\n.. _please donate today: https://palletsprojects.com/donate\n\n\nLinks\n-----\n\n- Documentation: https://werkzeug.palletsprojects.com/\n- Changes: https://werkzeug.palletsprojects.com/changes/\n- PyPI Releases: https://pypi.org/project/Werkzeug/\n- Source Code: https://github.com/pallets/werkzeug/\n- Issue Tracker: https://github.com/pallets/werkzeug/issues/\n- Chat: https://discord.gg/pallets", - "release_date": "2023-06-08T21:26:53", + "release_date": "2023-08-14T09:30:45", "parties": [ { "type": "person", @@ -639,11 +639,11 @@ "Topic :: Software Development :: Libraries :: Application Frameworks" ], "homepage_url": "", - "download_url": "https://files.pythonhosted.org/packages/ba/d6/8040faecaba2feb84e1647af174b3243c9b90c163c7ea407820839931efe/Werkzeug-2.3.6-py3-none-any.whl", - "size": 242499, + "download_url": "https://files.pythonhosted.org/packages/9b/59/a7c32e3d8d0e546a206e0552a2c04444544f15c1da4a01df8938d20c6ffc/werkzeug-2.3.7-py3-none-any.whl", + "size": 242216, "sha1": null, - "md5": "17e53591926aee3ce1663b03a1497758", - "sha256": "935539fa1413afbb9195b24880778422ed620c0fc09670945185cce4d91a8890", + "md5": "201b5bf3fa4dd3eb572704a6e61e69de", + "sha256": "effc12dba7f3bd72e605ce49807bbe692bd729c3bb122a3b91747a6ae77df528", "sha512": null, "bug_tracking_url": "https://github.com/pallets/werkzeug/issues/", "code_view_url": "https://github.com/pallets/werkzeug/", @@ -651,7 +651,6 @@ "copyright": null, "license_expression": null, "declared_license": { - "license": "BSD-3-Clause", "classifiers": [ "License :: OSI Approved :: BSD License" ] @@ -663,20 +662,20 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/werkzeug/2.3.6/json", + "api_data_url": "https://pypi.org/pypi/werkzeug/2.3.7/json", "datasource_id": null, - "purl": "pkg:pypi/werkzeug@2.3.6" + "purl": "pkg:pypi/werkzeug@2.3.7" }, { "type": "pypi", "namespace": null, "name": "werkzeug", - "version": "2.3.6", + "version": "2.3.7", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "The comprehensive WSGI web application library.\nWerkzeug\n========\n\n*werkzeug* German noun: \"tool\". Etymology: *werk* (\"work\"), *zeug* (\"stuff\")\n\nWerkzeug is a comprehensive `WSGI`_ web application library. It began as\na simple collection of various utilities for WSGI applications and has\nbecome one of the most advanced WSGI utility libraries.\n\nIt includes:\n\n- An interactive debugger that allows inspecting stack traces and\n source code in the browser with an interactive interpreter for any\n frame in the stack.\n- A full-featured request object with objects to interact with\n headers, query args, form data, files, and cookies.\n- A response object that can wrap other WSGI applications and handle\n streaming data.\n- A routing system for matching URLs to endpoints and generating URLs\n for endpoints, with an extensible system for capturing variables\n from URLs.\n- HTTP utilities to handle entity tags, cache control, dates, user\n agents, cookies, files, and more.\n- A threaded WSGI server for use while developing applications\n locally.\n- A test client for simulating HTTP requests during testing without\n requiring running a server.\n\nWerkzeug doesn't enforce any dependencies. It is up to the developer to\nchoose a template engine, database adapter, and even how to handle\nrequests. It can be used to build all sorts of end user applications\nsuch as blogs, wikis, or bulletin boards.\n\n`Flask`_ wraps Werkzeug, using it to handle the details of WSGI while\nproviding more structure and patterns for defining powerful\napplications.\n\n.. _WSGI: https://wsgi.readthedocs.io/en/latest/\n.. _Flask: https://www.palletsprojects.com/p/flask/\n\n\nInstalling\n----------\n\nInstall and update using `pip`_:\n\n.. code-block:: text\n\n pip install -U Werkzeug\n\n.. _pip: https://pip.pypa.io/en/stable/getting-started/\n\n\nA Simple Example\n----------------\n\n.. code-block:: python\n\n from werkzeug.wrappers import Request, Response\n\n @Request.application\n def application(request):\n return Response('Hello, World!')\n\n if __name__ == '__main__':\n from werkzeug.serving import run_simple\n run_simple('localhost', 4000, application)\n\n\nDonate\n------\n\nThe Pallets organization develops and supports Werkzeug and other\npopular packages. In order to grow the community of contributors and\nusers, and allow the maintainers to devote more time to the projects,\n`please donate today`_.\n\n.. _please donate today: https://palletsprojects.com/donate\n\n\nLinks\n-----\n\n- Documentation: https://werkzeug.palletsprojects.com/\n- Changes: https://werkzeug.palletsprojects.com/changes/\n- PyPI Releases: https://pypi.org/project/Werkzeug/\n- Source Code: https://github.com/pallets/werkzeug/\n- Issue Tracker: https://github.com/pallets/werkzeug/issues/\n- Chat: https://discord.gg/pallets", - "release_date": "2023-06-08T21:26:55", + "release_date": "2023-08-14T09:30:46", "parties": [ { "type": "person", @@ -699,11 +698,11 @@ "Topic :: Software Development :: Libraries :: Application Frameworks" ], "homepage_url": "", - "download_url": "https://files.pythonhosted.org/packages/d1/7e/c35cea5749237d40effc50ed1a1c7518d9f2e768fcf30b4e9ea119e74975/Werkzeug-2.3.6.tar.gz", - "size": 833282, + "download_url": "https://files.pythonhosted.org/packages/ef/56/0acc9f560053478a4987fa35c95d904f04b6915f6b5c4d1c14dc8862ba0a/werkzeug-2.3.7.tar.gz", + "size": 819625, "sha1": null, - "md5": "de26f240d6f95689a8d15170c2d958b6", - "sha256": "98c774df2f91b05550078891dee5f0eb0cb797a522c757a2452b9cee5b202330", + "md5": "31bb8f7f0be8724e6da89df0f6fc5d12", + "sha256": "2b8c0e447b4b9dbcc85dd97b6eeb4dcbaf6c8b6c3be0bd654e25553e0a2157d8", "sha512": null, "bug_tracking_url": "https://github.com/pallets/werkzeug/issues/", "code_view_url": "https://github.com/pallets/werkzeug/", @@ -711,7 +710,6 @@ "copyright": null, "license_expression": null, "declared_license": { - "license": "BSD-3-Clause", "classifiers": [ "License :: OSI Approved :: BSD License" ] @@ -723,23 +721,23 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/werkzeug/2.3.6/json", + "api_data_url": "https://pypi.org/pypi/werkzeug/2.3.7/json", "datasource_id": null, - "purl": "pkg:pypi/werkzeug@2.3.6" + "purl": "pkg:pypi/werkzeug@2.3.7" } ], "resolution": [ { - "package": "pkg:pypi/click@8.1.6", + "package": "pkg:pypi/click@8.1.7", "dependencies": [] }, { "package": "pkg:pypi/flask@2.1.2", "dependencies": [ - "pkg:pypi/click@8.1.6", + "pkg:pypi/click@8.1.7", "pkg:pypi/itsdangerous@2.1.2", "pkg:pypi/jinja2@3.1.2", - "pkg:pypi/werkzeug@2.3.6" + "pkg:pypi/werkzeug@2.3.7" ] }, { @@ -757,7 +755,7 @@ "dependencies": [] }, { - "package": "pkg:pypi/werkzeug@2.3.6", + "package": "pkg:pypi/werkzeug@2.3.7", "dependencies": [ "pkg:pypi/markupsafe@2.1.3" ] diff --git a/tests/data/test-api-pdt-expected.json b/tests/data/test-api-pdt-expected.json index 4c49d35..428ca1a 100644 --- a/tests/data/test-api-pdt-expected.json +++ b/tests/data/test-api-pdt-expected.json @@ -5,12 +5,12 @@ "type": "pypi", "namespace": null, "name": "click", - "version": "8.1.6", + "version": "8.1.7", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "Composable command line interface toolkit\n\\$ click\\_\n==========\n\nClick is a Python package for creating beautiful command line interfaces\nin a composable way with as little code as necessary. It's the \"Command\nLine Interface Creation Kit\". It's highly configurable but comes with\nsensible defaults out of the box.\n\nIt aims to make the process of writing command line tools quick and fun\nwhile also preventing any frustration caused by the inability to\nimplement an intended CLI API.\n\nClick in three points:\n\n- Arbitrary nesting of commands\n- Automatic help page generation\n- Supports lazy loading of subcommands at runtime\n\n\nInstalling\n----------\n\nInstall and update using `pip`_:\n\n.. code-block:: text\n\n $ pip install -U click\n\n.. _pip: https://pip.pypa.io/en/stable/getting-started/\n\n\nA Simple Example\n----------------\n\n.. code-block:: python\n\n import click\n\n @click.command()\n @click.option(\"--count\", default=1, help=\"Number of greetings.\")\n @click.option(\"--name\", prompt=\"Your name\", help=\"The person to greet.\")\n def hello(count, name):\n \"\"\"Simple program that greets NAME for a total of COUNT times.\"\"\"\n for _ in range(count):\n click.echo(f\"Hello, {name}!\")\n\n if __name__ == '__main__':\n hello()\n\n.. code-block:: text\n\n $ python hello.py --count=3\n Your name: Click\n Hello, Click!\n Hello, Click!\n Hello, Click!\n\n\nDonate\n------\n\nThe Pallets organization develops and supports Click and other popular\npackages. In order to grow the community of contributors and users, and\nallow the maintainers to devote more time to the projects, `please\ndonate today`_.\n\n.. _please donate today: https://palletsprojects.com/donate\n\n\nLinks\n-----\n\n- Documentation: https://click.palletsprojects.com/\n- Changes: https://click.palletsprojects.com/changes/\n- PyPI Releases: https://pypi.org/project/click/\n- Source Code: https://github.com/pallets/click\n- Issue Tracker: https://github.com/pallets/click/issues\n- Chat: https://discord.gg/pallets", - "release_date": "2023-07-18T20:05:12", + "release_date": "2023-08-17T17:29:10", "parties": [ { "type": "person", @@ -27,11 +27,11 @@ "Programming Language :: Python" ], "homepage_url": "https://palletsprojects.com/p/click/", - "download_url": "https://files.pythonhosted.org/packages/1a/70/e63223f8116931d365993d4a6b7ef653a4d920b41d03de7c59499962821f/click-8.1.6-py3-none-any.whl", - "size": 97909, + "download_url": "https://files.pythonhosted.org/packages/00/2e/d53fa4befbf2cfa713304affc7ca780ce4fc1fd8710527771b58311a3229/click-8.1.7-py3-none-any.whl", + "size": 97941, "sha1": null, - "md5": "043416d14751ae24c8e8b0968b6fff78", - "sha256": "fa244bb30b3b5ee2cae3da8f55c9e5e0c0e86093306301fb418eb9dc40fbded5", + "md5": "37a41134cc8a13400234746942d5d180", + "sha256": "ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28", "sha512": null, "bug_tracking_url": "https://github.com/pallets/click/issues/", "code_view_url": "https://github.com/pallets/click/", @@ -51,20 +51,20 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/click/8.1.6/json", + "api_data_url": "https://pypi.org/pypi/click/8.1.7/json", "datasource_id": null, - "purl": "pkg:pypi/click@8.1.6" + "purl": "pkg:pypi/click@8.1.7" }, { "type": "pypi", "namespace": null, "name": "click", - "version": "8.1.6", + "version": "8.1.7", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "Composable command line interface toolkit\n\\$ click\\_\n==========\n\nClick is a Python package for creating beautiful command line interfaces\nin a composable way with as little code as necessary. It's the \"Command\nLine Interface Creation Kit\". It's highly configurable but comes with\nsensible defaults out of the box.\n\nIt aims to make the process of writing command line tools quick and fun\nwhile also preventing any frustration caused by the inability to\nimplement an intended CLI API.\n\nClick in three points:\n\n- Arbitrary nesting of commands\n- Automatic help page generation\n- Supports lazy loading of subcommands at runtime\n\n\nInstalling\n----------\n\nInstall and update using `pip`_:\n\n.. code-block:: text\n\n $ pip install -U click\n\n.. _pip: https://pip.pypa.io/en/stable/getting-started/\n\n\nA Simple Example\n----------------\n\n.. code-block:: python\n\n import click\n\n @click.command()\n @click.option(\"--count\", default=1, help=\"Number of greetings.\")\n @click.option(\"--name\", prompt=\"Your name\", help=\"The person to greet.\")\n def hello(count, name):\n \"\"\"Simple program that greets NAME for a total of COUNT times.\"\"\"\n for _ in range(count):\n click.echo(f\"Hello, {name}!\")\n\n if __name__ == '__main__':\n hello()\n\n.. code-block:: text\n\n $ python hello.py --count=3\n Your name: Click\n Hello, Click!\n Hello, Click!\n Hello, Click!\n\n\nDonate\n------\n\nThe Pallets organization develops and supports Click and other popular\npackages. In order to grow the community of contributors and users, and\nallow the maintainers to devote more time to the projects, `please\ndonate today`_.\n\n.. _please donate today: https://palletsprojects.com/donate\n\n\nLinks\n-----\n\n- Documentation: https://click.palletsprojects.com/\n- Changes: https://click.palletsprojects.com/changes/\n- PyPI Releases: https://pypi.org/project/click/\n- Source Code: https://github.com/pallets/click\n- Issue Tracker: https://github.com/pallets/click/issues\n- Chat: https://discord.gg/pallets", - "release_date": "2023-07-18T20:05:13", + "release_date": "2023-08-17T17:29:11", "parties": [ { "type": "person", @@ -81,11 +81,11 @@ "Programming Language :: Python" ], "homepage_url": "https://palletsprojects.com/p/click/", - "download_url": "https://files.pythonhosted.org/packages/72/bd/fedc277e7351917b6c4e0ac751853a97af261278a4c7808babafa8ef2120/click-8.1.6.tar.gz", - "size": 336051, + "download_url": "https://files.pythonhosted.org/packages/96/d3/f04c7bfcf5c1862a2a5b845c6b2b360488cf47af55dfa79c98f6a6bf98b5/click-8.1.7.tar.gz", + "size": 336121, "sha1": null, - "md5": "0ad74cc10856930a76b0560ccc55c162", - "sha256": "48ee849951919527a045bfe3bf7baa8a959c423134e1a5b98c05c20ba75a1cbd", + "md5": "7c3b52c56fd30699f453a7dc7b42cecb", + "sha256": "ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de", "sha512": null, "bug_tracking_url": "https://github.com/pallets/click/issues/", "code_view_url": "https://github.com/pallets/click/", @@ -105,9 +105,9 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/click/8.1.6/json", + "api_data_url": "https://pypi.org/pypi/click/8.1.7/json", "datasource_id": null, - "purl": "pkg:pypi/click@8.1.6" + "purl": "pkg:pypi/click@8.1.7" }, { "type": "pypi", @@ -611,12 +611,12 @@ "type": "pypi", "namespace": null, "name": "werkzeug", - "version": "2.3.6", + "version": "2.3.7", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "The comprehensive WSGI web application library.\nWerkzeug\n========\n\n*werkzeug* German noun: \"tool\". Etymology: *werk* (\"work\"), *zeug* (\"stuff\")\n\nWerkzeug is a comprehensive `WSGI`_ web application library. It began as\na simple collection of various utilities for WSGI applications and has\nbecome one of the most advanced WSGI utility libraries.\n\nIt includes:\n\n- An interactive debugger that allows inspecting stack traces and\n source code in the browser with an interactive interpreter for any\n frame in the stack.\n- A full-featured request object with objects to interact with\n headers, query args, form data, files, and cookies.\n- A response object that can wrap other WSGI applications and handle\n streaming data.\n- A routing system for matching URLs to endpoints and generating URLs\n for endpoints, with an extensible system for capturing variables\n from URLs.\n- HTTP utilities to handle entity tags, cache control, dates, user\n agents, cookies, files, and more.\n- A threaded WSGI server for use while developing applications\n locally.\n- A test client for simulating HTTP requests during testing without\n requiring running a server.\n\nWerkzeug doesn't enforce any dependencies. It is up to the developer to\nchoose a template engine, database adapter, and even how to handle\nrequests. It can be used to build all sorts of end user applications\nsuch as blogs, wikis, or bulletin boards.\n\n`Flask`_ wraps Werkzeug, using it to handle the details of WSGI while\nproviding more structure and patterns for defining powerful\napplications.\n\n.. _WSGI: https://wsgi.readthedocs.io/en/latest/\n.. _Flask: https://www.palletsprojects.com/p/flask/\n\n\nInstalling\n----------\n\nInstall and update using `pip`_:\n\n.. code-block:: text\n\n pip install -U Werkzeug\n\n.. _pip: https://pip.pypa.io/en/stable/getting-started/\n\n\nA Simple Example\n----------------\n\n.. code-block:: python\n\n from werkzeug.wrappers import Request, Response\n\n @Request.application\n def application(request):\n return Response('Hello, World!')\n\n if __name__ == '__main__':\n from werkzeug.serving import run_simple\n run_simple('localhost', 4000, application)\n\n\nDonate\n------\n\nThe Pallets organization develops and supports Werkzeug and other\npopular packages. In order to grow the community of contributors and\nusers, and allow the maintainers to devote more time to the projects,\n`please donate today`_.\n\n.. _please donate today: https://palletsprojects.com/donate\n\n\nLinks\n-----\n\n- Documentation: https://werkzeug.palletsprojects.com/\n- Changes: https://werkzeug.palletsprojects.com/changes/\n- PyPI Releases: https://pypi.org/project/Werkzeug/\n- Source Code: https://github.com/pallets/werkzeug/\n- Issue Tracker: https://github.com/pallets/werkzeug/issues/\n- Chat: https://discord.gg/pallets", - "release_date": "2023-06-08T21:26:53", + "release_date": "2023-08-14T09:30:45", "parties": [ { "type": "person", @@ -639,11 +639,11 @@ "Topic :: Software Development :: Libraries :: Application Frameworks" ], "homepage_url": "", - "download_url": "https://files.pythonhosted.org/packages/ba/d6/8040faecaba2feb84e1647af174b3243c9b90c163c7ea407820839931efe/Werkzeug-2.3.6-py3-none-any.whl", - "size": 242499, + "download_url": "https://files.pythonhosted.org/packages/9b/59/a7c32e3d8d0e546a206e0552a2c04444544f15c1da4a01df8938d20c6ffc/werkzeug-2.3.7-py3-none-any.whl", + "size": 242216, "sha1": null, - "md5": "17e53591926aee3ce1663b03a1497758", - "sha256": "935539fa1413afbb9195b24880778422ed620c0fc09670945185cce4d91a8890", + "md5": "201b5bf3fa4dd3eb572704a6e61e69de", + "sha256": "effc12dba7f3bd72e605ce49807bbe692bd729c3bb122a3b91747a6ae77df528", "sha512": null, "bug_tracking_url": "https://github.com/pallets/werkzeug/issues/", "code_view_url": "https://github.com/pallets/werkzeug/", @@ -651,7 +651,6 @@ "copyright": null, "license_expression": null, "declared_license": { - "license": "BSD-3-Clause", "classifiers": [ "License :: OSI Approved :: BSD License" ] @@ -663,20 +662,20 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/werkzeug/2.3.6/json", + "api_data_url": "https://pypi.org/pypi/werkzeug/2.3.7/json", "datasource_id": null, - "purl": "pkg:pypi/werkzeug@2.3.6" + "purl": "pkg:pypi/werkzeug@2.3.7" }, { "type": "pypi", "namespace": null, "name": "werkzeug", - "version": "2.3.6", + "version": "2.3.7", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "The comprehensive WSGI web application library.\nWerkzeug\n========\n\n*werkzeug* German noun: \"tool\". Etymology: *werk* (\"work\"), *zeug* (\"stuff\")\n\nWerkzeug is a comprehensive `WSGI`_ web application library. It began as\na simple collection of various utilities for WSGI applications and has\nbecome one of the most advanced WSGI utility libraries.\n\nIt includes:\n\n- An interactive debugger that allows inspecting stack traces and\n source code in the browser with an interactive interpreter for any\n frame in the stack.\n- A full-featured request object with objects to interact with\n headers, query args, form data, files, and cookies.\n- A response object that can wrap other WSGI applications and handle\n streaming data.\n- A routing system for matching URLs to endpoints and generating URLs\n for endpoints, with an extensible system for capturing variables\n from URLs.\n- HTTP utilities to handle entity tags, cache control, dates, user\n agents, cookies, files, and more.\n- A threaded WSGI server for use while developing applications\n locally.\n- A test client for simulating HTTP requests during testing without\n requiring running a server.\n\nWerkzeug doesn't enforce any dependencies. It is up to the developer to\nchoose a template engine, database adapter, and even how to handle\nrequests. It can be used to build all sorts of end user applications\nsuch as blogs, wikis, or bulletin boards.\n\n`Flask`_ wraps Werkzeug, using it to handle the details of WSGI while\nproviding more structure and patterns for defining powerful\napplications.\n\n.. _WSGI: https://wsgi.readthedocs.io/en/latest/\n.. _Flask: https://www.palletsprojects.com/p/flask/\n\n\nInstalling\n----------\n\nInstall and update using `pip`_:\n\n.. code-block:: text\n\n pip install -U Werkzeug\n\n.. _pip: https://pip.pypa.io/en/stable/getting-started/\n\n\nA Simple Example\n----------------\n\n.. code-block:: python\n\n from werkzeug.wrappers import Request, Response\n\n @Request.application\n def application(request):\n return Response('Hello, World!')\n\n if __name__ == '__main__':\n from werkzeug.serving import run_simple\n run_simple('localhost', 4000, application)\n\n\nDonate\n------\n\nThe Pallets organization develops and supports Werkzeug and other\npopular packages. In order to grow the community of contributors and\nusers, and allow the maintainers to devote more time to the projects,\n`please donate today`_.\n\n.. _please donate today: https://palletsprojects.com/donate\n\n\nLinks\n-----\n\n- Documentation: https://werkzeug.palletsprojects.com/\n- Changes: https://werkzeug.palletsprojects.com/changes/\n- PyPI Releases: https://pypi.org/project/Werkzeug/\n- Source Code: https://github.com/pallets/werkzeug/\n- Issue Tracker: https://github.com/pallets/werkzeug/issues/\n- Chat: https://discord.gg/pallets", - "release_date": "2023-06-08T21:26:55", + "release_date": "2023-08-14T09:30:46", "parties": [ { "type": "person", @@ -699,11 +698,11 @@ "Topic :: Software Development :: Libraries :: Application Frameworks" ], "homepage_url": "", - "download_url": "https://files.pythonhosted.org/packages/d1/7e/c35cea5749237d40effc50ed1a1c7518d9f2e768fcf30b4e9ea119e74975/Werkzeug-2.3.6.tar.gz", - "size": 833282, + "download_url": "https://files.pythonhosted.org/packages/ef/56/0acc9f560053478a4987fa35c95d904f04b6915f6b5c4d1c14dc8862ba0a/werkzeug-2.3.7.tar.gz", + "size": 819625, "sha1": null, - "md5": "de26f240d6f95689a8d15170c2d958b6", - "sha256": "98c774df2f91b05550078891dee5f0eb0cb797a522c757a2452b9cee5b202330", + "md5": "31bb8f7f0be8724e6da89df0f6fc5d12", + "sha256": "2b8c0e447b4b9dbcc85dd97b6eeb4dcbaf6c8b6c3be0bd654e25553e0a2157d8", "sha512": null, "bug_tracking_url": "https://github.com/pallets/werkzeug/issues/", "code_view_url": "https://github.com/pallets/werkzeug/", @@ -711,7 +710,6 @@ "copyright": null, "license_expression": null, "declared_license": { - "license": "BSD-3-Clause", "classifiers": [ "License :: OSI Approved :: BSD License" ] @@ -723,9 +721,9 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/werkzeug/2.3.6/json", + "api_data_url": "https://pypi.org/pypi/werkzeug/2.3.7/json", "datasource_id": null, - "purl": "pkg:pypi/werkzeug@2.3.6" + "purl": "pkg:pypi/werkzeug@2.3.7" } ], "resolution": [ @@ -737,7 +735,7 @@ { "key": "click", "package_name": "click", - "installed_version": "8.1.6", + "installed_version": "8.1.7", "dependencies": [] }, { @@ -762,7 +760,7 @@ { "key": "werkzeug", "package_name": "werkzeug", - "installed_version": "2.3.6", + "installed_version": "2.3.7", "dependencies": [ { "key": "markupsafe", diff --git a/tests/data/test-api-with-partial-setup-py.json b/tests/data/test-api-with-partial-setup-py.json index 20f9403..7b22339 100644 --- a/tests/data/test-api-with-partial-setup-py.json +++ b/tests/data/test-api-with-partial-setup-py.json @@ -2,7 +2,7 @@ "files": [ { "type": "file", - "path": "/home/tg1999/Desktop/example/tools/python-inspector/tests/data/partial-setup.py", + "path": "/home/frank/sources/github/nexB/python-inspector/tests/data/partial-setup.py", "package_data": [ { "type": "pypi", diff --git a/tests/data/test-api-with-prefer-source.json b/tests/data/test-api-with-prefer-source.json index c4762ab..ca1d928 100644 --- a/tests/data/test-api-with-prefer-source.json +++ b/tests/data/test-api-with-prefer-source.json @@ -5,12 +5,12 @@ "type": "pypi", "namespace": null, "name": "click", - "version": "8.1.6", + "version": "8.1.7", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "Composable command line interface toolkit\n\\$ click\\_\n==========\n\nClick is a Python package for creating beautiful command line interfaces\nin a composable way with as little code as necessary. It's the \"Command\nLine Interface Creation Kit\". It's highly configurable but comes with\nsensible defaults out of the box.\n\nIt aims to make the process of writing command line tools quick and fun\nwhile also preventing any frustration caused by the inability to\nimplement an intended CLI API.\n\nClick in three points:\n\n- Arbitrary nesting of commands\n- Automatic help page generation\n- Supports lazy loading of subcommands at runtime\n\n\nInstalling\n----------\n\nInstall and update using `pip`_:\n\n.. code-block:: text\n\n $ pip install -U click\n\n.. _pip: https://pip.pypa.io/en/stable/getting-started/\n\n\nA Simple Example\n----------------\n\n.. code-block:: python\n\n import click\n\n @click.command()\n @click.option(\"--count\", default=1, help=\"Number of greetings.\")\n @click.option(\"--name\", prompt=\"Your name\", help=\"The person to greet.\")\n def hello(count, name):\n \"\"\"Simple program that greets NAME for a total of COUNT times.\"\"\"\n for _ in range(count):\n click.echo(f\"Hello, {name}!\")\n\n if __name__ == '__main__':\n hello()\n\n.. code-block:: text\n\n $ python hello.py --count=3\n Your name: Click\n Hello, Click!\n Hello, Click!\n Hello, Click!\n\n\nDonate\n------\n\nThe Pallets organization develops and supports Click and other popular\npackages. In order to grow the community of contributors and users, and\nallow the maintainers to devote more time to the projects, `please\ndonate today`_.\n\n.. _please donate today: https://palletsprojects.com/donate\n\n\nLinks\n-----\n\n- Documentation: https://click.palletsprojects.com/\n- Changes: https://click.palletsprojects.com/changes/\n- PyPI Releases: https://pypi.org/project/click/\n- Source Code: https://github.com/pallets/click\n- Issue Tracker: https://github.com/pallets/click/issues\n- Chat: https://discord.gg/pallets", - "release_date": "2023-07-18T20:05:13", + "release_date": "2023-08-17T17:29:11", "parties": [ { "type": "person", @@ -27,11 +27,11 @@ "Programming Language :: Python" ], "homepage_url": "https://palletsprojects.com/p/click/", - "download_url": "https://files.pythonhosted.org/packages/72/bd/fedc277e7351917b6c4e0ac751853a97af261278a4c7808babafa8ef2120/click-8.1.6.tar.gz", - "size": 336051, + "download_url": "https://files.pythonhosted.org/packages/96/d3/f04c7bfcf5c1862a2a5b845c6b2b360488cf47af55dfa79c98f6a6bf98b5/click-8.1.7.tar.gz", + "size": 336121, "sha1": null, - "md5": "0ad74cc10856930a76b0560ccc55c162", - "sha256": "48ee849951919527a045bfe3bf7baa8a959c423134e1a5b98c05c20ba75a1cbd", + "md5": "7c3b52c56fd30699f453a7dc7b42cecb", + "sha256": "ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de", "sha512": null, "bug_tracking_url": "https://github.com/pallets/click/issues/", "code_view_url": "https://github.com/pallets/click/", @@ -51,9 +51,9 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/click/8.1.6/json", + "api_data_url": "https://pypi.org/pypi/click/8.1.7/json", "datasource_id": null, - "purl": "pkg:pypi/click@8.1.6" + "purl": "pkg:pypi/click@8.1.7" }, { "type": "pypi", @@ -308,12 +308,12 @@ "type": "pypi", "namespace": null, "name": "werkzeug", - "version": "2.3.6", + "version": "2.3.7", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "The comprehensive WSGI web application library.\nWerkzeug\n========\n\n*werkzeug* German noun: \"tool\". Etymology: *werk* (\"work\"), *zeug* (\"stuff\")\n\nWerkzeug is a comprehensive `WSGI`_ web application library. It began as\na simple collection of various utilities for WSGI applications and has\nbecome one of the most advanced WSGI utility libraries.\n\nIt includes:\n\n- An interactive debugger that allows inspecting stack traces and\n source code in the browser with an interactive interpreter for any\n frame in the stack.\n- A full-featured request object with objects to interact with\n headers, query args, form data, files, and cookies.\n- A response object that can wrap other WSGI applications and handle\n streaming data.\n- A routing system for matching URLs to endpoints and generating URLs\n for endpoints, with an extensible system for capturing variables\n from URLs.\n- HTTP utilities to handle entity tags, cache control, dates, user\n agents, cookies, files, and more.\n- A threaded WSGI server for use while developing applications\n locally.\n- A test client for simulating HTTP requests during testing without\n requiring running a server.\n\nWerkzeug doesn't enforce any dependencies. It is up to the developer to\nchoose a template engine, database adapter, and even how to handle\nrequests. It can be used to build all sorts of end user applications\nsuch as blogs, wikis, or bulletin boards.\n\n`Flask`_ wraps Werkzeug, using it to handle the details of WSGI while\nproviding more structure and patterns for defining powerful\napplications.\n\n.. _WSGI: https://wsgi.readthedocs.io/en/latest/\n.. _Flask: https://www.palletsprojects.com/p/flask/\n\n\nInstalling\n----------\n\nInstall and update using `pip`_:\n\n.. code-block:: text\n\n pip install -U Werkzeug\n\n.. _pip: https://pip.pypa.io/en/stable/getting-started/\n\n\nA Simple Example\n----------------\n\n.. code-block:: python\n\n from werkzeug.wrappers import Request, Response\n\n @Request.application\n def application(request):\n return Response('Hello, World!')\n\n if __name__ == '__main__':\n from werkzeug.serving import run_simple\n run_simple('localhost', 4000, application)\n\n\nDonate\n------\n\nThe Pallets organization develops and supports Werkzeug and other\npopular packages. In order to grow the community of contributors and\nusers, and allow the maintainers to devote more time to the projects,\n`please donate today`_.\n\n.. _please donate today: https://palletsprojects.com/donate\n\n\nLinks\n-----\n\n- Documentation: https://werkzeug.palletsprojects.com/\n- Changes: https://werkzeug.palletsprojects.com/changes/\n- PyPI Releases: https://pypi.org/project/Werkzeug/\n- Source Code: https://github.com/pallets/werkzeug/\n- Issue Tracker: https://github.com/pallets/werkzeug/issues/\n- Chat: https://discord.gg/pallets", - "release_date": "2023-06-08T21:26:55", + "release_date": "2023-08-14T09:30:46", "parties": [ { "type": "person", @@ -336,11 +336,11 @@ "Topic :: Software Development :: Libraries :: Application Frameworks" ], "homepage_url": "", - "download_url": "https://files.pythonhosted.org/packages/d1/7e/c35cea5749237d40effc50ed1a1c7518d9f2e768fcf30b4e9ea119e74975/Werkzeug-2.3.6.tar.gz", - "size": 833282, + "download_url": "https://files.pythonhosted.org/packages/ef/56/0acc9f560053478a4987fa35c95d904f04b6915f6b5c4d1c14dc8862ba0a/werkzeug-2.3.7.tar.gz", + "size": 819625, "sha1": null, - "md5": "de26f240d6f95689a8d15170c2d958b6", - "sha256": "98c774df2f91b05550078891dee5f0eb0cb797a522c757a2452b9cee5b202330", + "md5": "31bb8f7f0be8724e6da89df0f6fc5d12", + "sha256": "2b8c0e447b4b9dbcc85dd97b6eeb4dcbaf6c8b6c3be0bd654e25553e0a2157d8", "sha512": null, "bug_tracking_url": "https://github.com/pallets/werkzeug/issues/", "code_view_url": "https://github.com/pallets/werkzeug/", @@ -348,7 +348,6 @@ "copyright": null, "license_expression": null, "declared_license": { - "license": "BSD-3-Clause", "classifiers": [ "License :: OSI Approved :: BSD License" ] @@ -360,23 +359,23 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/werkzeug/2.3.6/json", + "api_data_url": "https://pypi.org/pypi/werkzeug/2.3.7/json", "datasource_id": null, - "purl": "pkg:pypi/werkzeug@2.3.6" + "purl": "pkg:pypi/werkzeug@2.3.7" } ], "resolution": [ { - "package": "pkg:pypi/click@8.1.6", + "package": "pkg:pypi/click@8.1.7", "dependencies": [] }, { "package": "pkg:pypi/flask@2.1.2", "dependencies": [ - "pkg:pypi/click@8.1.6", + "pkg:pypi/click@8.1.7", "pkg:pypi/itsdangerous@2.1.2", "pkg:pypi/jinja2@3.1.2", - "pkg:pypi/werkzeug@2.3.6" + "pkg:pypi/werkzeug@2.3.7" ] }, { @@ -394,7 +393,7 @@ "dependencies": [] }, { - "package": "pkg:pypi/werkzeug@2.3.6", + "package": "pkg:pypi/werkzeug@2.3.7", "dependencies": [ "pkg:pypi/markupsafe@2.1.3" ] diff --git a/tests/data/test-api-with-python-311.json b/tests/data/test-api-with-python-311.json index c4762ab..ca1d928 100644 --- a/tests/data/test-api-with-python-311.json +++ b/tests/data/test-api-with-python-311.json @@ -5,12 +5,12 @@ "type": "pypi", "namespace": null, "name": "click", - "version": "8.1.6", + "version": "8.1.7", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "Composable command line interface toolkit\n\\$ click\\_\n==========\n\nClick is a Python package for creating beautiful command line interfaces\nin a composable way with as little code as necessary. It's the \"Command\nLine Interface Creation Kit\". It's highly configurable but comes with\nsensible defaults out of the box.\n\nIt aims to make the process of writing command line tools quick and fun\nwhile also preventing any frustration caused by the inability to\nimplement an intended CLI API.\n\nClick in three points:\n\n- Arbitrary nesting of commands\n- Automatic help page generation\n- Supports lazy loading of subcommands at runtime\n\n\nInstalling\n----------\n\nInstall and update using `pip`_:\n\n.. code-block:: text\n\n $ pip install -U click\n\n.. _pip: https://pip.pypa.io/en/stable/getting-started/\n\n\nA Simple Example\n----------------\n\n.. code-block:: python\n\n import click\n\n @click.command()\n @click.option(\"--count\", default=1, help=\"Number of greetings.\")\n @click.option(\"--name\", prompt=\"Your name\", help=\"The person to greet.\")\n def hello(count, name):\n \"\"\"Simple program that greets NAME for a total of COUNT times.\"\"\"\n for _ in range(count):\n click.echo(f\"Hello, {name}!\")\n\n if __name__ == '__main__':\n hello()\n\n.. code-block:: text\n\n $ python hello.py --count=3\n Your name: Click\n Hello, Click!\n Hello, Click!\n Hello, Click!\n\n\nDonate\n------\n\nThe Pallets organization develops and supports Click and other popular\npackages. In order to grow the community of contributors and users, and\nallow the maintainers to devote more time to the projects, `please\ndonate today`_.\n\n.. _please donate today: https://palletsprojects.com/donate\n\n\nLinks\n-----\n\n- Documentation: https://click.palletsprojects.com/\n- Changes: https://click.palletsprojects.com/changes/\n- PyPI Releases: https://pypi.org/project/click/\n- Source Code: https://github.com/pallets/click\n- Issue Tracker: https://github.com/pallets/click/issues\n- Chat: https://discord.gg/pallets", - "release_date": "2023-07-18T20:05:13", + "release_date": "2023-08-17T17:29:11", "parties": [ { "type": "person", @@ -27,11 +27,11 @@ "Programming Language :: Python" ], "homepage_url": "https://palletsprojects.com/p/click/", - "download_url": "https://files.pythonhosted.org/packages/72/bd/fedc277e7351917b6c4e0ac751853a97af261278a4c7808babafa8ef2120/click-8.1.6.tar.gz", - "size": 336051, + "download_url": "https://files.pythonhosted.org/packages/96/d3/f04c7bfcf5c1862a2a5b845c6b2b360488cf47af55dfa79c98f6a6bf98b5/click-8.1.7.tar.gz", + "size": 336121, "sha1": null, - "md5": "0ad74cc10856930a76b0560ccc55c162", - "sha256": "48ee849951919527a045bfe3bf7baa8a959c423134e1a5b98c05c20ba75a1cbd", + "md5": "7c3b52c56fd30699f453a7dc7b42cecb", + "sha256": "ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de", "sha512": null, "bug_tracking_url": "https://github.com/pallets/click/issues/", "code_view_url": "https://github.com/pallets/click/", @@ -51,9 +51,9 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/click/8.1.6/json", + "api_data_url": "https://pypi.org/pypi/click/8.1.7/json", "datasource_id": null, - "purl": "pkg:pypi/click@8.1.6" + "purl": "pkg:pypi/click@8.1.7" }, { "type": "pypi", @@ -308,12 +308,12 @@ "type": "pypi", "namespace": null, "name": "werkzeug", - "version": "2.3.6", + "version": "2.3.7", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "The comprehensive WSGI web application library.\nWerkzeug\n========\n\n*werkzeug* German noun: \"tool\". Etymology: *werk* (\"work\"), *zeug* (\"stuff\")\n\nWerkzeug is a comprehensive `WSGI`_ web application library. It began as\na simple collection of various utilities for WSGI applications and has\nbecome one of the most advanced WSGI utility libraries.\n\nIt includes:\n\n- An interactive debugger that allows inspecting stack traces and\n source code in the browser with an interactive interpreter for any\n frame in the stack.\n- A full-featured request object with objects to interact with\n headers, query args, form data, files, and cookies.\n- A response object that can wrap other WSGI applications and handle\n streaming data.\n- A routing system for matching URLs to endpoints and generating URLs\n for endpoints, with an extensible system for capturing variables\n from URLs.\n- HTTP utilities to handle entity tags, cache control, dates, user\n agents, cookies, files, and more.\n- A threaded WSGI server for use while developing applications\n locally.\n- A test client for simulating HTTP requests during testing without\n requiring running a server.\n\nWerkzeug doesn't enforce any dependencies. It is up to the developer to\nchoose a template engine, database adapter, and even how to handle\nrequests. It can be used to build all sorts of end user applications\nsuch as blogs, wikis, or bulletin boards.\n\n`Flask`_ wraps Werkzeug, using it to handle the details of WSGI while\nproviding more structure and patterns for defining powerful\napplications.\n\n.. _WSGI: https://wsgi.readthedocs.io/en/latest/\n.. _Flask: https://www.palletsprojects.com/p/flask/\n\n\nInstalling\n----------\n\nInstall and update using `pip`_:\n\n.. code-block:: text\n\n pip install -U Werkzeug\n\n.. _pip: https://pip.pypa.io/en/stable/getting-started/\n\n\nA Simple Example\n----------------\n\n.. code-block:: python\n\n from werkzeug.wrappers import Request, Response\n\n @Request.application\n def application(request):\n return Response('Hello, World!')\n\n if __name__ == '__main__':\n from werkzeug.serving import run_simple\n run_simple('localhost', 4000, application)\n\n\nDonate\n------\n\nThe Pallets organization develops and supports Werkzeug and other\npopular packages. In order to grow the community of contributors and\nusers, and allow the maintainers to devote more time to the projects,\n`please donate today`_.\n\n.. _please donate today: https://palletsprojects.com/donate\n\n\nLinks\n-----\n\n- Documentation: https://werkzeug.palletsprojects.com/\n- Changes: https://werkzeug.palletsprojects.com/changes/\n- PyPI Releases: https://pypi.org/project/Werkzeug/\n- Source Code: https://github.com/pallets/werkzeug/\n- Issue Tracker: https://github.com/pallets/werkzeug/issues/\n- Chat: https://discord.gg/pallets", - "release_date": "2023-06-08T21:26:55", + "release_date": "2023-08-14T09:30:46", "parties": [ { "type": "person", @@ -336,11 +336,11 @@ "Topic :: Software Development :: Libraries :: Application Frameworks" ], "homepage_url": "", - "download_url": "https://files.pythonhosted.org/packages/d1/7e/c35cea5749237d40effc50ed1a1c7518d9f2e768fcf30b4e9ea119e74975/Werkzeug-2.3.6.tar.gz", - "size": 833282, + "download_url": "https://files.pythonhosted.org/packages/ef/56/0acc9f560053478a4987fa35c95d904f04b6915f6b5c4d1c14dc8862ba0a/werkzeug-2.3.7.tar.gz", + "size": 819625, "sha1": null, - "md5": "de26f240d6f95689a8d15170c2d958b6", - "sha256": "98c774df2f91b05550078891dee5f0eb0cb797a522c757a2452b9cee5b202330", + "md5": "31bb8f7f0be8724e6da89df0f6fc5d12", + "sha256": "2b8c0e447b4b9dbcc85dd97b6eeb4dcbaf6c8b6c3be0bd654e25553e0a2157d8", "sha512": null, "bug_tracking_url": "https://github.com/pallets/werkzeug/issues/", "code_view_url": "https://github.com/pallets/werkzeug/", @@ -348,7 +348,6 @@ "copyright": null, "license_expression": null, "declared_license": { - "license": "BSD-3-Clause", "classifiers": [ "License :: OSI Approved :: BSD License" ] @@ -360,23 +359,23 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/werkzeug/2.3.6/json", + "api_data_url": "https://pypi.org/pypi/werkzeug/2.3.7/json", "datasource_id": null, - "purl": "pkg:pypi/werkzeug@2.3.6" + "purl": "pkg:pypi/werkzeug@2.3.7" } ], "resolution": [ { - "package": "pkg:pypi/click@8.1.6", + "package": "pkg:pypi/click@8.1.7", "dependencies": [] }, { "package": "pkg:pypi/flask@2.1.2", "dependencies": [ - "pkg:pypi/click@8.1.6", + "pkg:pypi/click@8.1.7", "pkg:pypi/itsdangerous@2.1.2", "pkg:pypi/jinja2@3.1.2", - "pkg:pypi/werkzeug@2.3.6" + "pkg:pypi/werkzeug@2.3.7" ] }, { @@ -394,7 +393,7 @@ "dependencies": [] }, { - "package": "pkg:pypi/werkzeug@2.3.6", + "package": "pkg:pypi/werkzeug@2.3.7", "dependencies": [ "pkg:pypi/markupsafe@2.1.3" ] diff --git a/tests/data/test-api-with-recursive-requirement-file.json b/tests/data/test-api-with-recursive-requirement-file.json index 8dd599d..b72b41e 100644 --- a/tests/data/test-api-with-recursive-requirement-file.json +++ b/tests/data/test-api-with-recursive-requirement-file.json @@ -2,7 +2,7 @@ "files": [ { "type": "file", - "path": "/home/tg1999/Desktop/example/tools/python-inspector/tests/data/recursive_requirements/r.txt", + "path": "/home/frank/sources/github/nexB/python-inspector/tests/data/recursive_requirements/r.txt", "package_data": [ { "type": "pypi", diff --git a/tests/data/test-api-with-requirement-file.json b/tests/data/test-api-with-requirement-file.json index f9df772..21a50bd 100644 --- a/tests/data/test-api-with-requirement-file.json +++ b/tests/data/test-api-with-requirement-file.json @@ -2,7 +2,7 @@ "files": [ { "type": "file", - "path": "/home/tg1999/Desktop/example/tools/python-inspector/tests/data/frozen-requirements.txt", + "path": "/home/frank/sources/github/nexB/python-inspector/tests/data/frozen-requirements.txt", "package_data": [ { "type": "pypi", diff --git a/tests/test_resolution.py b/tests/test_resolution.py index b288c60..46771c0 100644 --- a/tests/test_resolution.py +++ b/tests/test_resolution.py @@ -45,12 +45,12 @@ def test_get_resolved_dependencies_with_flask_and_python_310(): as_tree=False, ) assert plist == [ - "pkg:pypi/click@8.1.6", + "pkg:pypi/click@8.1.7", "pkg:pypi/flask@2.1.2", "pkg:pypi/itsdangerous@2.1.2", "pkg:pypi/jinja2@3.1.2", "pkg:pypi/markupsafe@2.1.3", - "pkg:pypi/werkzeug@2.3.6", + "pkg:pypi/werkzeug@2.3.7", ] @@ -68,13 +68,13 @@ def test_get_resolved_dependencies_with_flask_and_python_310_windows(): as_tree=False, ) assert plist == [ - "pkg:pypi/click@8.1.6", + "pkg:pypi/click@8.1.7", "pkg:pypi/colorama@0.4.6", "pkg:pypi/flask@2.1.2", "pkg:pypi/itsdangerous@2.1.2", "pkg:pypi/jinja2@3.1.2", "pkg:pypi/markupsafe@2.1.3", - "pkg:pypi/werkzeug@2.3.6", + "pkg:pypi/werkzeug@2.3.7", ] @@ -119,14 +119,14 @@ def test_get_resolved_dependencies_with_tilde_requirement_using_json_api(): ), ) assert plist == [ - "pkg:pypi/click@8.1.6", + "pkg:pypi/click@8.1.7", "pkg:pypi/flask@2.1.3", "pkg:pypi/importlib-metadata@6.8.0", "pkg:pypi/itsdangerous@2.1.2", "pkg:pypi/jinja2@3.1.2", "pkg:pypi/markupsafe@2.1.3", - "pkg:pypi/werkzeug@2.3.6", - "pkg:pypi/zipp@3.16.2", + "pkg:pypi/werkzeug@2.3.7", + "pkg:pypi/zipp@3.17.0", ] @@ -147,11 +147,11 @@ def test_without_supported_wheels(): assert plist == [ "pkg:pypi/autobahn@22.3.2", "pkg:pypi/cffi@1.15.1", - "pkg:pypi/cryptography@41.0.3", + "pkg:pypi/cryptography@41.0.4", "pkg:pypi/hyperlink@21.0.0", "pkg:pypi/idna@3.4", "pkg:pypi/pycparser@2.21", - "pkg:pypi/setuptools@68.0.0", + "pkg:pypi/setuptools@68.2.2", "pkg:pypi/txaio@23.1.1", ]