# packages

pkgId: 88c0ef920fa433435619a6718c872183e3d0c3c9ddb373cd0341df2a75aec3b3
name: python-ax-platform
arch: src
version: 0.3.1
epoch: 0
release: 1
summary: Adaptive Experimentation
url: https://github.com/facebook/Ax
rpm_license: MIT
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-8c07cdfa-8c86-410c-96e3-f727bcc3df0e
location_href: 00011314-python-ax-platform/python-ax-platform-0.3.1-1.src.rpm
checksum_type: sha256
description:
  <img width="300" src="https://ax.dev/img/ax_logo_lockup.svg" alt="Ax Logo" />

  <hr/>

  [![Support Ukraine](https://img.shields.io/badge/Support-Ukraine-FFD500?style=flat&labelColor=005BBB)](https://opensource.fb.com/support-ukraine)
  [![Build Status](https://img.shields.io/pypi/v/ax-platform.svg)](https://pypi.org/project/ax-platform/)
  [![Build Status](https://img.shields.io/pypi/pyversions/ax-platform.svg)](https://pypi.org/project/ax-platform/)
  [![Build Status](https://img.shields.io/pypi/wheel/ax-platform.svg)](https://pypi.org/project/ax-platform/)
  [![Build Status](https://github.com/facebook/Ax/workflows/Build%20and%20Test%20Workflow/badge.svg)](https://github.com/facebook/Ax/actions?query=workflow%3A%22Build+and+Test+Workflow%22)
  [![codecov](https://codecov.io/gh/facebook/Ax/branch/main/graph/badge.svg)](https://codecov.io/gh/facebook/Ax)
  [![Build Status](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)

  Ax is an accessible, general-purpose platform for understanding, managing,
  deploying, and automating adaptive experiments.

  Adaptive experimentation is the machine-learning guided process of iteratively
  exploring a (possibly infinite) parameter space in order to identify optimal
  configurations in a resource-efficient manner. Ax currently supports Bayesian
  optimization and bandit optimization as exploration strategies. Bayesian
  optimization in Ax is powered by [BoTorch](https://github.com/facebookexternal/botorch),
  a modern library for Bayesian optimization research built on PyTorch.

  For full documentation and tutorials, see the [Ax website](https://ax.dev)



  * **Versatility**: Ax supports different kinds of experiments, from dynamic ML-assisted A/B testing, to hyperparameter optimization in machine learning.
  * **Customization**: Ax makes it easy to add new modeling and decision algorithms, enabling research and development with minimal overhead.
  * **Production-completeness**: Ax comes with storage integration and ability to fully save and reload experiments.
  * **Support for multi-modal and constrained experimentation**: Ax allows for running and combining multiple experiments (e.g. simulation with a real-world "online" A/B test) and for constrained optimization (e.g. improving classification accuracy without significant increase in resource-utilization).
  * **Efficiency in high-noise setting**: Ax offers state-of-the-art algorithms specifically geared to noisy experiments, such as simulations with reinforcement-learning agents.
  * **Ease of use**: Ax includes 3 different APIs that strike different balances between lightweight structure and flexibility. Using the most concise Loop API, a whole optimization can be done in just one function call. The Service API integrates easily with external schedulers. The most elaborate Developer API affords full algorithm customization and experiment introspection.



  To run a simple optimization loop in Ax (using the
  [Booth response surface](https://www.sfu.ca/~ssurjano/booth.html) as the
  artificial evaluation function):

  ```python
  >>> from ax import optimize
  >>> best_parameters, best_values, experiment, model = optimize(
          parameters=[
            {
              "name": "x1",
              "type": "range",
              "bounds": [-10.0, 10.0],
            },
            {
              "name": "x2",
              "type": "range",
              "bounds": [-10.0, 10.0],
            },
          ],
          
          evaluation_function=lambda p: (p["x1"] + 2*p["x2"] - 7)**2 + (2*p["x1"] + p["x2"] - 5)**2,
          minimize=True,
      )


  ```




  You need Python 3.8 or later to run Ax.

  The required Python dependencies are:

  * [botorch](https://www.botorch.org)
  * jinja2
  * pandas
  * scipy
  * sklearn
  * plotly >=2.2.1




  We recommend installing Ax via pip (even if using Conda environment):

  ```
  conda install pytorch torchvision -c pytorch  # OSX only (details below)
  pip install ax-platform
  ```

  Installation will use Python wheels from PyPI, available for [OSX, Linux, and Windows](https://pypi.org/project/ax-platform/#files).

  *Note*: Make sure the `pip` being used to install `ax-platform` is actually the one from the newly created Conda environment.
  If you're using a Unix-based OS, you can use `which pip` to check.

  *Recommendation for MacOS users*: PyTorch is a required dependency of BoTorch, and can be automatically installed via pip.
  However, **we recommend you [install PyTorch manually](https://pytorch.org/get-started/locally/#anaconda-1) before installing Ax, using the Anaconda package manager**.
  Installing from Anaconda will link against MKL (a library that optimizes mathematical computation for Intel processors).
  This will result in up to an order-of-magnitude speed-up for Bayesian optimization, as at the moment, installing PyTorch from pip does not link against MKL.

  If you need CUDA on MacOS, you will need to build PyTorch from source. Please consult the PyTorch installation instructions above.



  To use Ax with a notebook environment, you will need Jupyter. Install it first:
  ```
  pip install jupyter
  ```

  If you want to store the experiments in MySQL, you will need SQLAlchemy:
  ```
  pip install SQLAlchemy
  ```





  You can install the latest (bleeding edge) version from Git.

  First, see recommendation for installing PyTorch for MacOS users above.

  At times, the bleeding edge for Ax can depend on bleeding edge versions of BoTorch (or GPyTorch). We therefore recommend installing those from Git as well:

  ```
  pip install git+https://github.com/cornellius-gp/linear_operator.git
  pip install git+https://github.com/cornellius-gp/gpytorch.git
  export ALLOW_LATEST_GPYTORCH_LINOP=true
  pip install git+https://github.com/pytorch/botorch.git
  export ALLOW_BOTORCH_LATEST=true
  pip install git+https://github.com/facebook/Ax.git#egg=ax-platform
  ```



  If using Ax in Jupyter notebooks:

  ```
  pip install git+https://github.com/facebook/Ax.git#egg=ax-platform[notebook]
  ```

  To support plotly-based plotting in newer Jupyter notebook versions

  ```
  pip install "notebook>=5.3" "ipywidgets==7.5"
  ```

  [See Plotly repo's README](https://github.com/plotly/plotly.py#jupyter-notebook-support) for details and JupyterLab instructions.

  If storing Ax experiments via SQLAlchemy in MySQL or SQLite:
  ```
  pip install git+https://github.com/facebook/Ax.git#egg=ax-platform[mysql]
  ```





  Please open an issue on our [issues page](https://github.com/facebook/Ax/issues) with any questions, feature requests or bug reports! If posting a bug report, please include a minimal reproducible example (as a code snippet) that we can use to reproduce and debug the problem you encountered.



  See the [CONTRIBUTING](CONTRIBUTING.md) file for how to help out.

  When contributing to Ax, we recommend cloning the [repository](https://github.com/facebook/Ax) and installing all optional dependencies:

  ```
  pip install git+https://github.com/cornellius-gp/linear_operator.git
  pip install git+https://github.com/cornellius-gp/gpytorch.git
  export ALLOW_LATEST_GPYTORCH_LINOP=true
  pip install git+https://github.com/pytorch/botorch.git
  export ALLOW_BOTORCH_LATEST=true
  git clone https://github.com/facebook/ax.git --depth 1
  cd ax
  pip install -e .[notebook,mysql,dev]
  ```

  See recommendation for installing PyTorch for MacOS users above.

  The above example limits the cloned directory size via the
  [`--depth`](https://git-scm.com/docs/git-clone#Documentation/git-clone.txt---depthltdepthgt)
  argument to `git clone`. If you require the entire commit history you may remove this
  argument.



  Ax is licensed under the [MIT license](./LICENSE).


pkgId: a53583a5f3e95aecf24fc33642486e514c1be71131c5e9a755b9736514434618
name: python-azfs
arch: src
version: 0.2.14
epoch: 0
release: 1
summary: AzFS is to provide convenient Python read/write functions for Azure Storage Account.
url: https://github.com/gsy0911/azfs
rpm_license: MIT
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-52f11254-7b5f-4f95-9530-38c691354a1c
location_href: 00010936-python-azfs/python-azfs-0.2.14-1.src.rpm
checksum_type: sha256
description:
  [![pytest](https://github.com/gsy0911/azfs/workflows/pytest/badge.svg)](https://github.com/gsy0911/azfs/actions?query=workflow%3Apytest)
  [![codecov](https://codecov.io/gh/gsy0911/azfs/branch/master/graph/badge.svg)](https://codecov.io/gh/gsy0911/azfs)
  [![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/gsy0911/azfs.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/gsy0911/azfs/context:python)
  [![Documentation Status](https://readthedocs.org/projects/azfs/badge/?version=latest)](https://azfs.readthedocs.io/en/latest/?badge=latest)


  [![PythonVersion](https://img.shields.io/badge/python-3.6|3.7|3.8-blue.svg)](https://www.python.org/downloads/release/python-377/)
  [![PiPY](https://img.shields.io/pypi/v/azfs.svg)](https://pypi.org/project/azfs/)
  [![Downloads](https://pepy.tech/badge/azfs)](https://pepy.tech/project/azfs)

  AzFS is to provide convenient Python read/write functions for Azure Storage Account.

  `AzFS` can

  * list files in blob (also with wildcard `*`),
  * check if file exists,
  * read csv as pd.DataFrame, and json as dict from blob,
  * write pd.DataFrame as csv, and dict as json to blob.



  ```bash
  $ pip install azfs
  ```



  For `Blob` Storage.


  ```python
  import azfs
  from azure.identity import DefaultAzureCredential
  import pandas as pd


  azc = azfs.AzFileClient()


  credential = "[your storage account credential]"

  credential = DefaultAzureCredential()
  azc = azfs.AzFileClient(credential=credential)


  connection_string = "DefaultEndpointsProtocol=https;AccountName=xxxx;AccountKey=xxxx;EndpointSuffix=core.windows.net"
  azc = azfs.AzFileClient(connection_string=connection_string)


  csv_path = "https://testazfs.blob.core.windows.net/test_caontainer/test_file.csv"


  df = azc.read_csv(csv_path, index_col=0)

  with azc:
      df = pd.read_csv_az(csv_path, header=None)



  azc.write_csv(path=csv_path, df=df)

  with azc:
      df.to_csv_az(path=csv_path, index=False)


  csv_pattern_path = "https://testazfs.blob.core.windows.net/test_caontainer/*.csv"
  df = azc.read().csv(csv_pattern_path)


  df = azc.read().apply(function=lambda x: x[x['id'] == 'AAA']).csv(csv_pattern_path)


  df = azc.read(use_mp=True).apply(function=lambda x: x[x['id'] == 'AAA']).csv(csv_pattern_path)
  ```

  For `Queue` Storage

  ```python
  import azfs
  queue_url = "https://{storage_account}.queue.core.windows.net/{queue_name}"

  azc = azfs.AzFileClient()
  queue_message = azc.get(queue_url)




  queue_content = queue_message.get('content')

  ```

  For `Table` Storage

  ```python

  import azfs
  cons = {
      "account_name": "{storage_account_name}",
      "account_key": "{credential}",
      "database_name": "{database_name}"
  }

  table_client = azfs.TableStorageWrapper(**cons)


  table_client.put(id_="1", message="hello_world")


  table_client.get(id_="1")

  ```

  check more details in  [![Documentation Status](https://readthedocs.org/projects/azfs/badge/?version=latest)](https://azfs.readthedocs.io/en/latest/?badge=latest)



  Supported authentication types are
  * [Azure Active Directory (AAD) token credential](https://docs.microsoft.com/azure/storage/common/storage-auth-aad).
  * connection_string, like `DefaultEndpointsProtocol=https;AccountName=xxxx;AccountKey=xxxx;EndpointSuffix=core.windows.net`



  The table below shows if `AzFS` provides read/write functions for the storage.


  | account kind | Blob | Data Lake | Queue | File | Table |
  |:--|:--:|:--:|:--:|:--:|:--:|
  | StorageV2 | O | O | O | X | O |
  | StorageV1 | O | O | O | X | O |
  | BlobStorage | O | - | - | - | - |

  * O: provides basic functions
  * X: not provides
  * -: storage type unavailable



  ```
  pandas
  azure-identity >= "1.3.1"
  azure-storage-blob >= "12.3.0"
  azure-storage-file-datalake >= "12.0.0"
  azure-storage-queue >= "12.1.1"
  azure-cosmosdb-table
  ```




  * [azure-sdk-for-python/storage](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage)
  * [filesystem_spec](https://github.com/intake/filesystem_spec)


pkgId: 3d6f0a0ecf8cbbdc8d4671a86bbfef0d94fa1a7bc695a4baf9fda663c814321e
name: python-azure-appconfiguration
arch: src
version: 1.4.0
epoch: 0
release: 1
summary: Microsoft App Configuration Data Library for Python
url: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/appconfiguration/azure-appconfiguration
rpm_license: MIT License
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-ed5a2ecd-6c9b-46cb-9aae-91f017d1e07d
location_href: 00009789-python-azure-appconfiguration/python-azure-appconfiguration-1.4.0-1.src.rpm
checksum_type: sha256
description:
  Azure App Configuration is a managed service that helps developers centralize their application configurations simply and securely.

  Modern programs, especially programs running in a cloud, generally have many components that are distributed in nature. Spreading configuration settings across these components can lead to hard-to-troubleshoot errors during an application deployment. Use App Configuration to securely store all the settings for your application in one place.

  Use the client library for App Configuration to create and manage application configuration settings.

  [Source code](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/appconfiguration/azure-appconfiguration) | [Package (Pypi)][package] | [API reference documentation](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/appconfiguration/azure-appconfiguration) | [Product documentation][appconfig_docs]



  _Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For more information and questions, please refer to https://github.com/Azure/azure-sdk-for-python/issues/20691_
  _Python 3.7 or later is required to use this package. For more details, please refer to [Azure SDK for Python version support policy](https://github.com/Azure/azure-sdk-for-python/wiki/Azure-SDKs-Python-version-support-policy)._





  Install the Azure App Configuration client library for Python with pip:

  ```commandline
  pip install azure-appconfiguration
  ```



  * Python 3.7 or later is required to use this package.
  * You need an [Azure subscription][azure_sub], and a [Configuration Store][configuration_store] to use this package.

  To create a Configuration Store, you can use the Azure Portal or [Azure CLI][azure_cli].

  After that, create the Configuration Store:

  ```Powershell
  az appconfig create --name <config-store-name> --resource-group <resource-group-name> --location eastus
  ```



  In order to interact with the App Configuration service, you'll need to create an instance of the
  [AzureAppConfigurationClient][configuration_client_class] class. To make this possible,
  you can either use the connection string of the Configuration Store or use an AAD token.





  Use the [Azure CLI][azure_cli] snippet below to get the connection string from the Configuration Store.

  ```Powershell
  az appconfig credential list --name <config-store-name>
  ```

  Alternatively, get the connection string from the Azure Portal.



  Once you have the value of the connection string, you can create the AzureAppConfigurationClient:

  ```python
  from azure.appconfiguration import AzureAppConfigurationClient

  connection_str = "<connection_string>"
  client = AzureAppConfigurationClient.from_connection_string(connection_str)
  ```



  Here we demonstrate using [DefaultAzureCredential][default_cred_ref]
  to authenticate as a service principal. However, [AzureAppConfigurationClient][configuration_client_class]
  accepts any [azure-identity][azure_identity] credential. See the
  [azure-identity][azure_identity] documentation for more information about other
  credentials.


  This [Azure CLI][azure_cli] snippet shows how to create a
  new service principal. Before using it, replace "your-application-name" with
  the appropriate name for your service principal.

  Create a service principal:
  ```Bash
  az ad sp create-for-rbac --name http://my-application --skip-assignment
  ```

  > Output:
  > ```json
  > {
  >     "appId": "generated app id",
  >     "displayName": "my-application",
  >     "name": "http://my-application",
  >     "password": "random password",
  >     "tenant": "tenant id"
  > }
  > ```

  Use the output to set **AZURE_CLIENT_ID** ("appId" above), **AZURE_CLIENT_SECRET**
  ("password" above) and **AZURE_TENANT_ID** ("tenant" above) environment variables.
  The following example shows a way to do this in Bash:
  ```Bash
  export AZURE_CLIENT_ID="generated app id"
  export AZURE_CLIENT_SECRET="random password"
  export AZURE_TENANT_ID="tenant id"
  ```

  Assign one of the applicable [App Configuration roles](https://docs.microsoft.com/azure/azure-app-configuration/rest-api-authorization-azure-ad) to the service principal.


  Once the **AZURE_CLIENT_ID**, **AZURE_CLIENT_SECRET** and
  **AZURE_TENANT_ID** environment variables are set,
  [DefaultAzureCredential][default_cred_ref] will be able to authenticate the
  [AzureAppConfigurationClient][configuration_client_class].

  Constructing the client also requires your configuration store's URL, which you can
  get from the Azure CLI or the Azure Portal. In the Azure Portal, the URL can be found listed as the service "Endpoint"

  ```python
  from azure.identity import DefaultAzureCredential
  from azure.appconfiguration import AzureAppConfigurationClient

  credential = DefaultAzureCredential()

  client = AzureAppConfigurationClient(base_url="your_endpoint_url", credential=credential)
  ```





  A Configuration Setting is the fundamental resource within a Configuration Store. In its simplest form it is a key and a value. However, there are additional properties such as the modifiable content type and tags fields that allow the value to be interpreted or associated in different ways.

  The Label property of a Configuration Setting provides a way to separate Configuration Settings into different dimensions. These dimensions are user defined and can take any form. Some common examples of dimensions to use for a label include regions, semantic versions, or environments. Many applications have a required set of configuration keys that have varying values as the application exists across different dimensions.
  For example, MaxRequests may be 100 in "NorthAmerica", and 200 in "WestEurope". By creating a Configuration Setting named MaxRequests with a label of "NorthAmerica" and another, only with a different value, in the "WestEurope" label, an application can seamlessly retrieve Configuration Settings as it runs in these two dimensions.

  Properties of a Configuration Setting:

  ```python
  key : str
  label : str
  content_type : str
  value : str
  last_modified : str
  read_only : bool
  tags : dict
  etag : str
  ```



  The following sections provide several code snippets covering some of the most common Configuration Service tasks, including:

  * [Create a Configuration Setting](#create-a-configuration-setting)
  * [Get a Configuration Setting](#get-a-configuration-setting)
  * [Delete a Configuration Setting](#delete-a-configuration-setting)
  * [List Configuration Settings](#list-configuration-settings)
  * [Async APIs](#async-apis)



  Create a Configuration Setting to be stored in the Configuration Store.
  There are two ways to store a Configuration Setting:

  - add_configuration_setting creates a setting only if the setting does not already exist in the store.

  ```python
  config_setting = ConfigurationSetting(
      key="MyKey",
      label="MyLabel",
      value="my value",
      content_type="my content type",
      tags={"my tag": "my tag value"}
  )
  added_config_setting = client.add_configuration_setting(config_setting)
  ```

  - set_configuration_setting creates a setting if it doesn't exist or overrides an existing setting.

  ```python
  config_setting = ConfigurationSetting(
      key="MyKey",
      label="MyLabel",
      value="my set value",
      content_type="my set content type",
      tags={"my set tag": "my set tag value"}
  )
  returned_config_setting = client.set_configuration_setting(config_setting)
  ```



  Get a previously stored Configuration Setting.

  ```python
  fetched_config_setting = client.get_configuration_setting(
      key="MyKey", label="MyLabel"
  )
  ```



  Delete an existing Configuration Setting.

  ```python
  deleted_config_setting = client.delete_configuration_setting(
      key="MyKey", label="MyLabel"
  )
  ```



  List all configuration settings filtered with label_filter and/or key_filter.

  ```python

  filtered_listed = client.list_configuration_settings(
      label_filter="My*", key_filter="My*"
  )
  for item in filtered_listed:
      pass  # do something

  ```



  Async client is supported.
  To use the async client library, import the AzureAppConfigurationClient from package azure.appconfiguration.aio instead of azure.appconfiguration

  ```python
  from azure.appconfiguration.aio import AzureAppConfigurationClient

  connection_str = "<connection_string>"
  async_client = AzureAppConfigurationClient.from_connection_string(connection_str)
  ```

  This async AzureAppConfigurationClient has the same method signatures as the sync ones except that they're async.
  For instance, to retrieve a Configuration Setting asynchronously, async_client can be used:

  ```python
  fetched_config_setting = await async_client.get_configuration_setting(
      key="MyKey", label="MyLabel"
  )
  ```

  To use list_configuration_settings, call it synchronously and iterate over the returned async iterator asynchronously

  ```python

  filtered_listed = async_client.list_configuration_settings(
      label_filter="My*", key_filter="My*"
  )
  async for item in filtered_listed:
      pass  # do something

  ```





  This SDK uses Python standard logging library.
  You can configure logging print out debugging information to the stdout or anywhere you want.

  ```python
  import logging

  logging.basicConfig(level=logging.DEBUG)
  ````

  Http request and response details are printed to stdout with this logging config.





  Several App Configuration client library samples are available to you in this GitHub repository.  These include:
  - [Hello world](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/appconfiguration/azure-appconfiguration/samples/hello_world_sample.py) / [Async version](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/appconfiguration/azure-appconfiguration/samples/hello_world_sample_async.py)
  - [Hello world with labels](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/appconfiguration/azure-appconfiguration/samples/hello_world_advanced_sample.py) / [Async version](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/appconfiguration/azure-appconfiguration/samples/hello_world_advanced_sample_async.py)
  - [Make a configuration setting readonly](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/appconfiguration/azure-appconfiguration/samples/read_only_sample.py) / [Async version](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/appconfiguration/azure-appconfiguration/samples/hello_world_sample_async.py)
  - [Read revision history](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/appconfiguration/azure-appconfiguration/samples/list_revision_sample.py) / [Async version](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/appconfiguration/azure-appconfiguration/samples/list_revision_sample_async.py)
  - [Get a setting if changed](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/appconfiguration/azure-appconfiguration/samples/conditional_operation_sample.py) / [Async version](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/appconfiguration/azure-appconfiguration/samples/conditional_operation_sample_async.py)

   For more details see the [samples README](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/appconfiguration/azure-appconfiguration/samples/README.md).



  This 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.

  When 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.

  This project has adopted the
  [Microsoft Open Source Code of Conduct][code_of_conduct]. For more information,
  see the Code of Conduct FAQ or contact opencode@microsoft.com with any
  additional questions or comments.

  <!-- LINKS -->
  [appconfig_docs]: https://docs.microsoft.com/azure/azure-app-configuration/
  [appconfig_rest]: https://github.com/Azure/AppConfiguration#rest-api-reference
  [azure_cli]: https://docs.microsoft.com/cli/azure
  [azure_sub]: https://azure.microsoft.com/free/
  [configuration_client_class]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_azure_appconfiguration_client.py
  [package]: https://pypi.org/project/azure-appconfiguration/
  [configuration_store]: https://azure.microsoft.com/services/app-configuration/
  [default_cred_ref]: https://aka.ms/azsdk-python-identity-default-cred-ref
  [azure_identity]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity
  [cla]: https://cla.microsoft.com
  [code_of_conduct]: https://opensource.microsoft.com/codeofconduct/
  [coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
  [coc_contact]: mailto:opencode@microsoft.com







  - Python 2.7 is no longer supported. Please use Python version 3.7 or later.
  - Bumped minimum dependency on `azure-core` to `>=1.24.0`.
  - Changed the default async transport from `AsyncioRequestsTransport` to the one used in current `azure-core` (`AioHttpTransport`). ([#26427](https://github.com/Azure/azure-sdk-for-python/issues/26427))
  - Dropped `msrest` requirement.
  - Added dependency `isodate` with version range `>=0.6.0`.




  - Fix the issue that data was persisted according to an incorrect schema/in an incorrect format ([#20518](https://github.com/Azure/azure-sdk-for-python/issues/20518))

    `SecretReferenceConfigurationSetting` in 1.2.0 used "secret_uri" rather than "uri" as the schema keywords which
    broken inter-operation of `SecretReferenceConfigurationSetting` between SDK and the portal.

    Please:
    - Use 1.3.0+ for any `SecretReferenceConfigurationSetting` uses.
    - Call a get method for existing `SecretReferenceConfigurationSetting`s and set them back to correct the format.



  * Adds `FeatureFlagConfigurationSetting` and `SecretReferenceConfigurationSetting` models
  * `AzureAppConfigurationClient` can now be used as a context manager.
  * Adds `update_sync_token` to update sync tokens from Event Grid notifications.




  - Adds context manager functionality to the sync and async `AzureAppConfigurationClient`s.


  - Fixes a deserialization bug for `FeatureFlagConfigurationSetting` and `SecretReferenceConfigurationSetting`.





  - Adds method `update_sync_token` to include sync tokens from EventGrid notifications.
  - Added `SecretReferenceConfigurationSetting` type to represent a configuration setting that references a KeyVault Secret.
  Added `FeatureFlagConfigurationSetting` type to represent a configuration setting that controls a feature flag.





  - Improve error message if Connection string secret has incorrect padding. ([#14140](https://github.com/Azure/azure-sdk-for-python/issues/14140))





  - Added match condition support for `set_read_only` method. ([#13276](https://github.com/Azure/azure-sdk-for-python/issues/13276))





  - Doc & Sample fixes





  - Add AAD auth support. ([#8924](https://github.com/Azure/azure-sdk-for-python/issues/8924))



  - List_configuration_settings & list_revisions now take string key/label filter instead of keys/labels list. ([#9066](https://github.com/Azure/azure-sdk-for-python/issues/9066))





  - Add sync-token support. ([#8418](https://github.com/Azure/azure-sdk-for-python/issues/8418))



  - Combine set_read_only & clear_read_only to be set_read_only(True/False). ([#8453](https://github.com/Azure/azure-sdk-for-python/issues/8453))





  - etag and match_condition of delete_configuration_setting are now keyword argument only. ([#8161](https://github.com/Azure/azure-sdk-for-python/issues/8161))



  - Add conditional operation support
  - Add set_read_only and clear_read_only methods



  - New azure app configuration


pkgId: f8982885177ddff34a8f1dffe64c20a5dd049c82eaafd3cc1beb51c448cd0d72
name: python-azure-cli-command-modules-nspkg
arch: src
version: 2.0.3
epoch: 0
release: 1
summary: Microsoft Azure CLI Command Modules Namespace Package
url: https://github.com/Azure/azure-cli
rpm_license: MIT
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-8ba87d70-e194-42e0-ae51-23f54446bf23
checksum_type: sha256
description:
  This is the Microsoft Azure CLI command module namespace package.
  This package is not intended to be installed directly by the end user.
  It provides the necessary files for other packages to extend the azure cli command module namespaces.

location_href:
  00011678-python-azure-cli-command-modules-nspkg/python-azure-cli-command-modules-nspkg-2.0.3-1.src.rpm


pkgId: 98490abe46b13e9822e7ee2c7eb82d1bccdcfa33a0afc21573e6d3691dc12aba
name: python-azure-cli-command-modules-nspkg-help
arch: noarch
version: 2.0.3
epoch: 0
release: 1
summary: Development documents and examples for azure-cli-command-modules-nspkg
url: https://github.com/Azure/azure-cli
rpm_license: MIT
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-8ba87d70-e194-42e0-ae51-23f54446bf23
rpm_sourcerpm: python-azure-cli-command-modules-nspkg-2.0.3-1.src.rpm
checksum_type: sha256
description:
  This is the Microsoft Azure CLI command module namespace package.
  This package is not intended to be installed directly by the end user.
  It provides the necessary files for other packages to extend the azure cli command module namespaces.

location_href:
  00011678-python-azure-cli-command-modules-nspkg/python-azure-cli-command-modules-nspkg-help-2.0.3-1.noarch.rpm


pkgId: 3b4d34bb13d32a22742355866cbe74887ac7998650ad6feeeb0eee3d9ad87aad
name: python-azure-cli-nspkg
arch: src
version: 3.0.4
epoch: 0
release: 1
summary: Microsoft Azure CLI Namespace Package
url: https://github.com/Azure/azure-cli
rpm_license: MIT
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-22c2aba0-1827-49d8-bf6d-e4a00a33eac9
location_href: 00009549-python-azure-cli-nspkg/python-azure-cli-nspkg-3.0.4-1.src.rpm
checksum_type: sha256
description:
  This is the Microsoft Azure CLI namespace package.
  This package is not intended to be installed directly by the end user.
  It provides the necessary files for other packages to extend the azure cli namespaces.


pkgId: 38d0946d8f748278ad60b6b78fd87c830f03b74d38568bfb91f7e92a0adcd275
name: python-azure-cli-telemetry
arch: src
version: 1.0.8
epoch: 0
release: 1
summary: Microsoft Azure CLI Telemetry Package
url: https://github.com/Azure/azure-cli
rpm_license: MIT
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-2cf06021-145c-490e-b279-fbfb52dc042c
location_href: 00009449-python-azure-cli-telemetry/python-azure-cli-telemetry-1.0.8-1.src.rpm
checksum_type: sha256
description:
  This is the Microsoft Azure CLI Telemetry package. It is not intended to be installed directly by the end user.
  This package includes:
  1. Support API for Azure CLI to gather telemetry.
  2. Telemetry upload process.


pkgId: db9e89cb2d93f386d3340f365efd13c065787b201016ea74df9542c96a51b34c
name: python-azure-common
arch: src
version: 1.1.28
epoch: 0
release: 1
summary: Microsoft Azure Client Library for Python (Common)
url: https://github.com/Azure/azure-sdk-for-python
rpm_license: MIT License
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-1b085118-29c8-4711-92c1-5b6c11fddaf1
location_href: 00008951-python-azure-common/python-azure-common-1.1.28-1.src.rpm
checksum_type: sha256
description:
  This is the Microsoft Azure common code.

  This package provides shared code by the Azure packages.

  If you are looking to install the Azure client libraries, refer to the main Github repository:
  https://github.com/Azure/azure-sdk-for-python


  ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-common%2FREADME.png)






  - Raise a NotImplementedError if trying to use CLI credentials were CLI version is higher than 2.21.0  #20657 #21313
  - Deprecate all methods that needs access to CLI code using azure-cli-core, since this package is no longer importable as public API



  - Deprecate JSON and auth file client factory  #15075
  - Add 2020-09-01-hybrid profile definition  #14642



  - get_client_from_cli_profile now supports azure-applicationinsights 0.1.0 package



  - get_client_from_cli_profile no longer requires "azure-core" if not necessary



  - get_client_from_cli_profile now supports KV 4.x, Storage 12.x, AppConfig and all packages based on azure-core



  - Add Monitor into Profile v2019_03_01_hybrid (requires azure-mgmt-monitor >= 0.7.0)



  - Fix KeyVaultClient support for get_client_from_auth_file



  - Fix compute support in profile v2019_03_01_hybrid



  - Add support for profile v2019_03_01_hybrid
  - Fix profile v2018_03_01_hybrid for DNS definition



  - Azure Stack support for get_client_from_auth_file and get_client_from_json_dict



  - Remove deprecated extra dependencies



  - Fix KeyVaultClient creation with get_client_from_cli_profile

  Thanks to patrikn for the contribution



  - azure-nspkg is not installed anymore on Python 3 (PEP420-based namespace package)



  **Features**

  - Adding profile v2018-03-01-hybrid definition



  **Features**

  - Adding KeyVault to profile v2017_03_09_profile



  **Features**

  - get_azure_cli_credentials has a new parameter "with_tenant" to get default CLI tenant ID

  **Bugfixes**

  - get_client_from_cli_profile now supports the "azure-graphrbac" package #2867
  - get_client_from_auth_file now supports the "azure-graphrbac" package #2867



  **Features**

  - Add Authorization profile definition



  **Features**

  - Add support for "resource" in "get_azure_cli_credentials"



  **Bugfixes**

  - Fix MultiApiClientMixin.__init__ to be a real mixin



  **Features**

  - Add "azure.profiles" namespace #2247

  **Bugfixes**

  - get_client_from_cli_profile now supports Datalake #2318



  **Bugfix**

  - Fix get_client_from_auth_file and get_client_from_json_dict on Python 2.7

  Thank you to @jayden-at-arista for the contribution.



  - Adds azure.common.client_factory.get_client_from_auth_file
  - Adds azure.common.client_factory.get_client_from_json_dict



  - Adds azure.common.client_factory.get_client_from_cli_profile



  - "extra_requires" autorest is deprecated and should not be used anymore
  - This wheel package is now built with the azure wheel extension



  - Support for msrest/msrestazure 0.4.x series
  - Drop support for msrest/msrestazure 0.3.x series



  - Support for msrest/msrestazure 0.3.x series
  - Drop support for msrest/msrestazure 0.2.x series



  - Support for msrest/msrestazure 0.2.x series
  - Drop support for msrest/msrestazure 0.1.x series



  - Move msrestazure depency as "extra_requires"



  - Support for msrest/msrestazure 0.1.x series
  - Adds alias from msrestazure.azure_active_directory.* to azure.common.credentials



  Initial release, extracted from azure==0.11.1


pkgId: f616ba49042db089cbdbc43f53d3d7f0a5246100c0095d667cbee8acd34769c1
name: python-azure-core
arch: src
version: 1.26.4
epoch: 0
release: 1
summary: Microsoft Azure Core Library for Python
url: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/core/azure-core
rpm_license: MIT License
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-d310d853-f9e7-40cd-b353-96e02a2fbd9b
location_href: 00008933-python-azure-core/python-azure-core-1.26.4-1.src.rpm
checksum_type: sha256
description:
  Azure core provides shared exceptions and modules for Python SDK client libraries.
  These libraries follow the [Azure SDK Design Guidelines for Python](https://azure.github.io/azure-sdk/python/guidelines/index.html) .

  If 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.

  [Source code](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/)
  | [Package (Pypi)][package]
  | [Package (Conda)](https://anaconda.org/microsoft/azure-core/)
  | [API reference documentation](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/)



  _Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For more information and questions, please refer to <https://github.com/Azure/azure-sdk-for-python/issues/20691>_



  Typically, you will not need to install azure core;
  it will be installed when you install one of the client libraries using it.
  In case you want to install it explicitly (to implement your own client library, for example),
  you can find it [here](https://pypi.org/project/azure-core/).







  AzureError is the base exception for all errors.

  ```python
  class AzureError(Exception):
      def __init__(self, message, *args, **kwargs):
          self.inner_exception = kwargs.get("error")
          self.exc_type, self.exc_value, self.exc_traceback = sys.exc_info()
          self.exc_type = self.exc_type.__name__ if self.exc_type else type(self.inner_exception)
          self.exc_msg = "{}, {}: {}".format(message, self.exc_type, self.exc_value)  # type: ignore
          self.message = str(message)
          self.continuation_token = kwargs.get("continuation_token")
          super(AzureError, self).__init__(self.message, *args)
  ```

  *message* is any message (str) to be associated with the exception.

  *args* are any additional args to be included with exception.

  *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.

  **The following exceptions inherit from AzureError:**



  An error occurred while attempt to make a request to the service. No request was sent.



  The request was sent, but the client failed to understand the response.
  The connection may have timed out. These errors can be retried for idempotent or safe operations.



  A request was made, and a non-success status code was received from the service.

  ```python
  class HttpResponseError(AzureError):
      def __init__(self, message=None, response=None, **kwargs):
          self.reason = None
          self.response = response
          if response:
              self.reason = response.reason
              self.status_code = response.status_code
          self.error = self._parse_odata_body(ODataV4Format, response)  # type: Optional[ODataV4Format]
          if self.error:
              message = str(self.error)
          else:
              message = message or "Operation returned an invalid status '{}'".format(
                  self.reason
              )

          super(HttpResponseError, self).__init__(message=message, **kwargs)
  ```

  *message* is the HTTP response error message (optional)

  *response* is the HTTP response (optional).

  *kwargs* are keyword arguments to include with the exception.

  **The following exceptions inherit from HttpResponseError:**



  An error raised during response de-serialization.



  An error raised if peer closes the connection before we have received the complete message body.



  An error response with status code 4xx. This will not be raised directly by the Azure core pipeline.



  An error response, typically triggered by a 412 response (for update) or 404 (for get/post).



  An error response with status code 4xx, typically 412 Conflict. This will not be raised directly by the Azure core pipeline.



  An error response with status code 304. This will not be raised directly by the Azure core pipeline.



  An error response with status code 4xx. This will not be raised directly by the Azure core pipeline.



  An error raised when the maximum number of redirect attempts is reached. The maximum amount of redirects can be configured in the RedirectPolicy.

  ```python
  class TooManyRedirectsError(HttpResponseError):
      def __init__(self, history, *args, **kwargs):
          self.history = history
          message = "Reached maximum redirect attempts."
          super(TooManyRedirectsError, self).__init__(message, *args, **kwargs)
  ```

  *history* is used to document the requests/responses that resulted in redirected requests.

  *args* are any additional args to be included with exception.

  *kwargs* are keyword arguments to include with the exception.



  An error thrown if you try to access the stream of `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` once
  the response stream has been consumed.



  An error thrown if you try to access the stream of the `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` once
  the response stream has been closed.



  An error thrown if you try to access the `content` of `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` before
  reading in the response's bytes first.



  When calling the methods, some properties can be configured by passing in as kwargs arguments.

  | Parameters | Description |
  | --- | --- |
  | headers | The HTTP Request headers. |
  | request_id | The request id to be added into header. |
  | user_agent | If specified, this will be added in front of the user agent string. |
  | logging_enable| Use to enable per operation. Defaults to `False`. |
  | logger | If specified, it will be used to log information. |
  | response_encoding | The encoding to use if known for this service (will disable auto-detection). |
  | proxies | Maps protocol or protocol and hostname to the URL of the proxy. |
  | raw_request_hook | Callback function. Will be invoked on request. |
  | raw_response_hook | Callback function. Will be invoked on response. |
  | network_span_namer | A callable to customize the span name. |
  | tracing_attributes | Attributes to set on all created spans. |
  | permit_redirects | Whether the client allows redirects. Defaults to `True`. |
  | redirect_max | The maximum allowed redirects. Defaults to `30`. |
  | retry_total | Total number of retries to allow. Takes precedence over other counts. Default value is `10`. |
  | 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`. |
  | 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`. |
  | retry_status | How many times to retry on bad status codes. Default value is `3`. |
  | 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`. |
  | retry_backoff_max | The maximum back off time. Default value is `120` seconds (2 minutes). |
  | retry_mode | Fixed or exponential delay between attempts, default is `Exponential`. |
  | timeout | Timeout setting for the operation in seconds, default is `604800`s (7 days). |
  | connection_timeout | A single float in seconds for the connection timeout. Defaults to `300` seconds. |
  | read_timeout | A single float in seconds for the read timeout. Defaults to `300` seconds. |
  | 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. |
  | 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. |
  | proxies | Dictionary mapping protocol or protocol and hostname to the URL of the proxy. |
  | cookies | Dict or CookieJar object to send with the `Request`. |
  | connection_data_block_size | The block size of data sent over the connection. Defaults to `4096` bytes. |



  The 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.





  MatchConditions is an enum to describe match conditions.

  ```python
  class MatchConditions(Enum):
      Unconditionally = 1  # Matches any condition
      IfNotModified = 2  # If the target object is not modified. Usually it maps to etag=<specific etag>
      IfModified = 3  # Only if the target object is modified. Usually it maps to etag!=<specific etag>
      IfPresent = 4   # If the target object exists. Usually it maps to etag='*'
      IfMissing = 5   # If the target object does not exist. Usually it maps to etag!='*'
  ```



  A metaclass to support case-insensitive enums.

  ```python
  from enum import Enum

  from azure.core import CaseInsensitiveEnumMeta

  class MyCustomEnum(str, Enum, metaclass=CaseInsensitiveEnumMeta):
      FOO = 'foo'
      BAR = 'bar'
  ```



  A falsy sentinel object which is supposed to be used to specify attributes
  with no data. This gets serialized to `null` on the wire.

  ```python
  from azure.core.serialization import NULL

  assert bool(NULL) is False

  foo = Foo(
      attr=NULL
  )
  ```



  This 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](https://cla.microsoft.com).

  When 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.

  This 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.

  <!-- LINKS -->
  [package]: https://pypi.org/project/azure-core/








  - Updated settings to include OpenTelemetry as a tracer provider.  #29095



  - Improved typing





  - Fixed deflate decompression for aiohttp   #28483





  - Fix 'ClientSession' object has no attribute 'auto_decompress'  (thanks to @mghextreme for the contribution)



  - Add "x-ms-error-code" as secure header to log
  - Rename "DEFAULT_HEADERS_WHITELIST" to "DEFAULT_HEADERS_ALLOWLIST". Added a backward compatible alias.





  - Added example of RequestsTransport with custom session.  (thanks to @inirudebwoy for the contribution)   #26768
  - Added Python 3.11 support.





  - LRO polling will not wait anymore before doing the first status check  #26376
  - Added extra dependency for [aio]. pip install azure-core[aio] installs aiohttp too.





  - Added @runtime_checkable to `TokenCredential` protocol definitions  #25187



  Azure-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).



  - Added `CaseInsensitiveDict` implementation in `azure.core.utils` removing dependency on `requests` and `aiohttp`





  - Fixed the bug that azure-core could not be imported under Python 3.11.0b3  #24928
  - `ContentDecodePolicy` can now correctly deserialize more JSON bodies with different mime types #22410





  - Declare method level span as INTERNAL by default  #24492
  - Fixed type hints for `azure.core.paging.ItemPaged` #24548





  - Add `SerializationError` and `DeserializationError` in `azure.core.exceptions` for errors raised during serialization / deserialization  #24312





  - Allow stream inputs to the `content` kwarg of `azure.core.rest.HttpRequest` from objects with a `read` method  #23578





  - Improve intellisense type hinting for service client methods. #22891

  - Add a case insensitive dict `case_insensitive_dict` in `azure.core.utils`.  #23206



  - Use "\n" rather than "/n" for new line in log.     #23261



  - Log "WWW-Authenticate" header in `HttpLoggingPolicy`  #22990
  - Added dependency on `typing-extensions` >= 4.0.1





  - Limiting `final-state-via` scope to POST until consuming SDKs has been fixed to use this option properly on PUT.  #22989


  _[**This version is deprecated.**]_



  - Add support for `final-state-via` LRO option in core.  #22713



  - Add response body to string representation of `HttpResponseError` if we're not able to parse out information #22302
  - Raise `AttributeError` when calling azure.core.pipeline.transport.\_\_bases__    #22469



  - Python 2.7 is no longer supported. Please use Python version 3.6 or later.





  - Revert change in str method  #22023





  - Sync stream downloading now raises `azure.core.exceptions.DecodeError` rather than `requests.exceptions.ContentDecodingError`



  - Add response body to string representation of `HttpResponseError` if we're not able to parse out information #21800





  - Correctly set response's content to decompressed body when users are using aiohttp transport with decompression headers #21620





  - GA `send_request` onto the `azure.core.PipelineClient` and `azure.core.AsyncPipelineClient`. This method takes in
  requests and sends them through our pipelines.
  - 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.
  - GA errors `StreamConsumedError`, `StreamClosedError`, and `ResponseNotReadError` to `azure.core.exceptions`. These errors
  are thrown if you mishandle streamed responses from the `azure.core.rest` module
  - add kwargs to the methods for `iter_raw` and `iter_bytes`  #21529
  - no longer raise JSON errors if users pass in file descriptors of JSON to the `json` kwarg in `HttpRequest`  #21504
  - Added new error type `IncompleteReadError` which is raised if peer closes the connection before we have received the complete message body.



  - SansIOHTTPPolicy.on_exception returns None instead of bool.



  - The `Content-Length` header in a http response is strictly checked against the actual number of bytes in the body,
    rather than silently truncating data in case the underlying tcp connection is closed prematurely.
    (thanks to @jochen-ott-by for the contribution)   #20412
  - UnboundLocalError when SansIOHTTPPolicy handles an exception    #15222
  - 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





  - respect text encoding specified in argument (thanks to @ryohji for the contribution)  #20796
  - Fix "coroutine x.read() was never awaited" warning from `ContentDecodePolicy`  #21318
  - fix type check for `data` input to `azure.core.rest` for python 2.7 users  #21341
  - use `charset_normalizer` if `chardet` is not installed to migrate aiohttp 3.8.0 changes.



  - Refactor AzureJSONEncoder (thanks to @Codejune for the contribution)  #21028





  - `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse` are now abstract base classes. They should not be initialized directly, instead
  your transport responses should inherit from them and implement them.
  - The properties of the `azure.core.rest` responses are now all read-only

  - HttpLoggingPolicy integrates logs into one record #19925





  - `azure.core.serialization.AzureJSONEncoder` (introduced in 1.17.0) serializes `datetime.datetime` objects in ISO 8601 format, conforming to RFC 3339's specification.    #20190
  - We now use `azure.core.serialization.AzureJSONEncoder` to serialize `json` input to `azure.core.rest.HttpRequest`.



  - The `text` property on `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse` has changed to a method, which also takes
  an `encoding` parameter.
  - Removed `iter_text` and `iter_lines` from `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse`



  - 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.





  - Cut hard dependency on requests library
  - Added a `from_json` method which now accepts storage QueueMessage, eventhub's EventData or ServiceBusMessage or simply json bytes to return a `CloudEvent`



  - Not override "x-ms-client-request-id" if it already exists in the header.    #17757



  - `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`.





  - Add new ***provisional*** methods `send_request` onto the `azure.core.PipelineClient` and `azure.core.AsyncPipelineClient`. This method takes in
  requests and sends them through our pipelines.
  - 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.
  - Add new ***provisional*** errors `StreamConsumedError`, `StreamClosedError`, and `ResponseNotReadError` to `azure.core.exceptions`. These errors
  are thrown if you mishandle streamed responses from the provisional `azure.core.rest` module



  - Improved error message in the `from_dict` method of `CloudEvent` when a wrong schema is sent.





  - Added `BearerTokenCredentialPolicy.on_challenge` and `.authorize_request` to allow subclasses to optionally handle authentication challenges



  - Retry policies don't sleep after operations time out
  - The `from_dict` methhod in the `CloudEvent` can now convert a datetime string to datetime object when microsecond exceeds the python limitation





  - Added `azure.core.credentials.AzureNamedKeyCredential` credential #17548.
  - Added `decompress` parameter for `stream_download` method. If it is set to `False`, will not do decompression upon the stream.    #17920



  Azure core requires Python 2.7 or Python 3.6+ since this release.



  - Added `azure.core.utils.parse_connection_string` function to parse connection strings across SDKs, with common validation and support for case insensitive keys.
  - Supported adding custom policies  #16519
  - Added `~azure.core.tracing.Link` that should be used while passing `Links` to  `AbstractSpan`.
  - `AbstractSpan` constructor can now take in additional keyword only args.



  - Make NetworkTraceLoggingPolicy show the auth token in plain text. #14191
  - Fixed RetryPolicy overriding default connection timeout with an extreme value #17481



  This version will be the last version to officially support Python 3.5, future versions will require Python 2.7 or Python 3.6+.



  - Added `azure.core.messaging.CloudEvent` model that follows the cloud event spec.
  - Added `azure.core.serialization.NULL` sentinel value
  - Improve `repr`s for `HttpRequest` and `HttpResponse`s  #16972



  - Disable retry in stream downloading. (thanks to @jochen-ott-by @hoffmann for the contribution)  #16723





  - Added `CaseInsensitiveEnumMeta` class for case-insensitive enums.  #16316
  - Add `raise_for_status` method onto `HttpResponse`. Calling `response.raise_for_status()` on a response with an error code
  will raise an `HttpResponseError`. Calling it on a good response will do nothing  #16399



  - Update conn.conn_kw rather than overriding it when setting block size. (thanks for @jiasli for the contribution)  #16587





  - Added `AzureSasCredential` and its respective policy. #15946





  - Add a `continuation_token` attribute to the base `AzureError` exception, and set this value for errors raised
    during paged or long-running operations.



  - Set retry_interval to 1 second instead of 1000 seconds (thanks **vbarbaresi** for contributing)  #14357






  - Fixed bug to allow polling in the case of parameterized endpoints with relative polling urls  #14097






  - SAS credential replicated "/" fix #13159





  - Support params as list for exploding parameters  #12410






  - `AzureKeyCredentialPolicy` will now accept (and ignore) passed in kwargs  #11963
  - Better error messages if passed endpoint is incorrect  #12106
  - Do not JSON encore a string if content type is "text"  #12137



  - Added `http_logging_policy` property on the `Configuration` object, allowing users to individually
  set the http logging policy of the config  #12218





  - Fixed deadlocks in AsyncBearerTokenCredentialPolicy #11543
  - Fix AttributeException in StreamDownloadGenerator #11462



  - Added support for changesets as part of multipart message support #10485
  - Add AsyncLROPoller in azure.core.polling #10801
  - Add get_continuation_token/from_continuation_token/polling_method methods in pollers (sync and async) #10801
  - HttpResponse and PipelineContext objects are now pickable #10801





  - Support "x-ms-retry-after-ms" in response header   #10743
  - `link` and `link_from_headers` now accepts attributes   #10765



  - Not retry if the status code is less than 400 #10778
  - "x-ms-request-id" is not considered safe header for logging #10967





  - Support a default error type in map_error #9773
  - Added `AzureKeyCredential` and its respective policy. #10509
  - Added `azure.core.polling.base_polling` module with a "Microsoft One API" polling implementation #10090
    Also contains the async version in `azure.core.polling.async_base_polling`
  - Support kwarg `enforce_https` to disable HTTPS check on authentication #9821
  - Support additional kwargs in `HttpRequest.set_multipart_mixed` that will be passed into pipeline context.





  - Appended RequestIdPolicy to the default pipeline  #9841
  - Rewind the body position in async_retry   #10117



  - Add raw_request_hook support in custom_hook_policy   #9958
  - Add timeout support in retry_policy   #10011
  - Add OdataV4 error format auto-parsing in all exceptions ('error' attribute)  #9738





  - Fixed a bug that sends None as request_id #9545
  - Enable mypy for customers #9572
  - Handle TypeError in deep copy #9620
  - Fix text/plain content-type in decoder #9589





  - Fixed a regression in 1.2.0 that was incompatible with azure-keyvault-* 4.0.0
  [#9462](https://github.com/Azure/azure-sdk-for-python/issues/9462)






  - Add user_agent & sdk_moniker kwargs in UserAgentPolicy init   #9355
  - Support OPTIONS HTTP verb     #9322
  - Add tracing_attributes to tracing decorator   #9297
  - Support auto_request_id in RequestIdPolicy   #9163
  - Support fixed retry   #6419
  - Support "retry-after-ms" in response header   #9240



  - Removed `__enter__` and `__exit__` from async context managers    #9313





  - Bearer token authorization requires HTTPS
  - Rewind the body position in retry #8307





  - New RequestIdPolicy   #8437
  - Enable logging policy in default pipeline #8053
  - Normalize transport timeout.   #8000
    Now we have:
    * 'connection_timeout' - a single float in seconds for the connection timeout. Default 5min
    * 'read_timeout' - a single float in seconds for the read timeout. Default 5min



  - RequestHistory: deepcopy fails if request contains a stream  #7732
  - Retry: retry raises error if response does not have http_response #8629
  - Client kwargs are now passed to DistributedTracingPolicy correctly    #8051
  - NetworkLoggingPolicy now logs correctly all requests in case of retry #8262





  - Tracing: DistributedTracingPolicy now accepts kwargs network_span_namer to change network span name  #7773
  - Tracing: Implementation of AbstractSpan can now use the mixin HttpSpanMixin to get HTTP span update automatically  #7773
  - Tracing: AbstractSpan contract "change_context" introduced  #7773
  - Introduce new policy HttpLoggingPolicy  #7988



  - Fix AsyncioRequestsTransport if input stream is an async generator  #7743
  - Fix form-data with aiohttp transport  #7749



  - Tracing: AbstractSpan.set_current_span is longer supported. Use change_context instead.  #7773
  - azure.core.pipeline.policies.ContentDecodePolicy.deserialize_from_text changed





  - Tracing: network span context is available with the TRACING_CONTEXT in pipeline response  #7252
  - Tracing: Span contract now has `kind`, `traceparent` and is a context manager  #7252
  - SansIOHTTPPolicy methods can now be coroutines #7497
  - Add multipart/mixed support #7083:

    - HttpRequest now has a "set_multipart_mixed" method to set the parts of this request
    - HttpRequest now has a "prepare_multipart_body" method to build final body.
    - HttpResponse now has a "parts" method to return an iterator of parts
    - AsyncHttpResponse now has a "parts" methods to return an async iterator of parts
    - Note that multipart/mixed is a Python 3.x only feature



  - Tracing: policy cannot fail the pipeline, even in the worst condition  #7252
  - Tracing: policy pass correctly status message if exception  #7252
  - Tracing: incorrect span if exception raised from decorated function  #7133
  - Fixed urllib3 ConnectTimeoutError being raised by Requests during a socket timeout. Now this exception is caught and wrapped as a `ServiceRequestError`  #7542



  - Tracing: `azure.core.tracing.context` removed
  - Tracing: `azure.core.tracing.context.tracing_context.with_current_context` renamed to `azure.core.tracing.common.with_current_context`  #7252
  - Tracing: `link` renamed `link_from_headers`  and `link` takes now a string
  - Tracing: opencensus implementation has been moved to the package `azure-core-tracing-opencensus`
  - Some modules and classes that were importables from several different places have been removed:

     - `azure.core.HttpResponseError` is now only `azure.core.exceptions.HttpResponseError`
     - `azure.core.Configuration` is now only `azure.core.configuration.Configuration`
     - `azure.core.HttpRequest` is now only `azure.core.pipeline.transport.HttpRequest`
     - `azure.core.version` module has been removed. Use `azure.core.__version__` to get version number.
     - `azure.core.pipeline_client` has been removed. Import from `azure.core` instead.
     - `azure.core.pipeline_client_async` has been removed. Import from `azure.core` instead.
     - `azure.core.pipeline.base` has been removed. Import from `azure.core.pipeline` instead.
     - `azure.core.pipeline.base_async` has been removed. Import from `azure.core.pipeline` instead.
     - `azure.core.pipeline.policies.base` has been removed. Import from `azure.core.pipeline.policies` instead.
     - `azure.core.pipeline.policies.base_async` has been removed. Import from `azure.core.pipeline.policies` instead.
     - `azure.core.pipeline.policies.authentication` has been removed. Import from `azure.core.pipeline.policies` instead.
     - `azure.core.pipeline.policies.authentication_async` has been removed. Import from `azure.core.pipeline.policies` instead.
     - `azure.core.pipeline.policies.custom_hook` has been removed. Import from `azure.core.pipeline.policies` instead.
     - `azure.core.pipeline.policies.redirect` has been removed. Import from `azure.core.pipeline.policies` instead.
     - `azure.core.pipeline.policies.redirect_async` has been removed. Import from `azure.core.pipeline.policies` instead.
     - `azure.core.pipeline.policies.retry` has been removed. Import from `azure.core.pipeline.policies` instead.
     - `azure.core.pipeline.policies.retry_async` has been removed. Import from `azure.core.pipeline.policies` instead.
     - `azure.core.pipeline.policies.distributed_tracing` has been removed. Import from `azure.core.pipeline.policies` instead.
     - `azure.core.pipeline.policies.universal` has been removed. Import from `azure.core.pipeline.policies` instead.
     - `azure.core.tracing.abstract_span` has been removed. Import from `azure.core.tracing` instead.
     - `azure.core.pipeline.transport.base` has been removed. Import from `azure.core.pipeline.transport` instead.
     - `azure.core.pipeline.transport.base_async` has been removed. Import from `azure.core.pipeline.transport` instead.
     - `azure.core.pipeline.transport.requests_basic` has been removed. Import from `azure.core.pipeline.transport` instead.
     - `azure.core.pipeline.transport.requests_asyncio` has been removed. Import from `azure.core.pipeline.transport` instead.
     - `azure.core.pipeline.transport.requests_trio` has been removed. Import from `azure.core.pipeline.transport` instead.
     - `azure.core.pipeline.transport.aiohttp` has been removed. Import from `azure.core.pipeline.transport` instead.
     - `azure.core.polling.poller` has been removed. Import from `azure.core.polling` instead.
     - `azure.core.polling.async_poller` has been removed. Import from `azure.core.polling` instead.





  -  Fix aiohttp auto-headers #6992
  -  Add tracing to policies module init  #6951





  - Transport classes don't take `config` parameter anymore (use kwargs instead)  #6372
  - `azure.core.paging` has been completely refactored  #6420
  - HttpResponse.content_type attribute is now a string (was a list)  #6490
  - 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



  - aiohttp is not required to import async pipelines classes #6496
  - `AsyncioRequestsTransport.sleep` is now a coroutine as expected #6490
  - `RequestsTransport` is not tight to `ProxyPolicy` implementation details anymore #6372
  - `AiohttpTransport` does not raise on unexpected kwargs  #6355



  - New paging base classes that support `continuation_token` and `by_page()`  #6420
  - Proxy support for `AiohttpTransport`  #6372



  - Preview 1 release


pkgId: 9926b3663c93bc4553f55df5123e2d8872c3893edd9a15c6c8aa03afc117863c
name: python-azure-cosmos
arch: src
version: 4.3.1
epoch: 0
release: 1
summary: Microsoft Azure Cosmos Client Library for Python
url: https://github.com/Azure/azure-sdk-for-python
rpm_license: MIT License
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-e0933b85-fd81-479e-86a7-0632c82e0df8
location_href: 00009291-python-azure-cosmos/python-azure-cosmos-4.3.1-1.src.rpm
checksum_type: sha256
description:
  _Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For more information and questions, please refer to https://github.com/Azure/azure-sdk-for-python/issues/20691_



  Azure Cosmos DB is a globally distributed, multi-model database service that supports document, key-value, wide-column, and graph databases.

  Use the Azure Cosmos DB SQL API SDK for Python to manage databases and the JSON documents they contain in this NoSQL database service. High level capabilities are:

  * Create Cosmos DB **databases** and modify their settings
  * Create and modify **containers** to store collections of JSON documents
  * Create, read, update, and delete the **items** (JSON documents) in your containers
  * Query the documents in your database using **SQL-like syntax**

  [SDK source code][source_code] | [Package (PyPI)][cosmos_pypi] | [API reference documentation][ref_cosmos_sdk] | [Product documentation][cosmos_docs] | [Samples][cosmos_samples]

  > This SDK is used for the [SQL API](https://docs.microsoft.com/azure/cosmos-db/sql-query-getting-started). For all other APIs, please check the [Azure Cosmos DB documentation](https://docs.microsoft.com/azure/cosmos-db/introduction) to evaluate the best SDK for your project.





  New releases of this SDK won't support Python 2.x starting January 1st, 2022. Please check the [CHANGELOG](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/cosmos/azure-cosmos/CHANGELOG.md) for more information.



  * Azure subscription - [Create a free account][azure_sub]
  * Azure [Cosmos DB account][cosmos_account] - SQL API
  * [Python 3.6+][python]

  If you need a Cosmos DB SQL API account, you can create one with this [Azure CLI][azure_cli] command:

  ```Bash
  az cosmosdb create --resource-group <resource-group-name> --name <cosmos-account-name>
  ```



  ```bash
  pip install azure-cosmos
  ```



  Although not required, you can keep your base system and Azure SDK environments isolated from one another if you use a virtual environment. Execute the following commands to configure and then enter a virtual environment with [venv][venv]:

  ```Bash
  python3 -m venv azure-cosmosdb-sdk-environment
  source azure-cosmosdb-sdk-environment/bin/activate
  ```



  Interaction with Cosmos DB starts with an instance of the [CosmosClient][ref_cosmosclient] class. You need an **account**, its **URI**, and one of its **account keys** to instantiate the client object.

  Use the Azure CLI snippet below to populate two environment variables with the database account URI and its primary master key (you can also find these values in the Azure portal). The snippet is formatted for the Bash shell.

  ```Bash
  RES_GROUP=<resource-group-name>
  ACCT_NAME=<cosmos-db-account-name>

  export ACCOUNT_URI=$(az cosmosdb show --resource-group $RES_GROUP --name $ACCT_NAME --query documentEndpoint --output tsv)
  export ACCOUNT_KEY=$(az cosmosdb list-keys --resource-group $RES_GROUP --name $ACCT_NAME --query primaryMasterKey --output tsv)
  ```



  Once you've populated the `ACCOUNT_URI` and `ACCOUNT_KEY` environment variables, you can create the [CosmosClient][ref_cosmosclient].

  ```Python
  from azure.cosmos import CosmosClient

  import os
  URL = os.environ['ACCOUNT_URI']
  KEY = os.environ['ACCOUNT_KEY']
  client = CosmosClient(URL, credential=KEY)
  ```



  You can also authenticate a client utilizing your service principal's AAD credentials and the azure identity package.
  You can directly pass in the credentials information to ClientSecretCredential, or use the DefaultAzureCredential:
  ```Python
  from azure.cosmos import CosmosClient
  from azure.identity import ClientSecretCredential, DefaultAzureCredential

  import os
  url = os.environ['ACCOUNT_URI']
  tenant_id = os.environ['TENANT_ID']
  client_id = os.environ['CLIENT_ID']
  client_secret = os.environ['CLIENT_SECRET']


  aad_credentials = ClientSecretCredential(
      tenant_id=tenant_id,
      client_id=client_id,
      client_secret=client_secret)


  aad_credentials = DefaultAzureCredential()

  client = CosmosClient(url, aad_credentials)
  ```
  Always ensure that the managed identity you use for AAD authentication has `readMetadata` permissions. <br>
  More information on how to set up AAD authentication: [Set up RBAC for AAD authentication](https://docs.microsoft.com/azure/cosmos-db/how-to-setup-rbac) <br>
  More information on allowed operations for AAD authenticated clients: [RBAC Permission Model](https://aka.ms/cosmos-native-rbac)



  Once you've initialized a [CosmosClient][ref_cosmosclient], you can interact with the primary resource types in Cosmos DB:

  * [Database][ref_database]: A Cosmos DB account can contain multiple databases. When you create a database, you specify the API you'd like to use when interacting with its documents: SQL, MongoDB, Gremlin, Cassandra, or Azure Table. Use the [DatabaseProxy][ref_database] object to manage its containers.

  * [Container][ref_container]: A container is a collection of JSON documents. You create (insert), read, update, and delete items in a container by using methods on the [ContainerProxy][ref_container] object.

  * Item: An Item is the dictionary-like representation of a JSON document stored in a container. Each Item you add to a container must include an `id` key with a value that uniquely identifies the item within the container.

  For more information about these resources, see [Working with Azure Cosmos databases, containers and items][cosmos_resources].




  The keyword-argument `enable_cross_partition_query` accepts 2 options: `None` (default) or `True`.



  When using queries that try to find items based on an **id** value, always make sure you are passing in a string type variable. Azure Cosmos DB only allows string id values and if you use any other datatype, this SDK will return no results and no error messages.



  As of release version 4.3.0b3, if a user does not pass in an explicit consistency level to their client initialization,
  their client will use their database account's default level. Previously, the default was being set to `Session` consistency.
  If for some reason you'd like to keep doing this, you can change your client initialization to include the explicit parameter for this like shown:
  ```Python
  from azure.cosmos import CosmosClient

  import os
  URL = os.environ['ACCOUNT_URI']
  KEY = os.environ['ACCOUNT_KEY']
  client = CosmosClient(URL, credential=KEY, consistency_level='Session')
  ```



  Currently the features below are **not supported**. For alternatives options, check the **Workarounds** section below.



  * Group By queries
  * Queries with COUNT from a DISTINCT subquery: SELECT COUNT (1) FROM (SELECT DISTINCT C.ID FROM C)
  * Bulk/Transactional batch processing
  * Direct TCP Mode access
  * Continuation token for cross partitions queries
  * Change Feed: Processor
  * Change Feed: Read multiple partitions key values
  * Change Feed: Read specific time
  * Change Feed: Read from the beginning
  * Change Feed: Pull model
  * Cross-partition ORDER BY for mixed types
  * Enabling diagnostics for async query-type methods



  * Get CollectionSizeUsage, DatabaseUsage, and DocumentUsage metrics
  * Create Geospatial Index
  * Get the connection string
  * Get the minimum RU/s of a container





  If you want to use Python SDK to perform bulk inserts to Cosmos DB, the best alternative is to use [stored procedures](https://docs.microsoft.com/azure/cosmos-db/how-to-write-stored-procedures-triggers-udfs) to write multiple items with the same partition key.



  Typically, you can use [Azure Portal](https://portal.azure.com/), [Azure Cosmos DB Resource Provider REST API](https://docs.microsoft.com/rest/api/cosmos-db-resource-provider), [Azure CLI](https://docs.microsoft.com/cli/azure/azure-cli-reference-for-cosmos-db) or [PowerShell](https://docs.microsoft.com/azure/cosmos-db/manage-with-powershell) for the control plane unsupported limitations.



  While the Python language [uses](https://docs.python.org/3/library/stdtypes.html?highlight=boolean#truth-value-testing) "True" and "False" for boolean types, Cosmos DB [accepts](https://docs.microsoft.com/azure/cosmos-db/sql-query-is-bool) "true" and "false" only. In other words, the Python language uses Boolean values with the first uppercase letter and all other lowercase letters, while Cosmos DB and its SQL language use only lowercase letters for those same Boolean values. How to deal with this challenge?

  * Your JSON documents created with Python must use "True" and "False", to pass the language validation. The SDK will convert it to "true" and "false" for you. Meaning that "true" and "false" is what will be stored in Cosmos DB.
  * If you retrieve those documents with the Cosmos DB Portal's Data Explorer, you will see "true" and "false".
  * If you retrieve those documents with this Python SDK, "true" and "false" values will be automatically converted to "True" and "False".



  This SDK uses the [query_items](https://docs.microsoft.com/python/api/azure-cosmos/azure.cosmos.containerproxy?preserve-view=true&view=azure-python#query-items-query--parameters-none--partition-key-none--enable-cross-partition-query-none--max-item-count-none--enable-scan-in-query-none--populate-query-metrics-none----kwargs-) method to submit SQL queries to Azure Cosmos DB.

  Cosmos DB SQL language allows you to [get subitems by using the FROM clause](https://docs.microsoft.com/azure/cosmos-db/sql-query-from#get-subitems-by-using-the-from-clause), to reduce the source to a smaller subset. As an example, you can use `select * from Families.children` instead of `select * from Families`. But please note that:

  * For SQL queries using the `query_items` method, this SDK demands that you specify the `partition_key` or use the `enable_cross_partition_query` flag.
  * If you are getting subitems and specifying the `partition_key`, please make sure that your partition key is included in the subitems, which is not true for most of the cases.



  This is a parameter of the query_items method, an integer indicating the maximum number of items to be returned per page. The `None` value can be specified to let the service determine the optimal item count. This is the recommended configuration value, and the default behavior of this SDK when it is not set.



  The following sections provide several code snippets covering some of the most common Cosmos DB tasks, including:

  * [Create a database](#create-a-database "Create a database")
  * [Create a container](#create-a-container "Create a container")
  * [Create an analytical store enabled container](#create-an-analytical-store-enabled-container "Create a container")
  * [Get an existing container](#get-an-existing-container "Get an existing container")
  * [Insert data](#insert-data "Insert data")
  * [Delete data](#delete-data "Delete data")
  * [Query the database](#query-the-database "Query the database")
  * [Get database properties](#get-database-properties "Get database properties")
  * [Get database and container throughputs](#get-database-and-container-throughputs "Get database and container throughputs")
  * [Modify container properties](#modify-container-properties "Modify container properties")
  * [Using the asynchronous client](#using-the-asynchronous-client "Using the asynchronous client")



  After authenticating your [CosmosClient][ref_cosmosclient], you can work with any resource in the account. The code snippet below creates a SQL API database, which is the default when no API is specified when [create_database][ref_cosmosclient_create_database] is invoked.

  ```Python
  from azure.cosmos import CosmosClient, exceptions
  import os

  URL = os.environ['ACCOUNT_URI']
  KEY = os.environ['ACCOUNT_KEY']
  client = CosmosClient(URL, credential=KEY)
  DATABASE_NAME = 'testDatabase'
  try:
      database = client.create_database(DATABASE_NAME)
  except exceptions.CosmosResourceExistsError:
      database = client.get_database_client(DATABASE_NAME)
  ```



  This example creates a container with default settings. If a container with the same name already exists in the database (generating a `409 Conflict` error), the existing container is obtained instead.

  ```Python
  from azure.cosmos import CosmosClient, PartitionKey, exceptions
  import os

  URL = os.environ['ACCOUNT_URI']
  KEY = os.environ['ACCOUNT_KEY']
  client = CosmosClient(URL, credential=KEY)
  DATABASE_NAME = 'testDatabase'
  database = client.get_database_client(DATABASE_NAME)
  CONTAINER_NAME = 'products'

  try:
      container = database.create_container(id=CONTAINER_NAME, partition_key=PartitionKey(path="/productName"))
  except exceptions.CosmosResourceExistsError:
      container = database.get_container_client(CONTAINER_NAME)
  except exceptions.CosmosHttpResponseError:
      raise
  ```



  This example creates a container with [Analytical Store](https://docs.microsoft.com/azure/cosmos-db/analytical-store-introduction) enabled, for reporting, BI, AI, and Advanced Analytics with [Azure Synapse Link](https://docs.microsoft.com/azure/cosmos-db/synapse-link).

  The options for analytical_storage_ttl are:

  + 0 or Null or not informed: Not enabled.
  + -1: The data will be stored infinitely.
  + Any other number: the actual ttl, in seconds.


  ```Python
  CONTAINER_NAME = 'products'
  try:
      container = database.create_container(id=CONTAINER_NAME, partition_key=PartitionKey(path="/productName"),analytical_storage_ttl=-1)
  except exceptions.CosmosResourceExistsError:
      container = database.get_container_client(CONTAINER_NAME)
  except exceptions.CosmosHttpResponseError:
      raise
  ```

  The preceding snippets also handle the [CosmosHttpResponseError][ref_httpfailure] exception if the container creation failed. For more information on error handling and troubleshooting, see the [Troubleshooting](#troubleshooting "Troubleshooting") section.



  Retrieve an existing container from the database:

  ```Python
  from azure.cosmos import CosmosClient
  import os

  URL = os.environ['ACCOUNT_URI']
  KEY = os.environ['ACCOUNT_KEY']
  client = CosmosClient(URL, credential=KEY)
  DATABASE_NAME = 'testDatabase'
  database = client.get_database_client(DATABASE_NAME)
  CONTAINER_NAME = 'products'
  container = database.get_container_client(CONTAINER_NAME)
  ```



  To insert items into a container, pass a dictionary containing your data to [ContainerProxy.upsert_item][ref_container_upsert_item]. Each item you add to a container must include an `id` key with a value that uniquely identifies the item within the container.

  This example inserts several items into the container, each with a unique `id`:

  ```Python
  from azure.cosmos import CosmosClient
  import os

  URL = os.environ['ACCOUNT_URI']
  KEY = os.environ['ACCOUNT_KEY']
  client = CosmosClient(URL, credential=KEY)
  DATABASE_NAME = 'testDatabase'
  database = client.get_database_client(DATABASE_NAME)
  CONTAINER_NAME = 'products'
  container = database.get_container_client(CONTAINER_NAME)

  for i in range(1, 10):
      container.upsert_item({
              'id': 'item{0}'.format(i),
              'productName': 'Widget',
              'productModel': 'Model {0}'.format(i)
          }
      )
  ```



  To delete items from a container, use [ContainerProxy.delete_item][ref_container_delete_item]. The SQL API in Cosmos DB does not support the SQL `DELETE` statement.

  ```Python
  from azure.cosmos import CosmosClient
  import os

  URL = os.environ['ACCOUNT_URI']
  KEY = os.environ['ACCOUNT_KEY']
  client = CosmosClient(URL, credential=KEY)
  DATABASE_NAME = 'testDatabase'
  database = client.get_database_client(DATABASE_NAME)
  CONTAINER_NAME = 'products'
  container = database.get_container_client(CONTAINER_NAME)

  for item in container.query_items(
          query='SELECT * FROM products p WHERE p.productModel = "Model 2"',
          enable_cross_partition_query=True):
      container.delete_item(item, partition_key='Widget')
  ```

  > NOTE: If you are using partitioned collection, the value of the `partitionKey` in the example code above, should be set to the value of the partition key for this particular item, not the name of the partition key column in your collection. This holds true for both point reads and deletes.



  A Cosmos DB SQL API database supports querying the items in a container with [ContainerProxy.query_items][ref_container_query_items] using SQL-like syntax.

  This example queries a container for items with a specific `id`:

  ```Python
  from azure.cosmos import CosmosClient
  import os

  URL = os.environ['ACCOUNT_URI']
  KEY = os.environ['ACCOUNT_KEY']
  client = CosmosClient(URL, credential=KEY)
  DATABASE_NAME = 'testDatabase'
  database = client.get_database_client(DATABASE_NAME)
  CONTAINER_NAME = 'products'
  container = database.get_container_client(CONTAINER_NAME)


  import json
  for item in container.query_items(
          query='SELECT * FROM mycontainer r WHERE r.id="item3"',
          enable_cross_partition_query=True):
      print(json.dumps(item, indent=True))
  ```

  > NOTE: Although you can specify any value for the container name in the `FROM` clause, we recommend you use the container name for consistency.

  Perform parameterized queries by passing a dictionary containing the parameters and their values to [ContainerProxy.query_items][ref_container_query_items]:

  ```Python
  discontinued_items = container.query_items(
      query='SELECT * FROM products p WHERE p.productModel = @model',
      parameters=[
          dict(name='@model', value='Model 7')
      ],
      enable_cross_partition_query=True
  )
  for item in discontinued_items:
      print(json.dumps(item, indent=True))
  ```

  For more information on querying Cosmos DB databases using the SQL API, see [Query Azure Cosmos DB data with SQL queries][cosmos_sql_queries].



  Get and display the properties of a database:

  ```Python
  from azure.cosmos import CosmosClient
  import os
  import json

  URL = os.environ['ACCOUNT_URI']
  KEY = os.environ['ACCOUNT_KEY']
  client = CosmosClient(URL, credential=KEY)
  DATABASE_NAME = 'testDatabase'
  database = client.get_database_client(DATABASE_NAME)
  properties = database.read()
  print(json.dumps(properties))
  ```



  Get and display the throughput values of a database and of a container with dedicated throughput:

  ```Python
  from azure.cosmos import CosmosClient
  import os
  import json

  URL = os.environ['ACCOUNT_URI']
  KEY = os.environ['ACCOUNT_KEY']
  client = CosmosClient(URL, credential=KEY)


  DATABASE_NAME = 'testDatabase'
  database = client.get_database_client(DATABASE_NAME)
  db_offer = database.read_offer()
  print('Found Offer \'{0}\' for Database \'{1}\' and its throughput is \'{2}\''.format(db_offer.properties['id'], database.id, db_offer.properties['content']['offerThroughput']))


  CONTAINER_NAME = 'testContainer'
  container = database.get_container_client(CONTAINER_NAME)
  container_offer = container.read_offer()
  print('Found Offer \'{0}\' for Container \'{1}\' and its throughput is \'{2}\''.format(container_offer.properties['id'], container.id, container_offer.properties['content']['offerThroughput']))
  ```




  Certain properties of an existing container can be modified. This example sets the default time to live (TTL) for items in the container to 10 seconds:

  ```Python
  from azure.cosmos import CosmosClient, PartitionKey
  import os
  import json

  URL = os.environ['ACCOUNT_URI']
  KEY = os.environ['ACCOUNT_KEY']
  client = CosmosClient(URL, credential=KEY)
  DATABASE_NAME = 'testDatabase'
  database = client.get_database_client(DATABASE_NAME)
  CONTAINER_NAME = 'products'
  container = database.get_container_client(CONTAINER_NAME)

  database.replace_container(
      container,
      partition_key=PartitionKey(path="/productName"),
      default_ttl=10,
  )

  container_props = container.read()
  print(json.dumps(container_props['defaultTtl']))
  ```

  For more information on TTL, see [Time to Live for Azure Cosmos DB data][cosmos_ttl].



  The asynchronous cosmos client is a separate client that looks and works in a similar fashion to the existing synchronous client. However, the async client needs to be imported separately and its methods need to be used with the async/await keywords.
  The Async client needs to be initialized and closed after usage, which can be done manually or with the use of a context manager. The example below shows how to do so manually.

  ```Python
  from azure.cosmos.aio import CosmosClient
  import os

  URL = os.environ['ACCOUNT_URI']
  KEY = os.environ['ACCOUNT_KEY']
  DATABASE_NAME = 'testDatabase'
  CONTAINER_NAME = 'products'

  async def create_products():
      client = CosmosClient(URL, credential=KEY)
      database = client.get_database_client(DATABASE_NAME)
      container = database.get_container_client(CONTAINER_NAME)
      for i in range(10):
          await container.upsert_item({
                  'id': 'item{0}'.format(i),
                  'productName': 'Widget',
                  'productModel': 'Model {0}'.format(i)
              }
          )
      await client.close() # the async client must be closed manually if it's not initialized in a with statement
  ```

  Instead of manually opening and closing the client, it is highly recommended to use the `async with` keywords. This creates a context manager that will initialize and later close the client once you're out of the statement. The example below shows how to do so.

  ```Python
  from azure.cosmos.aio import CosmosClient
  import os

  URL = os.environ['ACCOUNT_URI']
  KEY = os.environ['ACCOUNT_KEY']
  DATABASE_NAME = 'testDatabase'
  CONTAINER_NAME = 'products'

  async def create_products():
      async with CosmosClient(URL, credential=KEY) as client: # the with statement will automatically initialize and close the async client
          database = client.get_database_client(DATABASE_NAME)
          container = database.get_container_client(CONTAINER_NAME)
          for i in range(10):
              await container.upsert_item({
                      'id': 'item{0}'.format(i),
                      'productName': 'Widget',
                      'productModel': 'Model {0}'.format(i)
                  }
              )
  ```



  Unlike the synchronous client, the async client does not have an `enable_cross_partition` flag in the request. Queries without a specified partition key value will attempt to do a cross partition query by default.

  Query results can be iterated, but the query's raw output returns an asynchronous iterator. This means that each object from the iterator is an awaitable object, and does not yet contain the true query result. In order to obtain the query results you can use an async for loop, which awaits each result as you iterate on the object, or manually await each query result as you iterate over the asynchronous iterator.

  Since the query results are an asynchronous iterator, they can't be cast into lists directly; instead, if you need to create lists from your results, use an async for loop or Python's list comprehension to populate a list:

  ```Python
  from azure.cosmos.aio import CosmosClient
  import os

  URL = os.environ['ACCOUNT_URI']
  KEY = os.environ['ACCOUNT_KEY']
  client = CosmosClient(URL, credential=KEY)
  DATABASE_NAME = 'testDatabase'
  database = client.get_database_client(DATABASE_NAME)
  CONTAINER_NAME = 'products'
  container = database.get_container_client(CONTAINER_NAME)

  async def create_lists():
      results = container.query_items(
              query='SELECT * FROM products p WHERE p.productModel = "Model 2"')

      

      item_list = []
      async for item in results:
          item_list.append(item)

      
      item_list = [item async for item in results]
      await client.close()
  ```


  An integrated cache is an in-memory cache that helps you ensure manageable costs and low latency as your request volume grows. The integrated cache has two parts: an item cache for point reads and a query cache for queries. The code snippet below shows you how to use this feature with the point read and query cache methods.

  The benefit of using this is that the point reads and queries that hit the integrated cache won't use any RUs. This means you will have a much lower per-operation cost than reads from the backend.

  [How to configure the Azure Cosmos DB integrated cache (Preview)][cosmos_configure_integrated_cache]

  ```Python
  import azure.cosmos.cosmos_client as cosmos_client
  import os

  URL = os.environ['ACCOUNT_URI']
  KEY = os.environ['ACCOUNT_KEY']
  client = cosmos_client.CosmosClient(URL, credential=KEY)
  DATABASE_NAME = 'testDatabase'
  database = client.get_database_client(DATABASE_NAME)
  CONTAINER_NAME = 'testContainer'
  container = database.get_container_client(CONTAINER_NAME)

  def integrated_cache_snippet():
      item_id = body['id']
      query = 'SELECT * FROM c'

      
      container.read_item(item=item_id, partition_key=item_id, max_integrated_cache_staleness_in_ms=30000)

      
      container.query_items(query=query,
           partition_key=item_id, max_integrated_cache_staleness_in_ms=30000)
  ```
  For more information on Integrated Cache, see [Azure Cosmos DB integrated cache - Overview][cosmos_integrated_cache].





  When you interact with Cosmos DB using the Python SDK, exceptions returned by the service correspond to the same HTTP status codes returned for REST API requests:

  [HTTP Status Codes for Azure Cosmos DB][cosmos_http_status_codes]

  For example, if you try to create a container using an ID (name) that's already in use in your Cosmos DB database, a `409` error is returned, indicating the conflict. In the following snippet, the error is handled gracefully by catching the exception and displaying additional information about the error.

  ```Python
  try:
      database.create_container(id=CONTAINER_NAME, partition_key=PartitionKey(path="/productName"))
  except exceptions.CosmosResourceExistsError:
      print("""Error creating container
  HTTP status code 409: The ID (name) provided for the container is already in use.
  The container name must be unique within the database.""")

  ```


  This library uses the standard
  [logging](https://docs.python.org/3.5/library/logging.html) library for logging.
  Basic information about HTTP sessions (URLs, headers, etc.) is logged at INFO
  level.

  Detailed DEBUG level logging, including request/response bodies and unredacted
  headers, can be enabled on a client with the `logging_enable` argument:
  ```python
  import sys
  import logging
  from azure.cosmos import CosmosClient


  logger = logging.getLogger('azure')
  logger.setLevel(logging.DEBUG)


  handler = logging.StreamHandler(stream=sys.stdout)
  logger.addHandler(handler)


  client = CosmosClient(URL, credential=KEY, logging_enable=True)
  ```

  Similarly, `logging_enable` can enable detailed logging for a single operation,
  even when it isn't enabled for the client:
  ```py
  database = client.create_database(DATABASE_NAME, logging_enable=True)
  ```
  Alternatively, you can log using the CosmosHttpLoggingPolicy, which extends from the azure core HttpLoggingPolicy, by passing in your logger to the `logger` argument.
  By default, it will use the behaviour from HttpLoggingPolicy. Passing in the `enable_diagnostics_logging` argument will enable the
  CosmosHttpLoggingPolicy, and will have additional information in the response relevant to debugging Cosmos issues.
  ```python
  import logging
  from azure.cosmos import CosmosClient


  logger = logging.getLogger('azure')
  logger.setLevel(logging.DEBUG)


  handler = logging.FileHandler(filename="azure")
  logger.addHandler(handler)



  client = CosmosClient(URL, credential=KEY, logger=logger, enable_diagnostics_logging=True)
  ```
  Similarly, logging can be enabled for a single operation by passing in a logger to the singular request.
  However, if you desire to use the CosmosHttpLoggingPolicy to obtain additional information, the `enable_diagnostics_logging` argument needs to be passed in at the client constructor.
  ```py

  client = CosmosClient(URL, credential=KEY, enable_diagnostics_logging=True)
  database = client.create_database(DATABASE_NAME, logger=logger)
  ```



  For more extensive documentation on the Cosmos DB service, see the [Azure Cosmos DB documentation][cosmos_docs] on docs.microsoft.com.

  <!-- LINKS -->
  [azure_cli]: https://docs.microsoft.com/cli/azure
  [azure_portal]: https://portal.azure.com
  [azure_sub]: https://azure.microsoft.com/free/
  [cloud_shell]: https://docs.microsoft.com/azure/cloud-shell/overview
  [cosmos_account_create]: https://docs.microsoft.com/azure/cosmos-db/how-to-manage-database-account
  [cosmos_account]: https://docs.microsoft.com/azure/cosmos-db/account-overview
  [cosmos_container]: https://docs.microsoft.com/azure/cosmos-db/databases-containers-items#azure-cosmos-containers
  [cosmos_database]: https://docs.microsoft.com/azure/cosmos-db/databases-containers-items#azure-cosmos-databases
  [cosmos_docs]: https://docs.microsoft.com/azure/cosmos-db/
  [cosmos_samples]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/cosmos/azure-cosmos/samples
  [cosmos_pypi]: https://pypi.org/project/azure-cosmos/
  [cosmos_http_status_codes]: https://docs.microsoft.com/rest/api/cosmos-db/http-status-codes-for-cosmosdb
  [cosmos_item]: https://docs.microsoft.com/azure/cosmos-db/databases-containers-items#azure-cosmos-items
  [cosmos_request_units]: https://docs.microsoft.com/azure/cosmos-db/request-units
  [cosmos_resources]: https://docs.microsoft.com/azure/cosmos-db/databases-containers-items
  [cosmos_sql_queries]: https://docs.microsoft.com/azure/cosmos-db/how-to-sql-query
  [cosmos_ttl]: https://docs.microsoft.com/azure/cosmos-db/time-to-live
  [cosmos_integrated_cache]: https://docs.microsoft.com/azure/cosmos-db/integrated-cache
  [cosmos_configure_integrated_cache]: https://docs.microsoft.com/azure/cosmos-db/how-to-configure-integrated-cache
  [python]: https://www.python.org/downloads/
  [ref_container_delete_item]: https://aka.ms/azsdk-python-cosmos-ref-delete-item
  [ref_container_query_items]: https://aka.ms/azsdk-python-cosmos-ref-query-items
  [ref_container_upsert_item]: https://aka.ms/azsdk-python-cosmos-ref-upsert-item
  [ref_container]: https://aka.ms/azsdk-python-cosmos-ref-container
  [ref_cosmos_sdk]: https://aka.ms/azsdk-python-cosmos-ref
  [ref_cosmosclient_create_database]: https://aka.ms/azsdk-python-cosmos-ref-create-database
  [ref_cosmosclient]: https://aka.ms/azsdk-python-cosmos-ref-cosmos-client
  [ref_database]: https://aka.ms/azsdk-python-cosmos-ref-database
  [ref_httpfailure]: https://aka.ms/azsdk-python-cosmos-ref-http-failure
  [sample_database_mgmt]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/cosmos/azure-cosmos/samples/database_management.py
  [sample_document_mgmt]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/cosmos/azure-cosmos/samples/document_management.py
  [sample_examples_misc]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/cosmos/azure-cosmos/samples/examples.py
  [source_code]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/cosmos/azure-cosmos
  [venv]: https://docs.python.org/3/library/venv.html
  [virtualenv]: https://virtualenv.pypa.io



  This 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.

  When 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.

  This 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.







   - Added `correlated_activity_id` for query operations
   - Added cross regional retries for Service Unavailable/Request Timeouts for read/Query Plan operations
   - GA release of CosmosHttpLoggingPolicy and autoscale feature


  - Bug fix to address queries with VALUE MAX (or any other aggregate) that run into an issue if the query is executed on a container with at least one "empty" partition.




  - GA release of integrated cache functionality. For more information on integrated cache please see [Azure Cosmos DB integrated cache](https://docs.microsoft.com/azure/cosmos-db/integrated-cache).
  - Added ability to replace analytical ttl on containers. For more information on analytical ttl please see [Azure Cosmos DB analytical store](https://docs.microsoft.com/azure/cosmos-db/analytical-store-introduction).
  - Added `CosmosHttpLoggingPolicy` to replace `HttpLoggingPolicy` for logging HTTP sessions.
  - Added the ability to create containers and databases with autoscale properties for the sync and async clients.
  - Added the ability to update autoscale throughput properties.


  - Fixed parsing of args for overloaded `container.read()` method.
  - Fixed `validate_cache_staleness_value()` method to allow max_integrated_cache_staleness to be an integer greater than or equal to 0.
  - Fixed `__aiter__()` method by removing the async keyword.



  - GA release of Async I/O APIs, including all changes from 4.3.0b1 to 4.3.0b4.


  - Method signatures have been updated to use keyword arguments instead of positional arguments for most method options in the async client.
  - Bugfix: Automatic Id generation for items was turned on for `upsert_items()` method when no 'id' value was present in document body.
  Method call will now require an 'id' field to be present in the document body.


  - Deprecated offer-named methods in favor of their new throughput-named counterparts (`read_offer` -> `get_throughput`).
  - Marked the GetAuthorizationHeader method for deprecation since it will no longer be public in a future release.
  - Added samples showing how to configure retry options for both the sync and async clients.
  - Deprecated the `connection_retry_policy` and `retry_options` options in the sync client.
  - Added user warning to non-query methods trying to use `populate_query_metrics` options.




  - Added support for AAD authentication for the async client.
  - Added support for AAD authentication for the sync client.


  - Changed `_set_partition_key` return typehint in async client.



  >[WARNING]
  >The default `Session` consistency bugfix will impact customers whose database accounts have a `Bounded Staleness` or `Strong`
  > consistency level, and were previously not sending `Session` as a consistency_level parameter when initializing
  > their clients.
  > Default consistency level for the sync and async clients is no longer "Session" and will instead be set to the
    consistency level of the user's cosmos account setting on initialization if not passed during client initialization.
  > Please see [Consistency Levels in Azure Cosmos DB](https://docs.microsoft.com/azure/cosmos-db/consistency-levels)
  > for more details on consistency levels, or the README section on this change [here](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/cosmos/azure-cosmos#note-on-client-consistency-levels).


  - Added new **provisional** `max_integrated_cache_staleness_in_ms` parameter to read item and query items APIs in order
    to make use of the **preview** CosmosDB integrated cache functionality [See PR #22946](https://github.com/Azure/azure-sdk-for-python/pull/22946).
    Please see [Azure Cosmos DB integrated cache](https://docs.microsoft.com/azure/cosmos-db/integrated-cache) for more details.
  - Added support for split-proof queries for the async client.


  - Default consistency level for the sync and async clients is no longer `Session` and will instead be set to the
    consistency level of the user's cosmos account setting on initialization if not passed during client initialization.
    This change will impact client application in terms of RUs and latency. Users relying on default `Session` consistency
    will need to pass it explicitly if their account consistency is different than `Session`.
    Please see [Consistency Levels in Azure Cosmos DB](https://docs.microsoft.com/azure/cosmos-db/consistency-levels) for more details.
  - Fixed invalid request body being sent when passing in `serverScript` body parameter to replace operations for trigger, sproc and udf resources.
  - Moved `is_system_key` logic in async client.
  - Fixed TypeErrors not being thrown when passing in invalid connection retry policies to the client.



  This version and all future versions will require Python 3.6+. Python 2.7 is no longer supported.
  We will also be removing support for Python 3.6 and will only support Python 3.7+ starting December 2022.


  - Added support for split-proof queries for the sync client.


  - Added async user agent for async client.




  - Added language native async i/o client.



  **Bug fixes**
  - Fixed bug where continuation token is not honored when query_iterable is used to get results by page. Issue #13265.
  - Fixed bug where resource tokens not being honored for document reads and deletes. Issue #13634.

  **New features**
  - Added support for passing partitionKey while querying changefeed. Issue #11689.



  - Added deprecation warning for "lazy" indexing mode. The backend no longer allows creating containers with this mode and will set them to consistent instead.

  **New features**
  - Added the ability to set the analytical storage TTL when creating a new container.

  **Bug fixes**
  - Fixed support for dicts as inputs for get_client APIs.
  - Fixed Python 2/3 compatibility in query iterators.
  - Fixed type hint error. Issue #12570 - thanks @sl-sandy.
  - Fixed bug where options headers were not added to upsert_item function. Issue #11791 - thank you @aalapatirvbd.
  - Fixed error raised when a non string ID is used in an item. It now raises TypeError rather than AttributeError. Issue #11793 - thank you @Rabbit994.




  - Stable release.
  - Added HttpLoggingPolicy to pipeline to enable passing in a custom logger for request and response headers.




  - Fixed bug in synchronized_request for media APIs.
  - Removed MediaReadMode and MediaRequestTimeout from ConnectionPolicy as media requests are not supported.




  - azure.cosmos.errors module deprecated and replaced by azure.cosmos.exceptions
  - The access condition parameters (`access_condition`, `if_match`, `if_none_match`) have been deprecated in favor of separate `match_condition` and `etag` parameters.
  - Fixed bug in routing map provider.
  - Added query Distinct, Offset and Limit support.
  - Default document query execution context now used for
      - ChangeFeed queries
      - single partition queries (partitionkey, partitionKeyRangeId is present in options)
      - Non document queries
  - Errors out for aggregates on multiple partitions, with enable cross partition query set to true, but no "value" keyword present
  - Hits query plan endpoint for other scenarios to fetch query plan
  - Added `__repr__` support for Cosmos entity objects.
  - Updated documentation.




  - Added support for a `timeout` keyword argument to all operations to specify an absolute timeout in seconds
    within which the operation must be completed. If the timeout value is exceeded, a `azure.cosmos.errors.CosmosClientTimeoutError` will be raised.
  - Added a new `ConnectionRetryPolicy` to manage retry behaviour during HTTP connection errors.
  - Added new constructor and per-operation configuration keyword arguments:
      - `retry_total` - Maximum retry attempts.
      - `retry_backoff_max` - Maximum retry wait time in seconds.
      - `retry_fixed_interval` - Fixed retry interval in milliseconds.
      - `retry_read` - Maximum number of socket read retry attempts.
      - `retry_connect` - Maximum number of connection error retry attempts.
      - `retry_status` - Maximum number of retry attempts on error status codes.
      - `retry_on_status_codes` - A list of specific status codes to retry on.
      - `retry_backoff_factor` - Factor to calculate wait time between retry attempts.



  - Added `create_database_if_not_exists()` and `create_container_if_not_exists` functionalities to CosmosClient and Database respectively.



  Version 4.0.0b2 is the second iteration in our efforts to build a more Pythonic client library.

  **Breaking changes**

  - The client connection has been adapted to consume the HTTP pipeline defined in `azure.core.pipeline`.
  - Interactive objects have now been renamed as proxies. This includes:
      - `Database` -> `DatabaseProxy`
      - `User` -> `UserProxy`
      - `Container` -> `ContainerProxy`
      - `Scripts` -> `ScriptsProxy`
  - The constructor of `CosmosClient` has been updated:
      - The `auth` parameter has been renamed to `credential` and will now take an authentication type directly. This means the master key value, a dictionary of resource tokens, or a list of permissions can be passed in. However the old dictionary format is still supported.
      - The `connection_policy` parameter has been made a keyword only parameter, and while it is still supported, each of the individual attributes of the policy can now be passed in as explicit keyword arguments:
          - `request_timeout`
          - `media_request_timeout`
          - `connection_mode`
          - `media_read_mode`
          - `proxy_config`
          - `enable_endpoint_discovery`
          - `preferred_locations`
          - `multiple_write_locations`
  - A new classmethod constructor has been added to `CosmosClient` to enable creation via a connection string retrieved from the Azure portal.
  - Some `read_all` operations have been renamed to `list` operations:
      - `CosmosClient.read_all_databases` -> `CosmosClient.list_databases`
      - `Container.read_all_conflicts` -> `ContainerProxy.list_conflicts`
      - `Database.read_all_containers` -> `DatabaseProxy.list_containers`
      - `Database.read_all_users` -> `DatabaseProxy.list_users`
      - `User.read_all_permissions` -> `UserProxy.list_permissions`
  - All operations that take `request_options` or `feed_options` parameters, these have been moved to keyword only parameters. In addition, while these options dictionaries are still supported, each of the individual options within the dictionary are now supported as explicit keyword arguments.
  - The error hierarchy is now inherited from `azure.core.AzureError` instead of `CosmosError` which has been removed.
      - `HTTPFailure` has been renamed to `CosmosHttpResponseError`
      - `JSONParseFailure` has been removed and replaced by `azure.core.DecodeError`
      - Added additional errors for specific response codes:
          - `CosmosResourceNotFoundError` for status 404
          - `CosmosResourceExistsError` for status 409
          - `CosmosAccessConditionFailedError` for status 412
  - `CosmosClient` can now be run in a context manager to handle closing the client connection.
  - Iterable responses (e.g. query responses and list responses) are now of type `azure.core.paging.ItemPaged`. The method `fetch_next_block` has been replaced by a secondary iterator, accessed by the `by_page` method.



  Version 4.0.0b1 is the first preview of our efforts to create a user-friendly and Pythonic client library for Azure Cosmos. For more information about this, and preview releases of other Azure SDK libraries, please visit https://aka.ms/azure-sdk-preview1-python.

  **Breaking changes: New API design**

  - Operations are now scoped to a particular client:
      - `CosmosClient`: This client handles account-level operations. This includes managing service properties and listing the databases within an account.
      - `Database`: This client handles database-level operations. This includes creating and deleting containers, users and stored procedures. It can be accessed from a `CosmosClient` instance by name.
      - `Container`: This client handles operations for a particular container. This includes querying and inserting items and managing properties.
      - `User`: This client handles operations for a particular user. This includes adding and deleting permissions and managing user properties.

      These clients can be accessed by navigating down the client hierarchy using the `get_<child>_client` method. For full details on the new API, please see the [reference documentation](https://aka.ms/azsdk-python-cosmos-ref).
  - Clients are accessed by name rather than by Id. No need to concatenate strings to create links.
  - No more need to import types and methods from individual modules. The public API surface area is available directly in the `azure.cosmos` package.
  - Individual request properties can be provided as keyword arguments rather than constructing a separate `RequestOptions` instance.



  - Added Support for MultiPolygon Datatype
  - Bug Fix in Session Read Retry Policy
  - Bug Fix for Incorrect padding issues while decoding base 64 strings



  - Bug fix in LocationCache
  - Bug fix endpoint retry logic
  - Fixed documentation



  - Multi-region write support added
  - Naming changes
    - DocumentClient to CosmosClient
    - Collection to Container
    - Document to Item
    - Package name updated to "azure-cosmos"
    - Namespace updated to "azure.cosmos"



  - Added support for proxy
  - Added support for reading change feed
  - Added support for collection quota headers
  - Bugfix for large session tokens issue
  - Bugfix for ReadMedia API
  - Bugfix in partition key range cache



  - Added support for default retries on connection issues.



  - Updated documentation to reference Azure Cosmos DB instead of Azure DocumentDB.



  - This SDK version requires the latest version of Azure Cosmos DB Emulator available for download from https://aka.ms/cosmosdb-emulator.



  - bugfix for aggregate dict
  - bugfix for trimming slashes in the resource link
  - tests for unicode encoding



  - Added support for Request Unit per Minute (RU/m) feature.
  - Added support for a new consistency level called ConsistentPrefix.



  - Added support for aggregation queries (COUNT, MIN, MAX, SUM, and AVG).
  - Added an option for disabling SSL verification when running against DocumentDB Emulator.
  - Removed the restriction of dependent requests module to be exactly 2.10.0.
  - Lowered minimum throughput on partitioned collections from 10,100 RU/s to 2500 RU/s.
  - Added support for enabling script logging during stored procedure execution.
  - REST API version bumped to '2017-01-19' with this release.



  - Made editorial changes to documentation comments.



  - Added support for Python 3.5.
  - Added support for connection pooling using the requests module.
  - Added support for session consistency.
  - Added support for TOP/ORDERBY queries for partitioned collections.



  - Added retry policy support for throttled requests. (Throttled requests receive a request rate too large exception, error code 429.)
    By default, DocumentDB retries nine times for each request when error code 429 is encountered, honoring the retryAfter time in the response header.
    A fixed retry interval time can now be set as part of the RetryOptions property on the ConnectionPolicy object if you want to ignore the retryAfter time returned by server between the retries.
    DocumentDB now waits for a maximum of 30 seconds for each request that is being throttled (irrespective of retry count) and returns the response with error code 429.
    This time can also be overridden in the RetryOptions property on ConnectionPolicy object.

  - DocumentDB now returns x-ms-throttle-retry-count and x-ms-throttle-retry-wait-time-ms as the response headers in every request to denote the throttle retry count
    and the cumulative time the request waited between the retries.

  - Removed the RetryPolicy class and the corresponding property (retry_policy) exposed on the document_client class and instead introduced a RetryOptions class
    exposing the RetryOptions property on ConnectionPolicy class that can be used to override some of the default retry options.



  - Added the support for geo-replicated database accounts.
  - Test fixes to move the global host and masterKey into the individual test classes.



  - Added the support for Time To Live(TTL) feature for documents.



  - Bug fixes related to server side partitioning to allow special characters in partitionkey path.



  - Added the support for server side partitioned collections feature.



  - Added Client-side sharding framework to the SDK. Implemented HashPartionResolver and RangePartitionResolver classes.



  - Implement Upsert. New UpsertXXX methods added to support Upsert feature.
  - Implement ID Based Routing. No public API changes, all changes internal.



  - Release skipped to bring version number in alignment with other SDKs



  - Supports GeoSpatial index.
  - Validates id property for all resources. Ids for resources cannot contain ?, /, #, \\, characters or end with a space.
  - Adds new header "index transformation progress" to ResourceResponse.



  - Implements V2 indexing policy



  - Supports proxy connection


pkgId: c5feabea46d7968b396ba0fb3494c984dec438a0f1136ae8bb39b6aabf42d988
name: python-azure-cosmosdb-nspkg
arch: src
version: 2.0.2
epoch: 0
release: 1
summary: Microsoft Azure CosmosDB Namespace Package [Internal]
url: https://github.com/Azure/azure-cosmosdb-python
rpm_license: Apache License 2.0
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-8da5985e-aeb3-492a-8999-db82c659536d
location_href: 00009188-python-azure-cosmosdb-nspkg/python-azure-cosmosdb-nspkg-2.0.2-1.src.rpm
checksum_type: sha256
description:
  This is the Microsoft Azure CosmosDB namespace package.
  This package is not intended to be installed directly by the end user.
  It provides the necessary files for other packages to extend the azure.cosmosdb namespace.
  If you are looking to install the Azure CosmosDB libraries, see the
  `azure <https://pypi.python.org/pypi/azure>`__ bundle package.


pkgId: 964736135508acba20e1667e908b32fd84d360e4f7e518736e91e694f58d1998
name: python-azure-cosmosdb-table
arch: src
version: 1.0.6
epoch: 0
release: 1
summary: Microsoft Azure CosmosDB Table Client Library for Python
url: https://github.com/Azure/azure-cosmosdb-python
rpm_license: Apache License 2.0
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-62a9f06e-5581-45f9-bec2-303676b3a6f9
location_href: 00009178-python-azure-cosmosdb-table/python-azure-cosmosdb-table-1.0.6-1.src.rpm
checksum_type: sha256
description:
  This project provides a client library in Python that makes it easy to
  consume Microsoft Azure CosmosDB Table services. For documentation please see
  the Microsoft Azure `Python Developer Center`_ and our `API Reference`_ Page.
      If you are looking for the Service Bus or Azure Management
      libraries, please visit
      https://github.com/Azure/azure-sdk-for-python.


pkgId: be32d5ff8e30fdbd22f5d1015578cf0fd48c194c06d68b7461980bb8c7541dc0
name: python-azure-data-tables
arch: src
version: 12.4.2
epoch: 0
release: 1
summary: Microsoft Azure Azure Data Tables Client Library for Python
url: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/table/azure-table
rpm_license: MIT License
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-d59b34b3-0eae-42f1-b1da-bfa92caa14b4
location_href: 00010313-python-azure-data-tables/python-azure-data-tables-12.4.2-1.src.rpm
checksum_type: sha256
description:
  Azure Tables is a NoSQL data storage service that can be accessed from anywhere in the world via authenticated calls using HTTP or HTTPS.
  Tables scales as needed to support the amount of data inserted, and allow for the storing of data with non-complex accessing.
  The Azure Tables client can be used to access Azure Storage or Cosmos accounts. This document covers [`azure-data-tables`][Tables_pypi].

  Please note, this package is a replacement for [`azure-cosmosdb-tables`](https://github.com/Azure/azure-cosmos-table-python/tree/master/azure-cosmosdb-table) which is now deprecated. See the [migration guide][migration_guide] for more details.

  [Source code][source_code] | [Package (PyPI)][Tables_pypi] | [API reference documentation][Tables_ref_docs] | [Samples][Tables_samples]



  _Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For more information and questions, please refer to https://github.com/Azure/azure-sdk-for-python/issues/20691_
  _Python 3.7 or later is required to use this package. For more details, please refer to [Azure SDK for Python version support policy](https://github.com/Azure/azure-sdk-for-python/wiki/Azure-SDKs-Python-version-support-policy)._


  The Azure Tables SDK can access an Azure Storage or CosmosDB account.


  * Python 3.7 or later is required to use this package.
  * You must have an [Azure subscription][azure_subscription] and either
      * an [Azure Storage account][azure_storage_account] or
      * an [Azure Cosmos Account][azure_cosmos_account].


  * To create a new storage account, you can use [Azure Portal][azure_portal_create_account], [Azure PowerShell][azure_powershell_create_account], or [Azure CLI][azure_cli_create_account]:
  * To create a new cosmos storage account, you can use the [Azure CLI][azure_cli_create_cosmos] or [Azure Portal][azure_portal_create_cosmos].


  Install the Azure Tables client library for Python with [pip][pip_link]:
  ```bash
  pip install azure-data-tables
  ```


  The Azure Tables library allows you to interact with two types of resources:
  * the tables in your account
  * the entities within those tables.
  Interaction with these resources starts with an instance of a [client](#clients). To create a client object, you will need the account's table service endpoint URL and a credential that allows you to access the account. The `endpoint` can be found on the page for your storage account in the [Azure Portal][azure_portal_account_url] under the "Access Keys" section or by running the following Azure CLI command:

  ```bash

  az storage account show -n mystorageaccount -g MyResourceGroup --query "primaryEndpoints.table"
  ```

  Once you have the account URL, it can be used to create the service client:
  ```python
  from azure.data.tables import TableServiceClient
  service = TableServiceClient(endpoint="https://<my_account_name>.table.core.windows.net/", credential=credential)
  ```

  For more information about table service URL's and how to configure custom domain names for Azure Storage check out the [official documentation][azure_portal_account_url]


  The `credential` parameter may be provided in a number of different forms, depending on the type of authorization you wish to use. The Tables library supports the following authorizations:
  * Shared Key
  * Connection String
  * Shared Access Signature Token


  To use an account [shared key][azure_shared_key] (aka account key or access key), provide the key as a string. This can be found in your storage account in the [Azure Portal][azure_portal_account_url] under the "Access Keys" section or by running the following Azure CLI command:

  ```bash
  az storage account keys list -g MyResourceGroup -n MyStorageAccount
  ```

  Use the key as the credential parameter to authenticate the client:
  ```python
  from azure.core.credentials import AzureNamedKeyCredential
  from azure.data.tables import TableServiceClient

  credential = AzureNamedKeyCredential("my_account_name", "my_access_key")

  service = TableServiceClient(endpoint="https://<my_account_name>.table.core.windows.net", credential=credential)
  ```


  Depending on your use case and authorization method, you may prefer to initialize a client instance with a connection string instead of providing the account URL and credential separately. To do this, pass the
  connection string to the client's `from_connection_string` class method. The connection string can be found in your storage account in the [Azure Portal][azure_portal_account_url] under the "Access Keys" section or with the following Azure CLI command:

  ```bash
  az storage account show-connection-string -g MyResourceGroup -n MyStorageAccount
  ```

  ```python
  from azure.data.tables import TableServiceClient
  connection_string = "DefaultEndpointsProtocol=https;AccountName=<my_account_name>;AccountKey=<my_account_key>;EndpointSuffix=core.windows.net"
  service = TableServiceClient.from_connection_string(conn_str=connection_string)
  ```


  To use a [shared access signature (SAS) token][azure_sas_token], provide the token as a string. If your account URL includes the SAS token, omit the credential parameter. You can generate a SAS token from the Azure Portal under [Shared access signature](https://docs.microsoft.com/rest/api/storageservices/create-service-sas) or use one of the `generate_*_sas()`
     functions to create a sas token for the account or table:

  ```python
  from datetime import datetime, timedelta
  from azure.data.tables import TableServiceClient, generate_account_sas, ResourceTypes, AccountSasPermissions
  from azure.core.credentials import AzureNamedKeyCredential, AzureSasCredential

  credential = AzureNamedKeyCredential("my_account_name", "my_access_key")
  sas_token = generate_account_sas(
      credential,
      resource_types=ResourceTypes(service=True),
      permission=AccountSasPermissions(read=True),
      expiry=datetime.utcnow() + timedelta(hours=1),
  )

  table_service_client = TableServiceClient(endpoint="https://<my_account_name>.table.core.windows.net", credential=AzureSasCredential(sas_token))
  ```



  Common uses of the Table service included:
  * Storing TBs of structured data capable of serving web scale applications
  * Storing datasets that do not require complex joins, foreign keys, or stored procedures and can be de-normalized for fast access
  * Quickly querying data using a clustered index
  * Accessing data using the OData protocol and LINQ filter expressions

  [comment]: # ( cspell:ignore LINQ )

  The following components make up the Azure Tables Service:
  * The account
  * A table within the account, which contains a set of entities
  * An entity within a table, as a dictionary

  The Azure Tables client library for Python allows you to interact with each of these components through the
  use of a dedicated client object.


  Two different clients are provided to interact with the various components of the Table Service:
  1. **`TableServiceClient`** -
      * Get and set account setting
      * Query, create, and delete tables within the account.
      * Get a `TableClient` to access a specific table using the `get_table_client` method.
  2. **`TableClient`** -
      * Interacts with a specific table (which need not exist yet).
      * Create, delete, query, and upsert entities within the specified table.
      * Create or delete the specified table itself.


  Entities are similar to rows. An entity has a **`PartitionKey`**, a **`RowKey`**, and a set of properties. A property is a name value pair, similar to a column. Every entity in a table does not need to have the same properties. Entities can be represented as dictionaries like this as an example:
  ```python
  entity = {
      'PartitionKey': 'color',
      'RowKey': 'brand',
      'text': 'Marker',
      'color': 'Purple',
      'price': '5'
  }
  ```
  * **[create_entity][create_entity]** - Add an entity to the table.
  * **[delete_entity][delete_entity]** - Delete an entity from the table.
  * **[update_entity][update_entity]** - Update an entity's information by either merging or replacing the existing entity.
      * `UpdateMode.MERGE` will add new properties to an existing entity it will not delete an existing properties
      * `UpdateMode.REPLACE` will replace the existing entity with the given one, deleting any existing properties not included in the submitted entity
  * **[query_entities][query_entities]** - Query existing entities in a table using [OData filters][odata_syntax].
  * **[get_entity][get_entity]** - Get a specific entity from a table by partition and row key.
  * **[upsert_entity][upsert_entity]** - Merge or replace an entity in a table, or if the entity does not exist, inserts the entity.
      * `UpdateMode.MERGE` will add new properties to an existing entity it will not delete an existing properties
      * `UpdateMode.REPLACE` will replace the existing entity with the given one, deleting any existing properties not included in the submitted entity



  The following sections provide several code snippets covering some of the most common Table tasks, including:

  * [Creating a table](#creating-a-table "Creating a table")
  * [Creating entities](#creating-entities "Creating entities")
  * [Querying entities](#querying-entities "Querying entities")



  Create a table in your account and get a `TableClient` to perform operations on the newly created table:

  ```python
  from azure.data.tables import TableServiceClient
  table_service_client = TableServiceClient.from_connection_string(conn_str="<connection_string>")
  table_name = "myTable"
  table_client = table_service_client.create_table(table_name=table_name)
  ```


  Create entities in the table:

  ```python
  from azure.data.tables import TableServiceClient
  from datetime import datetime

  PRODUCT_ID = u'001234'
  PRODUCT_NAME = u'RedMarker'

  my_entity = {
      u'PartitionKey': PRODUCT_NAME,
      u'RowKey': PRODUCT_ID,
      u'Stock': 15,
      u'Price': 9.99,
      u'Comments': u"great product",
      u'OnSale': True,
      u'ReducedPrice': 7.99,
      u'PurchaseDate': datetime(1973, 10, 4),
      u'BinaryRepresentation': b'product_name'
  }

  table_service_client = TableServiceClient.from_connection_string(conn_str="<connection_string>")
  table_client = table_service_client.get_table_client(table_name="myTable")

  entity = table_client.create_entity(entity=my_entity)
  ```


  Querying entities in the table:

  ```python
  from azure.data.tables import TableClient
  my_filter = "PartitionKey eq 'RedMarker'"
  table_client = TableClient.from_connection_string(conn_str="<connection_string>", table_name="myTable")
  entities = table_client.query_entities(my_filter)
  for entity in entities:
      for key in entity.keys():
          print("Key: {}, Value: {}".format(key, entity[key]))
  ```


  Optional keyword arguments can be passed in at the client and per-operation level. The azure-core [reference documentation][azure_core_ref_docs] describes available configurations for retries, logging, transport protocols, and more.




  Use the following keyword arguments when instantiating a client to configure the retry policy:

  * __retry_total__ (int): Total number of retries to allow. Takes precedence over other counts.
  Pass in `retry_total=0` if you do not want to retry on requests. Defaults to 10.
  * __retry_connect__ (int): How many connection-related errors to retry on. Defaults to 3.
  * __retry_read__ (int): How many times to retry on read errors. Defaults to 3.
  * __retry_status__ (int): How many times to retry on bad status codes. Defaults to 3.
  * __retry_to_secondary__ (bool): Whether the request should be retried to secondary, if able.
  This should only be enabled of RA-GRS accounts are used and potentially stale data can be handled.
  Defaults to `False`.



  Other optional configuration keyword arguments that can be specified on the client or per-operation.

  **Client keyword arguments:**

  * __connection_timeout__ (int): Optionally sets the connect and read timeout value, in seconds.
  * __transport__ (Any): User-provided transport to send the HTTP request.

  **Per-operation keyword arguments:**

  * __raw_response_hook__ (callable): The given callback uses the response returned from the service.
  * __raw_request_hook__ (callable): The given callback uses the request before being sent to service.
  * __client_request_id__ (str): Optional user specified identification of the request.
  * __user_agent__ (str): Appends the custom value to the user-agent header to be sent with the request.
  * __logging_enable__ (bool): Enables logging at the DEBUG level. Defaults to False. Can also be passed in at
  the client level to enable it for all requests.
  * __headers__ (dict): Pass in custom headers as key, value pairs. E.g. `headers={'CustomValue': value}`





  Azure Tables clients raise exceptions defined in [Azure Core][azure_core_readme].
  When you interact with the Azure table library using the Python SDK, errors returned by the service respond ot the same HTTP status codes for [REST API][tables_rest] requests. The Table service operations will throw a `HttpResponseError` on failure with helpful [error codes][tables_error_codes].

  For examples, if you try to create a table that already exists, a `409` error is returned indicating "Conflict".
  ```python
  from azure.data.tables import TableServiceClient
  from azure.core.exceptions import HttpResponseError
  table_name = 'YourTableName'

  service_client = TableServiceClient.from_connection_string(connection_string)


  tc = service_client.create_table_if_not_exists(table_name)

  try:
      service_client.create_table(table_name)
  except HttpResponseError:
      print("Table with name {} already exists".format(table_name))
  ```


  This library uses the standard
  [logging][python_logging] library for logging.
  Basic information about HTTP sessions (URLs, headers, etc.) is logged at INFO
  level.

  Detailed DEBUG level logging, including request/response bodies and unredacted
  headers, can be enabled on a client with the `logging_enable` argument:
  ```python
  import sys
  import logging
  from azure.data.tables import TableServiceClient

  logger = logging.getLogger('azure')
  logger.setLevel(logging.DEBUG)


  handler = logging.StreamHandler(stream=sys.stdout)
  logger.addHandler(handler)


  service_client = TableServiceClient.from_connection_string("your_connection_string", logging_enable=True)
  ```

  Similarly, `logging_enable` can enable detailed logging for a single operation,
  even when it is not enabled for the client:
  ```python
  service_client.create_entity(entity=my_entity, logging_enable=True)
  ```



  Get started with our [Table samples][tables_samples].

  Several Azure Tables 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 Tables.


  These code samples show common scenario operations with the Azure Tables client library. The async versions of the samples (the python sample files appended with _async) show asynchronous operations.

  * Create and delete tables: [sample_create_delete_table.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/tables/azure-data-tables/samples/sample_create_delete_table.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/tables/azure-data-tables/samples/async_samples/sample_create_delete_table_async.py))
  * List and query tables: [sample_query_tables.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/tables/azure-data-tables/samples/sample_query_tables.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/tables/azure-data-tables/samples/async_samples/sample_query_tables_async.py))
  * Insert and delete entities: [sample_insert_delete_entities.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/tables/azure-data-tables/samples/sample_insert_delete_entities.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/tables/azure-data-tables/samples/async_samples/sample_insert_delete_entities_async.py))
  * Query and list entities: [sample_query_table.py](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/tables/azure-data-tables/samples/sample_query_table.py) ([async version](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/tables/azure-data-tables/samples/async_samples/sample_query_table_async.py))
  * Update, upsert, and merge entities: [sample_update_upsert_merge_entities.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/tables/azure-data-tables/samples/sample_update_upsert_merge_entities.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/tables/azure-data-tables/samples/async_samples/sample_update_upsert_merge_entities_async.py))
  * Committing many requests in a single transaction: [sample_batching.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/tables/azure-data-tables/samples/sample_batching.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/tables/azure-data-tables/samples/async_samples/sample_batching_async.py))


  For more extensive documentation on Azure Tables, see the [Azure Tables documentation][Tables_product_doc] on docs.microsoft.com.


  A list of currently known issues relating to Cosmos DB table endpoints can be found [here](https://aka.ms/tablesknownissues).


  This 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.

  When 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.

  This project has adopted the [Microsoft Open Source Code of Conduct][msft_oss_coc]. For more information see the [Code of Conduct FAQ][msft_oss_coc_faq] or contact [opencode@microsoft.com][contact_msft_oss] with any additional questions or comments.

  <!-- LINKS -->
  [source_code]:https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/tables/azure-data-tables
  [Tables_pypi]:https://aka.ms/azsdk/python/tablespypi
  [Tables_ref_docs]:https://docs.microsoft.com/python/api/overview/azure/data-tables-readme?view=azure-python
  [Tables_product_doc]:https://docs.microsoft.com/azure/cosmos-db/table-introduction
  [Tables_samples]:https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/tables/azure-data-tables/samples
  [migration_guide]:https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/tables/azure-data-tables/migration_guide.md

  [azure_subscription]:https://azure.microsoft.com/free/
  [azure_storage_account]:https://docs.microsoft.com/azure/storage/common/storage-account-create?tabs=azure-portal
  [azure_cosmos_account]:https://docs.microsoft.com/azure/cosmos-db/create-cosmosdb-resources-portal
  [pip_link]:https://pypi.org/project/pip/

  [azure_create_cosmos]:https://docs.microsoft.com/azure/cosmos-db/create-cosmosdb-resources-portal
  [azure_cli_create_cosmos]:https://docs.microsoft.com/azure/cosmos-db/scripts/cli/table/create
  [azure_portal_create_cosmos]:https://docs.microsoft.com/azure/cosmos-db/create-cosmosdb-resources-portal
  [azure_portal_create_account]:https://docs.microsoft.com/azure/storage/common/storage-account-create?tabs=azure-portal
  [azure_powershell_create_account]:https://docs.microsoft.com/azure/storage/common/storage-account-create?tabs=azure-powershell
  [azure_cli_create_account]: https://docs.microsoft.com/azure/storage/common/storage-account-create?tabs=azure-cli

  [azure_cli_account_url]:https://docs.microsoft.com/cli/azure/storage/account?view=azure-cli-latest#az-storage-account-show
  [azure_powershell_account_url]:https://docs.microsoft.com/powershell/module/az.storage/get-azstorageaccount?view=azps-4.6.1
  [azure_portal_account_url]:https://docs.microsoft.com/azure/storage/common/storage-account-overview#storage-account-endpoints

  [azure_sas_token]:https://docs.microsoft.com/azure/storage/common/storage-sas-overview
  [azure_shared_key]:https://docs.microsoft.com/rest/api/storageservices/authorize-with-shared-key

  [odata_syntax]:https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/tables/azure-data-tables/samples/README.md#writing-filters

  [azure_core_ref_docs]: https://azuresdkdocs.blob.core.windows.net/$web/python/azure-core/latest/azure.core.html
  [azure_core_readme]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/README.md

  [python_logging]: https://docs.python.org/3/library/logging.html
  [tables_error_codes]: https://docs.microsoft.com/rest/api/storageservices/table-service-error-codes

  [msft_oss_coc]:https://opensource.microsoft.com/codeofconduct/
  [msft_oss_coc_faq]:https://opensource.microsoft.com/codeofconduct/faq/
  [contact_msft_oss]:mailto:opencode@microsoft.com

  [tables_rest]: https://docs.microsoft.com/rest/api/storageservices/table-service-rest-api

  [create_entity]:https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/tables/azure-data-tables/samples/sample_insert_delete_entities.py#L67-L73
  [delete_entity]:https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/tables/azure-data-tables/samples/sample_insert_delete_entities.py#L89-L92
  [update_entity]:https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/tables/azure-data-tables/samples/sample_update_upsert_merge_entities.py#L165-L181
  [query_entities]:https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/tables/azure-data-tables/samples/sample_query_table.py#L75-L89
  [get_entity]:https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/tables/azure-data-tables/samples/sample_update_upsert_merge_entities.py#L67-L71
  [upsert_entity]:https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/tables/azure-data-tables/samples/sample_update_upsert_merge_entities.py#L155-L163

  ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python/sdk/tables/azure-data-tables/README.png)







  * Fixed a bug when deleting an entity with partition key or row key in empty string.([#24480](https://github.com/Azure/azure-sdk-for-python/issues/24480))


  * Added support for Python 3.11.
  * Dropped `msrest` requirement.
  * Added dependency `isodate` with version range `>=0.6.0`(`isodate` was required by `msrest`).
  * Added dependency `typing-extensions` with version range `>=4.3.0`.




  * Fix handling of client-side exceptions that get raised during service requests (such as [#21416](https://github.com/Azure/azure-sdk-for-python/issues/21416)) ([#24788](https://github.com/Azure/azure-sdk-for-python/pull/24788))


  * Python 3.6 is no longer supported. Please use Python version 3.7 or later.
  * Bumped minimum dependency on `azure-core` to `>=1.24.0`.
  * Bumped minimum dependency on `msrest` to `>=0.7.1`.
  * Added dependency `yarl` with version range `<2.0,>=1.0`.




  * Support for multitenant authentication ([#24278](https://github.com/Azure/azure-sdk-for-python/pull/24278))


  * Fixed bug where odmtype tag was not being included for boolean and int32 types even when a full EdmProperty tuple was passed in. This is needed for CLI compatibility.

  [comment]: # ( cspell:ignore odmtype )




  * Validation of the table name has been removed from the constructor of the TableClient. Instead individual APIs will validate the table name and raise a ValueError only if the service rejects the request due to the table name not being valid (#23106)
  * Fixed hard-coded URL scheme in batch requests (#21953)
  * Improved documentation for query formatting in `query_entities` APIs (#23235)
  * Removed unsecure debug logging


  * Python 2.7 is no longer supported. Please use Python version 3.6 or later.
  * Bumped dependency on `azure-core` to `>=1.15.0`


  **Warning** This release involves a bug fix that may change the behaviour for some users. Partition and Row keys that contain a single quote character (`'`) will now be automatically escaped for upsert, update and delete entity operations. Partition and Row keys that were already escaped, or contained duplicate single quote char (`''`) will now be treated as unescaped values.



  * Resolved bug where strings couldn't be used instead of enum value for entity Update Mode (#20247).
  * Resolved bug where single quote characters in Partition and Row keys were not escaped correctly (#20301).


  * Added support for async iterators in `aio.TableClient.submit_transaction (#21083, thank you yashbhutoria).

  [comment]: # ( cspell:ignore yashbhutoria )


  * Bumped dependency on `msrest` to `>=0.6.21`




  * Storage Accounts only: `TableClient` and `TableServiceClient`s can now use `azure-identity` credentials for authentication. Note: A `TableClient` authenticated with a `TokenCredential` cannot use the `get_table_access_policy` or `set_table_access_policy` methods.


  **Breaking**
  * EdmType.Binary data in entities will now be deserialized as `bytes` in Python 3 and `str` in Python 2, rather than an `EdmProperty` instance. Likewise on serialization, `bytes` in Python 3 and `str` in Python 2 will be interpreted as binary (this is unchanged for Python 3, but breaking for Python 2, where `str` was previously serialized as EdmType.String)
  * `TableClient.create_table` now returns an instance of `TableItem`.
  * All optional parameters for model constructors are now keyword-only.
  * Storage service configuration models have now been prefixed with `Table`, including
    `TableAccessPolicy`, `TableMetrics`, `TableRetentionPolicy`, `TableCorsRule`
  * All parameters for `TableServiceClient.set_service_properties` are now keyword-only.
  * The `credential` parameter for all Clients is now keyword-only.
  * The method `TableClient.get_access_policy` will now return `None` where previously it returned an "empty" access policy object.
  * Timestamp properties on `TableAccessPolicy` instances returned from `TableClient.get_access_policy` will now be deserialized to `datetime` instances.

  **Fixes**
  * Fixed support for Cosmos emulator endpoint, via URL/credential or connection string.
  * Fixed table name from URL parsing in `TableClient.from_table_url` classmethod.
  * The `account_name` attribute on clients will now be pulled from an `AzureNamedKeyCredential` if used.
  * Any additional odata metadata is returned in entity's metadata.
  * The timestamp in entity metadata is now deserialized to a timestamp.
  * If the `prefer` header is added in the `create_entity` operation, the echo will be returned.
  * Errors raised on a 412 if-not-match error will now be a specific `azure.core.exceptions.ResourceModifiedError`.
  * `EdmType.DOUBLE` values are now explicitly typed in the request payload.
  * Fixed de/serialization of list attributes on `TableCorsRule`.


  **Breaking**
  * The `account_url` parameter in the client constructors has been renamed to `endpoint`.
  * The `TableEntity` object now acts exclusively like a dictionary, and no longer supports key access via attributes.
  * Metadata of an entity is now accessed via `TableEntity.metadata` attribute rather than a method.
  * Removed explicit `LinearRetry` and `ExponentialRetry` in favor of keyword parameter.
  * Renamed `filter` parameter in query APIs to `query_filter`.
  * The `location_mode` attribute on clients is now read-only. This has been added as a keyword parameter to the constructor.
  * The `TableItem.table_name` has been renamed to `TableItem.name`.
  * Removed the `TableClient.create_batch` method along with the `TableBatchOperations` object. The transactional batching is now supported via a simple Python list of tuples.
  * `TableClient.send_batch` has been renamed to `TableClient.submit_transaction`.
  * Removed `BatchTransactionResult` object in favor of returning an iterable of batched entities with returned metadata.
  * Removed Batching context-manager behavior
  * `EntityProperty` is now a NampedTuple, and can be represented by a tuple of `(entity, EdmType)`.
  * Renamed `EntityProperty.type` to `EntityProperty.edm_type`.
  * `BatchErrorException` has been renamed to `TableTransactionError`.
  * The `location_mode` is no longer a public attribute on the Clients.
  * The only supported credentials are `AzureNamedKeyCredential`, `AzureSasCredential`, or authentication by connection string
  * Removed `date` and `api_version` from the `TableItem` class.

  **Fixes**
  * Fixed issue with Cosmos merge operations.
  * Removed legacy Storage policies from pipeline.
  * Removed unused legacy client-side encryption attributes from client classes.
  * Fixed sharing of pipeline between service/table clients.
  * Added support for Azurite storage emulator
  * Throws a `RequestTooLargeError` on transaction requests that return a 413 error code
  * Added support for Int64 and Binary types in query filters
  * Added support for `select` keyword parameter to `TableClient.get_entity()`.
  * On `update_entity` and `delete_entity` if no `etag` is supplied via kwargs, the `etag` in the entity will be used if it is in the entity.


  * Updated deserialization of datetime fields in entities to support preservation of the service format with additional decimal place.
  * Passing a string parameter into a query filter will now be escaped to protect against injection.
  * Fixed bug in incrementing retries in async retry policy


  * This version and all future versions will require Python 2.7 or Python 3.6+, Python 3.5 is no longer supported.
  * Adds SAS credential as an authentication option
  * Bumps minimum requirement of `azure-core` to 1.10.0
  * Bumped minimum requirement of msrest from `0.6.10` to `0.6.19`.
  * Adds support for datetime entities with milliseconds
  * Adds support for Shared Access Signature authentication


  * Fixes an [issue](https://github.com/Azure/azure-sdk-for-python/issues/15554) where `query_entities` kwarg `parameters` would not work with multiple parameters or with non-string parameters. This now works with multiple parameters and numeric, string, boolean, UUID, and datetime objects.
  * Fixes an [issue](https://github.com/Azure/azure-sdk-for-python/issues/15653) where `delete_entity` will return a `ClientAuthenticationError` when the '@' symbol is included in the entity.


  * Add support for transactional batching of entity operations.
  * Fixed deserialization bug in `list_tables` and `query_tables` where `TableItem.table_name` was an object instead of a string.
  * Fixed issue where unrecognized entity data fields were silently ignored. They will now raise a `TypeError`.
  * Fixed issue where query filter parameters were being ignored (#15094)


  * Adds support for Enumerable types by converting the Enum to a string before sending to the service


  This is the first beta of the `azure-data-tables` client library. The Azure Tables client library can seamlessly target either Azure Table storage or Azure Cosmos DB table service endpoints with no code changes.


pkgId: 751d568200004063df746e6f32fe9ade9722d8f9d381b89e110a423d3cbb3ac9
name: python-azure-devtools
arch: src
version: 1.2.0
epoch: 0
release: 1
summary: Microsoft Azure Development Tools for SDK
url: https://github.com/Azure/azure-python-devtools
rpm_license: MIT
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-f9e88c80-172e-4437-932c-2a011005de0f
location_href: 00013591-python-azure-devtools/python-azure-devtools-1.2.0-1.src.rpm
checksum_type: sha256
description:
  This package contains tools to aid in developing Python-based Azure code.
  This includes the following components:


pkgId: 70366fd73c1ce1cf0e9e2d180389da34c317f37d806f8854982189c93b7f6ff3
name: python-azure-eventgrid
arch: src
version: 4.9.1
epoch: 0
release: 1
summary: Microsoft Azure Event Grid Client Library for Python
url: https://github.com/Azure/azure-sdk-for-python
rpm_license: MIT License
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-29120b38-4df3-4d3e-beca-87c27fe7edc2
location_href: 00009271-python-azure-eventgrid/python-azure-eventgrid-4.9.1-1.src.rpm
checksum_type: sha256
description:
  Azure Event Grid is a fully-managed intelligent event routing service that allows for uniform event consumption using a publish-subscribe model.

  [Source code][python-eg-src] | [Package (PyPI)][python-eg-pypi] | [API reference documentation][python-eg-ref-docs] | [Product documentation][python-eg-product-docs] | [Samples][python-eg-samples] | [Changelog][python-eg-changelog]



  _Azure SDK Python packages support for Python 2.7 has ended on 01 January 2022. For more information and questions, please refer to https://github.com/Azure/azure-sdk-for-python/issues/20691_




  * Python 3.7 or later is required to use this package.
  * You must have an [Azure subscription][azure_subscription] and an Event Grid Topic resource to use this package. Follow this [step-by-step tutorial](https://docs.microsoft.com/azure/event-grid/custom-event-quickstart-portal) to register the Event Grid resource provider and create Event Grid topics using the [Azure portal](https://portal.azure.com/). There is a [similar tutorial](https://docs.microsoft.com/azure/event-grid/custom-event-quickstart) using [Azure CLI](https://docs.microsoft.com/cli/azure).



  Install the Azure Event Grid client library for Python with [pip][pip]:

  ```bash
  pip install azure-eventgrid
  ```

  * An existing Event Grid topic or domain is required. You can create the resource using [Azure Portal][azure_portal_create_EG_resource] or [Azure CLI][azure_cli_link]

  If you use Azure CLI, replace `<resource-group-name>` and `<resource-name>` with your own unique names.



  ```
  az eventgrid topic --create --location <location> --resource-group <resource-group-name> --name <resource-name>
  ```



  ```
  az eventgrid domain --create --location <location> --resource-group <resource-group-name> --name <resource-name>
  ```


  In order to interact with the Event Grid service, you will need to create an instance of a client.
  An **endpoint** and **credential** are necessary to instantiate the client object.



  Azure Event Grid provides integration with Azure Active Directory (Azure AD) for identity-based authentication of requests. With Azure AD, you can use role-based access control (RBAC) to grant access to your Azure Event Grid resources to users, groups, or applications.

  To send events to a topic or domain with a `TokenCredential`, the authenticated identity should have the "EventGrid Data Sender" role assigned.

  With the `azure-identity` package, you can seamlessly authorize requests in both development and production environments. To learn more about Azure Active Directory, see the [`azure-identity` README](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/identity/azure-identity/README.md).

  For example, you can use `DefaultAzureCredential` to construct a client which will authenticate using Azure Active Directory:

  ```Python
  from azure.identity import DefaultAzureCredential
  from azure.eventgrid import EventGridPublisherClient, EventGridEvent

  event = EventGridEvent(
      data={"team": "azure-sdk"},
      subject="Door1",
      event_type="Azure.Sdk.Demo",
      data_version="2.0"
  )

  credential = DefaultAzureCredential()
  endpoint = os.environ["EG_TOPIC_HOSTNAME"]
  client = EventGridPublisherClient(endpoint, credential)

  client.send(event)
  ```


  You can find the topic endpoint within the Event Grid Topic resource on the Azure portal. This will look like:
  `"https://<event-grid-topic-name>.<topic-location>.eventgrid.azure.net/api/events"`



  To use an Access key as the `credential` parameter,
  pass the key as a string into an instance of [AzureKeyCredential][azure-key-credential].

  > **Note:** The Access Key may be found in the azure portal in the "Access Keys" menu of the Event Grid Topic resource.  They may also be obtained via the azure CLI, or the `azure-mgmt-eventgrid` library. A guide for getting access keys can be found [here](https://docs.microsoft.com/azure/event-grid/get-access-keys).

  ```python
  from azure.core.credentials import AzureKeyCredential
  from azure.eventgrid import EventGridPublisherClient

  endpoint = "https://<name>.<region>.eventgrid.azure.net/api/events"
  credential = AzureKeyCredential("<access_key>")
  eg_publisher_client = EventGridPublisherClient(endpoint, credential)
  ```
  > **Note:** A client may also be authenticated via SAS signature, using the `AzureSasCredential`. A sample demonstrating this, is available [here][python-eg-sample-send-using-sas] ([async_version][python-eg-sample-send-using-sas-async]).

  > **Note:** The `generate_sas` method can be used to generate a shared access signature. A sample demonstrating this can be seen [here][python-eg-generate-sas].




  A **[topic](https://docs.microsoft.com/azure/event-grid/concepts#topics)** is a channel within the EventGrid service to send events. The event schema that a topic accepts is decided at topic creation time. If events of a schema type are sent to a topic that requires a different schema type, errors will be raised.


  An event **[domain](https://docs.microsoft.com/azure/event-grid/event-domains)** is a management tool for large numbers of Event Grid topics related to the same application. They allow you to publish events to thousands of topics. Domains also give you authorization and authentication control over each topic. For more information, visit [Event domain overview](https://docs.microsoft.com/azure/event-grid/event-domains).

  When you create an event domain, a publishing endpoint for this domain is made available to you. This process is similar to creating an Event Grid Topic. The only difference is that, when publishing to a domain, you must specify the topic within the domain that you'd like the event to be delivered to.


  An **[event](https://docs.microsoft.com/azure/event-grid/concepts#events)** is the smallest amount of information that fully describes something that happened in the system. When a custom topic or domain is created, you must specify the schema that will be used when publishing events.

  Event Grid supports multiple schemas for encoding events.


  While you may configure your topic to use a [custom schema](https://docs.microsoft.com/azure/event-grid/input-mappings), it is more common to use the already-defined Event Grid schema. See the specifications and requirements [here](https://docs.microsoft.com/azure/event-grid/event-schema).


  Another option is to use the CloudEvents v1.0 schema. [CloudEvents](https://cloudevents.io/) is a Cloud Native Computing Foundation project which produces a specification for describing event data in a common way. The service summary of CloudEvents can be found [here](https://docs.microsoft.com/azure/event-grid/cloud-event-schema).


  `EventGridPublisherClient` provides operations to send event data to a topic hostname specified during client initialization.

  Regardless of the schema that your topic or domain is configured to use, `EventGridPublisherClient` will be used to publish events to it. Use the `send` method publishing events.

  The following formats of events are allowed to be sent:
  - A list or a single instance of strongly typed EventGridEvents.
  - A dict representation of a serialized EventGridEvent object.
  - A list or a single instance of strongly typed CloudEvents.
  - A dict representation of a serialized CloudEvent object.

  - A dict representation of any Custom Schema.

  Please have a look at the [samples](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/eventgrid/azure-eventgrid/samples) for detailed examples.


   **Note:** It is important to know if your topic supports CloudEvents or EventGridEvents before publishing. If you send to a topic that does not support the schema of the event you are sending, send() will throw an exception.


  A **[system topic](https://docs.microsoft.com/azure/event-grid/system-topics)** in Event Grid represents one or more events published by Azure services such as Azure Storage or Azure Event Hubs. For example, a system topic may represent all blob events or only blob creation and blob deletion events published for a specific storage account.

  The names of the various event types for the system events published to Azure Event Grid are available in `azure.eventgrid.SystemEventNames`.
  For complete list of recognizable system topics, visit [System Topics](https://docs.microsoft.com/azure/event-grid/system-topics).

   For more information about the key concepts on Event Grid, see [Concepts in Azure Event Grid][publisher-service-doc].



  Event Grid on Kubernetes with Azure Arc is an offering that allows you to run Event Grid on your own Kubernetes cluster. This capability is enabled by the use of Azure Arc enabled Kubernetes. Through Azure Arc enabled Kubernetes, a supported Kubernetes cluster connects to Azure. Once connected, you are able to install Event Grid on it. Learn more about it [here](https://docs.microsoft.com/azure/event-grid/kubernetes/overview).



  Starting with v4.7.0, this package also supports publishing a CNCF cloud event from https://pypi.org/project/cloudevents/. You would be able to pass a CloudEvent object from this library to the `send` API.

  ```python

  from cloudevents.http import CloudEvent

  event = CloudEvent(...)

  client.send(event)
  ```



  The following sections provide several code snippets covering some of the most common Event Grid tasks, including:

  * [Send an Event Grid Event](#send-an-event-grid-event)
  * [Send a Cloud Event](#send-a-cloud-event)
  * [Send Multiple Events](#send-multiple-events)
  * [Send events as Dictionaries](#send-events-as-dictionaries)
  * [Consume a payload from storage queue](#consume-from-storage-queue)
  * [Consume from ServiceBus](#consume-from-servicebus)



  This example publishes an Event Grid event.

  ```Python
  import os
  from azure.core.credentials import AzureKeyCredential
  from azure.eventgrid import EventGridPublisherClient, EventGridEvent

  key = os.environ["EG_ACCESS_KEY"]
  endpoint = os.environ["EG_TOPIC_HOSTNAME"]

  event = EventGridEvent(
      data={"team": "azure-sdk"},
      subject="Door1",
      event_type="Azure.Sdk.Demo",
      data_version="2.0"
  )

  credential = AzureKeyCredential(key)
  client = EventGridPublisherClient(endpoint, credential)

  client.send(event)
  ```



  This example publishes a Cloud event.

  ```Python
  import os
  from azure.core.credentials import AzureKeyCredential
  from azure.core.messaging import CloudEvent
  from azure.eventgrid import EventGridPublisherClient

  key = os.environ["CLOUD_ACCESS_KEY"]
  endpoint = os.environ["CLOUD_TOPIC_HOSTNAME"]

  event = CloudEvent(
      type="Azure.Sdk.Sample",
      source="https://egsample.dev/sampleevent",
      data={"team": "azure-sdk"}
  )

  credential = AzureKeyCredential(key)
  client = EventGridPublisherClient(endpoint, credential)

  client.send(event)
  ```



  It is possible to send events as a batch when sending multiple events to a topic or a domain. This example sends a list of CloudEvents using the send method.

  **WARNING:** When sending a list of multiple events at one time, iterating over and sending each event will not result in optimal performance. For best performance, it is highly recommended to send a list of events.

  ```Python
  import os
  from azure.core.credentials import AzureKeyCredential
  from azure.core.messaging import CloudEvent
  from azure.eventgrid import EventGridPublisherClient

  key = os.environ["CLOUD_ACCESS_KEY"]
  endpoint = os.environ["CLOUD_TOPIC_HOSTNAME"]

  event0 = CloudEvent(
      type="Azure.Sdk.Sample",
      source="https://egsample.dev/sampleevent",
      data={"team": "azure-sdk"}
  )
  event1 = CloudEvent(
      type="Azure.Sdk.Sample",
      source="https://egsample.dev/sampleevent",
      data={"team2": "azure-eventgrid"}
  )

  events = [event0, event1]

  credential = AzureKeyCredential(key)
  client = EventGridPublisherClient(endpoint, credential)

  client.send(events)
  ```



  A dict representation of respective serialized models can also be used to publish CloudEvent(s) or EventGridEvent(s) apart from the strongly typed objects.

  Use a dict-like representation to send to a topic with custom schema as shown below.

  ```Python
  import os
  import uuid
  import datetime as dt
  from msrest.serialization import UTC
  from azure.core.credentials import AzureKeyCredential
  from azure.eventgrid import EventGridPublisherClient

  key = os.environ["CUSTOM_SCHEMA_ACCESS_KEY"]
  endpoint = os.environ["CUSTOM_SCHEMA_TOPIC_HOSTNAME"]

  event = custom_schema_event = {
      "customSubject": "sample",
      "customEventType": "sample.event",
      "customDataVersion": "2.0",
      "customId": uuid.uuid4(),
      "customEventTime": dt.datetime.now(UTC()).isoformat(),
      "customData": "sample data"
      }

  credential = AzureKeyCredential(key)
  client = EventGridPublisherClient(endpoint, credential)

  client.send(event)
  ```



  This example consumes a message received from storage queue and deserializes it to a CloudEvent object.

  ```Python
  from azure.core.messaging import CloudEvent
  from azure.storage.queue import QueueServiceClient, BinaryBase64DecodePolicy
  import os
  import json


  connection_str = os.environ['STORAGE_QUEUE_CONN_STR']
  queue_name = os.environ['STORAGE_QUEUE_NAME']

  with QueueServiceClient.from_connection_string(connection_str) as qsc:
      payload =  qsc.get_queue_client(
          queue=queue_name,
          message_decode_policy=BinaryBase64DecodePolicy()
          ).peek_messages()

      
      events = [CloudEvent.from_dict(json.loads(msg.content)) for msg in payload]
  ```



  This example consumes a payload message received from ServiceBus and deserializes it to an EventGridEvent object.

  ```Python
  from azure.eventgrid import EventGridEvent
  from azure.servicebus import ServiceBusClient
  import os
  import json


  connection_str = os.environ['SERVICE_BUS_CONN_STR']
  queue_name = os.environ['SERVICE_BUS_QUEUE_NAME']

  with ServiceBusClient.from_connection_string(connection_str) as sb_client:
      payload =  sb_client.get_queue_receiver(queue_name).receive_messages()

      
      events = [EventGridEvent.from_dict(json.loads(next(msg.body).decode('utf-8'))) for msg in payload]
  ```



  You can use OpenTelemetry for Python as usual with EventGrid since it's compatible with azure-core tracing integration.

  Here is an example of using OpenTelemetry to trace sending a CloudEvent.

  First, set OpenTelemetry as enabled tracing plugin for EventGrid.

  ```python
  from azure.core.settings import settings
  from azure.core.tracing.ext.opentelemetry_span import OpenTelemetrySpan

  settings.tracing_implementation = OpenTelemetrySpan
  ```

  Regular open telemetry usage from here. See [OpenTelemetry](https://github.com/open-telemetry/opentelemetry-python) for details.
  This example uses a simple console exporter to export the traces. Any exporter can be used here including `azure-monitor-opentelemetry-exporter`, `jaeger`, `zipkin` etc.

  ```python
  from opentelemetry import trace
  from opentelemetry.sdk.trace import TracerProvider
  from opentelemetry.sdk.trace.export import ConsoleSpanExporter
  from opentelemetry.sdk.trace.export import SimpleSpanProcessor  # this requires opentelemetry >= 1.0.0


  exporter = ConsoleSpanExporter()

  trace.set_tracer_provider(TracerProvider())
  tracer = trace.get_tracer(__name__)
  trace.get_tracer_provider().add_span_processor(
      SimpleSpanProcessor(exporter)
  )
  ```

  Once the `tracer` and `exporter` are set, please follow the example below to start collecting traces while using the `send` method from the `EventGridPublisherClient` to send a CloudEvent object.

  ```python
  import os
  from azure.eventgrid import EventGridPublisherClient
  from azure.core.messaging import CloudEvent
  from azure.core.credentials import AzureKeyCredential

  hostname = os.environ['CLOUD_TOPIC_HOSTNAME']
  key = AzureKeyCredential(os.environ['CLOUD_ACCESS_KEY'])
  cloud_event = CloudEvent(
      source = 'demo',
      type = 'sdk.demo',
      data = {'test': 'hello'},
  )
  with tracer.start_as_current_span(name="MyApplication"):
      client = EventGridPublisherClient(hostname, key)
      client.send(cloud_event)
  ```



  - Enable `azure.eventgrid` logger to collect traces from the library.


  Event Grid client library will raise exceptions defined in [Azure Core][azure_core_exceptions].


  This library uses the standard
  [logging][python_logging] library for logging.
  Basic information about HTTP sessions (URLs, headers, etc.) is logged at INFO
  level.



  Optional keyword arguments can be passed in at the client and per-operation level.
  The azure-core [reference documentation][azure_core_ref_docs]
  describes available configurations for retries, logging, transport protocols, and more.



  The following section provides several code snippets illustrating common patterns used in the Event Grid Python API.



  These code samples show common champion scenario operations with the Azure Event Grid client library.

  * Generate Shared Access Signature: [sample_generate_sas.py][python-eg-generate-sas]

  * Authenticate the client: [sample_authentication.py][python-eg-auth] ([async_version][python-eg-auth-async])

  * Publish events to a topic using SAS: [sample_publish_events_to_a_topic_using_sas_credential_async.py][python-eg-sample-send-using-sas] ([async_version][python-eg-sample-send-using-sas-async])
  * Publish Event Grid Events to a topic: [sample_publish_eg_events_to_a_topic.py][python-eg-sample-eg-event] ([async_version][python-eg-sample-eg-event-async])
  * Publish EventGrid Events to a domain topic: [sample_publish_eg_events_to_a_domain_topic.py][python-eg-sample-eg-event-to-domain] ([async_version][python-eg-sample-eg-event-to-domain-async])
  * Publish a Cloud Event: [sample_publish_events_using_cloud_events_1.0_schema.py][python-eg-sample-send-cloudevent] ([async_version][python-eg-sample-send-cloudevent-async])
  * Publish a Custom Schema: [sample_publish_custom_schema_to_a_topic.py][python-eg-publish-custom-schema] ([async_version][python-eg-publish-custom-schema-async])

  The following samples cover publishing and consuming `dict` representations of EventGridEvents and CloudEvents.
  * Publish EventGridEvent as dict like representation: [sample_publish_eg_event_using_dict.py][python-eg-sample-send-eg-as-dict] ([async_version][python-eg-sample-send-eg-as-dict-async])

  * Publish CloudEvent as dict like representation: [sample_publish_cloud_event_using_dict.py][python-eg-sample-send-cloudevent-as-dict] ([async_version][python-eg-sample-send-cloudevent-as-dict-async])

  * Consume a Custom Payload of raw cloudevent data: [sample_consume_custom_payload.py][python-eg-sample-consume-custom-payload]

  More samples can be found [here][python-eg-samples].

  * More samples related to the send scenario can be seen [here][python-eg-publish-samples].
  * To see more samples related to consuming a payload from different messaging services as a typed object, please visit [Consume Samples][python-eg-consume-samples]



  For more extensive documentation on Azure Event Grid, see the [Event Grid documentation][python-eg-product-docs] on docs.microsoft.com.


  This 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 [cla.microsoft.com][cla].

  When 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.

  This project has adopted the [Microsoft Open Source Code of Conduct][code_of_conduct]. For more information see the [Code of Conduct FAQ][coc_faq] or contact [opencode@microsoft.com][coc_contact] with any additional questions or comments.

  <!-- LINKS -->

  [azure_cli_link]: https://pypi.org/project/azure-cli/
  [python-eg-src]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventgrid/azure-eventgrid/
  [python-eg-pypi]: https://pypi.org/project/azure-eventgrid
  [python-eg-product-docs]: https://docs.microsoft.com/azure/event-grid/overview
  [python-eg-ref-docs]: https://azuresdkdocs.blob.core.windows.net/$web/python/azure-eventgrid/latest/index.html
  [publisher-service-doc]: https://docs.microsoft.com/azure/event-grid/concepts
  [python-eg-samples]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/eventgrid/azure-eventgrid/samples
  [python-eg-changelog]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/eventgrid/azure-eventgrid/CHANGELOG.md
  [pip]: https://pypi.org/project/pip/

  [azure_portal_create_EG_resource]: https://ms.portal.azure.com/#blade/HubsExtension/BrowseResource/resourceType/Microsoft.EventGrid%2Ftopics
  [azure-key-credential]: https://aka.ms/azsdk/python/core/azurekeycredential
  [azure_core_exceptions]: https://aka.ms/azsdk/python/core/docs#module-azure.core.exceptions
  [python_logging]: https://docs.python.org/3/library/logging.html
  [azure_core_ref_docs]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/core/azure-core#configurations
  [azure_subscription]: https://azure.microsoft.com/free/

  [python-eg-auth]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventgrid/azure-eventgrid/samples/sync_samples/sample_authentication.py
  [python-eg-generate-sas]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventgrid/azure-eventgrid/samples/sync_samples/sample_generate_sas.py
  [python-eg-sample-send-using-sas]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventgrid/azure-eventgrid/samples/sync_samples/sample_publish_events_to_a_topic_using_sas_credential.py
  [python-eg-sample-eg-event]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventgrid/azure-eventgrid/samples/sync_samples/sample_publish_eg_events_to_a_topic.py
  [python-eg-sample-eg-event-to-domain]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventgrid/azure-eventgrid/samples/sync_samples/sample_publish_eg_events_to_a_domain.py
  [python-eg-sample-send-cloudevent]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventgrid/azure-eventgrid/samples/sync_samples/sample_publish_events_using_cloud_events_1.0_schema.py
  [python-eg-publish-custom-schema]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventgrid/azure-eventgrid/samples/sync_samples/sample_publish_custom_schema_to_a_topic.py
  [python-eg-sample-send-eg-as-dict]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventgrid/azure-eventgrid/samples/sync_samples/sample_publish_eg_event_using_dict.py
  [python-eg-sample-send-cloudevent-as-dict]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventgrid/azure-eventgrid/samples/sync_samples/sample_publish_cloud_event_using_dict.py

  [python-eg-auth-async]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventgrid/azure-eventgrid/samples/async_samples/sample_authentication_async.py
  [python-eg-sample-send-using-sas-async]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventgrid/azure-eventgrid/samples/async_samples/sample_publish_events_to_a_topic_using_sas_credential_async.py
  [python-eg-sample-eg-event-async]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventgrid/azure-eventgrid/samples/async_samples/sample_publish_eg_events_to_a_topic_async.py
  [python-eg-sample-eg-event-to-domain-async]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventgrid/azure-eventgrid/samples/async_samples/sample_publish_eg_events_to_a_domain_async.py
  [python-eg-sample-send-cloudevent-async]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventgrid/azure-eventgrid/samples/async_samples/sample_publish_events_using_cloud_events_1.0_schema_async.py
  [python-eg-publish-custom-schema-async]:https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventgrid/azure-eventgrid/samples/async_samples/sample_publish_custom_schema_to_a_topic_async.py
  [python-eg-sample-send-eg-as-dict-async]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventgrid/azure-eventgrid/samples/async_samples/sample_publish_eg_event_using_dict_async.py
  [python-eg-sample-send-cloudevent-as-dict-async]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventgrid/azure-eventgrid/samples/async_samples/sample_publish_cloud_event_using_dict_async.py

  [python-eg-publish-samples]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventgrid/azure-eventgrid/samples/publish_samples
  [python-eg-consume-samples]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventgrid/azure-eventgrid/samples/consume_samples
  [python-eg-sample-consume-custom-payload]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventgrid/azure-eventgrid/samples/sync_samples/sample_consume_custom_payload.py

  [cla]: https://cla.microsoft.com
  [code_of_conduct]: https://opensource.microsoft.com/codeofconduct/
  [coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
  [coc_contact]: mailto:opencode@microsoft.com






  - This version and all future versions will require Python 3.7+.



  - Added new enum values to `SystemEventNames` related to health care APIs.





  - Added support for publishing events to a channel.





  - Added support for publishing events to a channel.



  - This version and all future versions will require Python 3.6+. Python 2.7 is no longer supported.



  - Added new enum values to `SystemEventNames` related to health care APIs.





  - The `send` API will raise on exceptions.





  - Added support for publishing native CNCF cloudevents (https://pypi.org/project/cloudevents/).





  - Added new enum values to `SystemEvents`.





  - Added a new enum value `Microsoft.ContainerService.NewKubernetesVersionAvailable` to `SystemEvents`.
  - Added a `from_json` method which now accepts storage QueueMessage, eventhub's EventData or ServiceBusMessage or simply json bytes to return an `EventGridEvent`



  - Bumped `msrest` dependency to `0.6.21` to align with mgmt package.



  - `EventGridPublisherClient` now supports Azure Active Directory (AAD) for authentication.



    **New Features**
    - Added new event names related to blob inventory to the `SystemEventNames` enum.

    **Bug Fixes**
    - Replaced the `ServiceBusDeadletterMessagesAvailableWithNoListenerEventName` with the right value.



    **New Features**
    - Added new event names to the `SystemEventNames` enum.



    **Bug Fixes**
    - Improved the `repr` on `EventGridEvent` to show more meaningful text.



    **New Features**
    - Added new SystemEventNames `AcsChatThreadParticipantRemovedEventName`, `AcsChatThreadParticipantAddedEventName` and `AcsRecordingFileStatusUpdatedEventName`.



    **Note:** This is the first stable release of our efforts to create a user-friendly and Pythonic client library for Azure EventGrid. Users migrating from `v1.x` are advised to view the [migration guide](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventgrid/azure-eventgrid/migration_guide.md).

    **New Features**
    - `azure-eventgrid` package now supports `azure.core.messaging.CloudEvent` which honors the CNCF CloudEvent spec.
    - `azure.eventgrid.SystemEventNames` can be used to get the event model type mapping for system events.
    - Implements the `EventGridPublisherClient` for the publish flow for EventGrid Events, CloudEvents and Custom schema events.

    **Breaking Changes**
    - `azure.eventgrid.models` namespace along with all the models in it are now removed.:
        - JSON documentation on the events is available here: https://docs.microsoft.com/azure/event-grid/system-topics
        - `azure.eventgrid.SystemEventNames` provides the list of available events name for easy switching.
    - `azure.eventgrid.event_grid_client.EventGridClient` is now removed in favor of `azure.eventgrid.EventGridPublisherClient`.
    - `azure.eventgrid.event_grid_client.EventGridClientConfiguration` is now removed.




    **Disclaimer:** v2.0.0 is functionally equivalent to v4.0.0. Users are advised to use v4.0.0 instead of this.

    **Breaking Changes**
    - `~azure.eventgrid.CloudEvent` is now removed in favor of `~azure.core.messaging.CloudEvent`.
    - All the `SystemEventNames` related to Azure Communication Service starting with `ACS****` are renamed to `Acs***` to honor pascal case.

    **Features**
    - Added support for two new `SystemEvents` - `ServiceBusDeadletterMessagesAvailablePeriodicNotificationsEventData` and `ServiceBusActiveMessagesAvailablePeriodicNotificationsEventData`



    **Breaking Changes**
    - `EventGridSharedAccessSignatureCredential` is deprecated in favor of `AzureSasCredential`.
    - `azure.eventgrid.models` namespace along with all the models in it are now removed. `azure.eventgrid.SystemEventNames` can be used to get the event model type mapping.
    - `topic_hostname` is renamed to `endpoint` in the `EventGridPublisherClient`.
    - `azure.eventgrid.generate_shared_access_signature` method is now renamed to `generate_sas`.
    - `EventGridConsumer`is now removed. Please see the samples to see how events can be deserialized.
    - `CustomEvent` model is removed. Dictionaries must be used to send a custom schema.

    **Bug Fixes**
    - `EventGridEvent` has two additional required positional parameters namely, `data` and `data_version`.
    - `EventGridPublisherClient` now appropriately throws a `ValueError` if an invalid credential is passed during initialization.



    **Bug Fixes**
    - `TypeError` is raised when bytes are passed to an `EventGridEvent`.



    **Feature**
    - Added support for Keyvault Event Types
    - Added distributed tracing support for CloudEvents



    **Features**
    - Added support for Azure Communication Services event types.



    **Features**
    - Version (2.0.0b1) is the first preview of our efforts to create a user-friendly and Pythonic client library for Azure EventGrid.
    For more information about this, and preview releases of other Azure SDK libraries, please visit https://azure.github.io/azure-sdk/releases/latest/python.html.
    - Added Support for `CloudEvents`.
    - Implements the `EventGridPublisherClient` for the publish flow for EventGrid Events, CloudEvents and CustomEvents.
    - Implements the `EventGridConsumer` for the consume flow of the events.



    - Event Schemas for new event types from IotHub, Media Services,
      Container Registry, Maps, and AppConfiguration services.



    - Event Schemas for new events (IotHub DeviceConnected and
      DeviceDisconnected events, Resource events related to actions), and
      breaking changes to the schema for IotHub DeviceCreated event and
      IotHub DeviceDeleted event.



    - Event Schemas for EventGrid subscription validation event, Azure
      Media events, and ServiceBus events.



  **General Breaking changes**

  This version uses a next-generation code generator that *might*
  introduce breaking changes.

    - Model signatures now use only keyword-argument syntax. All
      positional arguments must be re-written as keyword-arguments. To
      keep auto-completion in most cases, models are now generated for
      Python 2 and Python 3. Python 3 uses the "*" syntax for
      keyword-only arguments.
    - Enum types now use the "str" mixin (class AzureEnum(str, Enum)) to
      improve the behavior when unrecognized enum values are encountered.
      While this is not a breaking change, the distinctions are important,
      and are documented here:
      <https://docs.python.org/3/library/enum.html#others> At a glance:
        - "is" should not be used at all.
        - "format" will return the string value, where "%s" string
          formatting will return `NameOfEnum.stringvalue`. Format syntax
          should be preferred.
    - New Long Running Operation:
        - Return type changes from
          `msrestazure.azure_operation.AzureOperationPoller` to
          `msrest.polling.LROPoller`. External API is the same.
        - Return type is now **always** a `msrest.polling.LROPoller`,
          regardless of the optional parameters used.
        - The behavior has changed when using `raw=True`. Instead of
          returning the initial call result as `ClientRawResponse`,
          without polling, now this returns an LROPoller. After polling,
          the final resource will be returned as a `ClientRawResponse`.
        - New `polling` parameter. The default behavior is
          `Polling=True` which will poll using ARM algorithm. When
          `Polling=False`, the response of the initial call will be
          returned without polling.
        - `polling` parameter accepts instances of subclasses of
          `msrest.polling.PollingMethod`.
        - `add_done_callback` will no longer raise if called after
          polling is finished, but will instead execute the callback right
          away.

  **Features**

    - Client class can be used as a context manager to keep the underlying
      HTTP session open for performance
    - Support for consuming Azure Container Registry events and Azure IoT
      Hub events published to Event Grid.



    - Initial Release


pkgId: 7c24b2d7f88220925910e183fae2ea6d1dd82e0656467a29e5148d26b2545557
name: python-azure-eventhub
arch: src
version: 5.11.2
epoch: 0
release: 1
summary: Microsoft Azure Event Hubs Client Library for Python
url: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/eventhub/azure-eventhub
rpm_license: MIT License
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-2a4bd494-5ead-4d83-b47c-6953d24a2302
location_href: 00009168-python-azure-eventhub/python-azure-eventhub-5.11.2-1.src.rpm
checksum_type: sha256
description:
  Azure Event Hubs is a highly scalable publish-subscribe service that can ingest millions of events per second and stream
  them to multiple consumers. This lets you process and analyze the massive amounts of data produced by your connected
  devices and applications. Once Event Hubs has collected the data, you can retrieve, transform, and store it by using
  any real-time analytics provider or with batching/storage adapters. If you would like to know more about Azure Event Hubs,
  you may wish to review: [What is Event Hubs](https://docs.microsoft.com/azure/event-hubs/event-hubs-about)?

  The Azure Event Hubs client library allows for publishing and consuming of Azure Event Hubs events and may be used to:

  - Emit telemetry about your application for business intelligence and diagnostic purposes.
  - Publish facts about the state of your application which interested parties may observe and use as a trigger for taking action.
  - Observe interesting operations and interactions happening within your business or other ecosystem, allowing loosely coupled systems to interact without the need to bind them together.
  - Receive events from one or more publishers, transform them to better meet the needs of your ecosystem, then publish the transformed events to a new stream for consumers to observe.

  [Source code](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventhub/azure-eventhub/)
  | [Package (PyPi)](https://pypi.org/project/azure-eventhub/)
  | [Package (Conda)](https://anaconda.org/microsoft/azure-eventhub/)
  | [API reference documentation][api_reference]
  | [Product documentation](https://docs.microsoft.com/azure/event-hubs/)
  | [Samples](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/eventhub/azure-eventhub/samples)



  _Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For more information and questions, please refer to https://github.com/Azure/azure-sdk-for-python/issues/20691_





  - Python 3.7 or later.
  - **Microsoft Azure Subscription:**  To use Azure services, including Azure Event Hubs, you'll need a subscription.
  If you do not have an existing Azure account, you may sign up for a free trial or use your MSDN subscriber benefits when you [create an account](https://account.windowsazure.com/Home/Index).

  - **Event Hubs namespace with an Event Hub:** To interact with Azure Event Hubs, you'll also need to have a namespace and Event Hub  available.
  If you are not familiar with creating Azure resources, you may wish to follow the step-by-step guide
  for [creating an Event Hub using the Azure portal](https://docs.microsoft.com/azure/event-hubs/event-hubs-create).
  There, you can also find detailed instructions for using the Azure CLI, Azure PowerShell, or Azure Resource Manager (ARM) templates to create an Event Hub.



  Install the Azure Event Hubs client library for Python with pip:

  ```
  $ pip install azure-eventhub
  ```



  Interaction with Event Hubs starts with an instance of EventHubConsumerClient or EventHubProducerClient class. You need either the host name, SAS/AAD credential and event hub name or a connection string to instantiate the client object.

  **[Create client from connection string:](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventhub/azure-eventhub/samples/sync_samples/connection_string_authentication.py)**

  For the Event Hubs client library to interact with an Event Hub, the easiest means is to use a connection string, which is created automatically when creating an Event Hubs namespace.
  If you aren't familiar with shared access policies in Azure, you may wish to follow the step-by-step guide to [get an Event Hubs connection string](https://docs.microsoft.com/azure/event-hubs/event-hubs-get-connection-string).

  - The `from_connection_string` method takes the connection string of the form
  `Endpoint=sb://<yournamespace>.servicebus.windows.net/;SharedAccessKeyName=<yoursharedaccesskeyname>;SharedAccessKey=<yoursharedaccesskey>` and
  entity name to your Event Hub instance. You can get the connection string from the [Azure portal](https://docs.microsoft.com/azure/event-hubs/event-hubs-get-connection-string#get-connection-string-from-the-portal).

  **[Create client using the azure-identity library:](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventhub/azure-eventhub/samples/sync_samples/client_identity_authentication.py)**

  Alternately, one can use a Credential object to authenticate via AAD with the azure-identity package.

  - This constructor demonstrated in the sample linked above takes the host name and entity name of your Event Hub instance and credential that implements the
  [TokenCredential](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/azure/core/credentials.py)
  protocol. There are implementations of the `TokenCredential` protocol available in the
  [azure-identity package](https://pypi.org/project/azure-identity/). The host name is of the format `<yournamespace.servicebus.windows.net>`.
  - To use the credential types provided by `azure-identity`, please install the package:
  ```pip install azure-identity```
  - Additionally, to use the async API,  you must first install an async transport, such as [`aiohttp`](https://pypi.org/project/aiohttp/):
  ```pip install aiohttp```
  - When using Azure Active Directory, your principal must be assigned a role which allows access to Event Hubs, such as the
  Azure Event Hubs Data Owner role. For more information about using Azure Active Directory authorization with Event Hubs,
  please refer to [the associated documentation](https://docs.microsoft.com/azure/event-hubs/authorize-access-azure-active-directory).



  - An **EventHubProducerClient** is a source of telemetry data, diagnostics information, usage logs, or other log data,
  as part of an embedded device solution, a mobile device application, a game title running on a console or other device,
  some client or server based business solution, or a web site.

  - An **EventHubConsumerClient** picks up such information from the Event Hub and processes it. Processing may involve aggregation,
  complex computation, and filtering. Processing may also involve distribution or storage of the information in a raw or transformed fashion.
  Event Hub consumers are often robust and high-scale platform infrastructure parts with built-in analytics capabilities,
  like Azure Stream Analytics, Apache Spark, or Apache Storm.

  - A **partition** is an ordered sequence of events that is held in an Event Hub. Azure Event Hubs provides message streaming
  through a partitioned consumer pattern in which each consumer only reads a specific subset, or partition, of the message stream.
  As newer events arrive, they are added to the end of this sequence. The number of partitions is specified at the time an Event Hub is created and cannot be changed.

  - A **consumer group** is a view of an entire Event Hub. Consumer groups enable multiple consuming applications to each
  have a separate view of the event stream, and to read the stream independently at their own pace and from their own position.
  There can be at most 5 concurrent readers on a partition per consumer group; however it is recommended that there is only
  one active consumer for a given partition and consumer group pairing. Each active reader receives all of the events from
  its partition; if there are multiple readers on the same partition, then they will receive duplicate events.

  For more concepts and deeper discussion, see: [Event Hubs Features](https://docs.microsoft.com/azure/event-hubs/event-hubs-features).
  Also, the concepts for AMQP are well documented in [OASIS Advanced Messaging Queuing Protocol (AMQP) Version 1.0](https://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-overview-v1.0-os.html).



  The following sections provide several code snippets covering some of the most common Event Hubs tasks, including:

  - [Inspect an Event Hub](#inspect-an-event-hub)
  - [Publish events to an Event Hub](#publish-events-to-an-event-hub)
  - [Consume events from an Event Hub](#consume-events-from-an-event-hub)
  - [Consume events from an Event Hub in batches](#consume-events-from-an-event-hub-in-batches)
  - [Publish events to an Event Hub asynchronously](#publish-events-to-an-event-hub-asynchronously)
  - [Consume events from an Event Hub asynchronously](#consume-events-from-an-event-hub-asynchronously)
  - [Consume events from an Event Hub in batches asynchronously](#consume-events-from-an-event-hub-in-batches-asynchronously)
  - [Consume events and save checkpoints using a checkpoint store](#consume-events-and-save-checkpoints-using-a-checkpoint-store)
  - [Use EventHubConsumerClient to work with IoT Hub](#use-eventhubconsumerclient-to-work-with-iot-hub)



  Get the partition ids of an Event Hub.

  <!-- SNIPPET:connection_string_authentication.connection_string_authentication -->

  ```python
  import os
  from azure.eventhub import EventHubConsumerClient

  CONNECTION_STR = os.environ["EVENT_HUB_CONN_STR"]
  EVENTHUB_NAME = os.environ['EVENT_HUB_NAME']

  consumer_client = EventHubConsumerClient.from_connection_string(
      conn_str=CONNECTION_STR,
      consumer_group='$Default',
      eventhub_name=EVENTHUB_NAME,
  )

  with consumer_client:
      pass # consumer_client is now ready to be used.
  ```

  <!-- END SNIPPET -->



  Use the `create_batch` method on `EventHubProducerClient` to create an `EventDataBatch` object which can then be sent using the `send_batch` method.
  Events may be added to the `EventDataBatch` using the `add` method until the maximum batch size limit in bytes has been reached.

  <!-- SNIPPET:send.send_event_data_batch -->

  ```python
  def send_event_data_batch(producer):
      
      
      event_data_batch = producer.create_batch()
      event_data_batch.add(EventData('Single message'))
      producer.send_batch(event_data_batch)
  ```

  <!-- END SNIPPET -->



  There are multiple ways to consume events from an EventHub.  To simply trigger a callback when an event is received,
  the `EventHubConsumerClient.receive` method will be of use as follows:

  ```python
  import logging
  from azure.eventhub import EventHubConsumerClient

  connection_str = '<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>'
  consumer_group = '<< CONSUMER GROUP >>'
  eventhub_name = '<< NAME OF THE EVENT HUB >>'
  client = EventHubConsumerClient.from_connection_string(connection_str, consumer_group, eventhub_name=eventhub_name)

  logger = logging.getLogger("azure.eventhub")
  logging.basicConfig(level=logging.INFO)

  def on_event(partition_context, event):
      logger.info("Received event from partition {}".format(partition_context.partition_id))
      partition_context.update_checkpoint(event)

  with client:
      client.receive(
          on_event=on_event,
          starting_position="-1",  # "-1" is from the beginning of the partition.
      )
      
      
  ```



  Whereas the above sample triggers the callback for each message as it is received, the following sample
  triggers the callback on a batch of events, attempting to receive a number at a time.

  ```python
  import logging
  from azure.eventhub import EventHubConsumerClient

  connection_str = '<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>'
  consumer_group = '<< CONSUMER GROUP >>'
  eventhub_name = '<< NAME OF THE EVENT HUB >>'
  client = EventHubConsumerClient.from_connection_string(connection_str, consumer_group, eventhub_name=eventhub_name)

  logger = logging.getLogger("azure.eventhub")
  logging.basicConfig(level=logging.INFO)

  def on_event_batch(partition_context, events):
      logger.info("Received event from partition {}".format(partition_context.partition_id))
      partition_context.update_checkpoint()

  with client:
      client.receive_batch(
          on_event_batch=on_event_batch,
          starting_position="-1",  # "-1" is from the beginning of the partition.
      )
      
      
  ```



  Use the `create_batch` method on `EventHubProducer` to create an `EventDataBatch` object which can then be sent using the `send_batch` method.
  Events may be added to the `EventDataBatch` using the `add` method until the maximum batch size limit in bytes has been reached.
  ```python
  import asyncio
  from azure.eventhub.aio import EventHubProducerClient  # The package name suffixed with ".aio" for async
  from azure.eventhub import EventData

  connection_str = '<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>'
  consumer_group = '<< CONSUMER GROUP >>'
  eventhub_name = '<< NAME OF THE EVENT HUB >>'

  async def create_batch(client):
      event_data_batch = await client.create_batch()
      can_add = True
      while can_add:
          try:
              event_data_batch.add(EventData('Message inside EventBatchData'))
          except ValueError:
              can_add = False  # EventDataBatch object reaches max_size.
      return event_data_batch

  async def send():
      client = EventHubProducerClient.from_connection_string(connection_str, eventhub_name=eventhub_name)
      batch_data = await create_batch(client)
      async with client:
          await client.send_batch(batch_data)

  if __name__ == '__main__':
      loop = asyncio.get_event_loop()
      loop.run_until_complete(send())
  ```



  This SDK supports both synchronous and asyncio based code.  To receive as demonstrated in the samples above, but within
  aio, one would need the following:

  ```python
  import logging
  import asyncio
  from azure.eventhub.aio import EventHubConsumerClient

  connection_str = '<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>'
  consumer_group = '<< CONSUMER GROUP >>'
  eventhub_name = '<< NAME OF THE EVENT HUB >>'

  logger = logging.getLogger("azure.eventhub")
  logging.basicConfig(level=logging.INFO)

  async def on_event(partition_context, event):
      logger.info("Received event from partition {}".format(partition_context.partition_id))
      await partition_context.update_checkpoint(event)

  async def receive():
      client = EventHubConsumerClient.from_connection_string(connection_str, consumer_group, eventhub_name=eventhub_name)
      async with client:
          await client.receive(
              on_event=on_event,
              starting_position="-1",  # "-1" is from the beginning of the partition.
          )
          
          

  if __name__ == '__main__':
      loop = asyncio.get_event_loop()
      loop.run_until_complete(receive())
  ```



  All synchronous functions are supported in aio as well.  As demonstrated above for synchronous batch receipt, one can accomplish
  the same within asyncio as follows:

  ```python
  import logging
  import asyncio
  from azure.eventhub.aio import EventHubConsumerClient

  connection_str = '<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>'
  consumer_group = '<< CONSUMER GROUP >>'
  eventhub_name = '<< NAME OF THE EVENT HUB >>'

  logger = logging.getLogger("azure.eventhub")
  logging.basicConfig(level=logging.INFO)

  async def on_event_batch(partition_context, events):
      logger.info("Received event from partition {}".format(partition_context.partition_id))
      await partition_context.update_checkpoint()

  async def receive_batch():
      client = EventHubConsumerClient.from_connection_string(connection_str, consumer_group, eventhub_name=eventhub_name)
      async with client:
          await client.receive_batch(
              on_event_batch=on_event_batch,
              starting_position="-1",  # "-1" is from the beginning of the partition.
          )
          
          

  if __name__ == '__main__':
      loop = asyncio.get_event_loop()
      loop.run_until_complete(receive_batch())
  ```



  `EventHubConsumerClient` is a high level construct which allows you to receive events from multiple partitions at once
  and load balance with other consumers using the same Event Hub and consumer group.

  This also allows the user to track progress when events are processed using checkpoints.

  A checkpoint is meant to represent the last successfully processed event by the user from a particular partition of
  a consumer group in an Event Hub instance. The `EventHubConsumerClient` uses an instance of `CheckpointStore` to update checkpoints
  and to store the relevant information required by the load balancing algorithm.

  Search pypi with the prefix `azure-eventhub-checkpointstore` to
  find packages that support this and use the `CheckpointStore` implementation from one such package. Please note that both sync and async libraries are provided.

  In the below example, we create an instance of `EventHubConsumerClient` and use a `BlobCheckpointStore`. You need
  to [create an Azure Storage account](https://docs.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-portal)
  and a [Blob Container](https://docs.microsoft.com/azure/storage/blobs/storage-quickstart-blobs-portal#create-a-container) to run the code.

  [Azure Blob Storage Checkpoint Store Async](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventhub/azure-eventhub-checkpointstoreblob-aio)
  and [Azure Blob Storage Checkpoint Store Sync](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventhub/azure-eventhub-checkpointstoreblob)
  are one of the `CheckpointStore` implementations we provide that applies Azure Blob Storage as the persistent store.


  ```python
  import asyncio

  from azure.eventhub.aio import EventHubConsumerClient
  from azure.eventhub.extensions.checkpointstoreblobaio import BlobCheckpointStore

  connection_str = '<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>'
  consumer_group = '<< CONSUMER GROUP >>'
  eventhub_name = '<< NAME OF THE EVENT HUB >>'
  storage_connection_str = '<< CONNECTION STRING FOR THE STORAGE >>'
  container_name = '<<NAME OF THE BLOB CONTAINER>>'

  async def on_event(partition_context, event):
      
      await partition_context.update_checkpoint(event)  # Or update_checkpoint every N events for better performance.

  async def receive(client):
      await client.receive(
          on_event=on_event,
          starting_position="-1",  # "-1" is from the beginning of the partition.
      )

  async def main():
      checkpoint_store = BlobCheckpointStore.from_connection_string(storage_connection_str, container_name)
      client = EventHubConsumerClient.from_connection_string(
          connection_str,
          consumer_group,
          eventhub_name=eventhub_name,
          checkpoint_store=checkpoint_store,  # For load balancing and checkpoint. Leave None for no load balancing
      )
      async with client:
          await receive(client)

  if __name__ == '__main__':
      loop = asyncio.get_event_loop()
      loop.run_until_complete(main())
  ```



  You can use `EventHubConsumerClient` to work with IoT Hub as well. This is useful for receiving telemetry data of IoT Hub from the
  linked EventHub. The associated connection string will not have send claims, hence sending events is not possible.

  Please notice that the connection string needs to be for an [Event Hub-compatible endpoint](https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messages-read-builtin),
  e.g. "Endpoint=sb://my-iothub-namespace-[uid].servicebus.windows.net/;SharedAccessKeyName=my-SA-name;SharedAccessKey=my-SA-key;EntityPath=my-iot-hub-name"

  There are two ways to get the Event Hubs compatible endpoint:
  - Manually get the "Built-in endpoints" of the IoT Hub in Azure Portal and receive from it.
  ```python
  from azure.eventhub import EventHubConsumerClient

  connection_str = 'Endpoint=sb://my-iothub-namespace-[uid].servicebus.windows.net/;SharedAccessKeyName=my-SA-name;SharedAccessKey=my-SA-key;EntityPath=my-iot-hub-name'
  consumer_group = '<< CONSUMER GROUP >>'
  client = EventHubConsumerClient.from_connection_string(connection_str, consumer_group)

  partition_ids = client.get_partition_ids()
  ```
  - Programmatically retrieve the built-in Event Hubs compatible endpoint.
  Refer to [IoT Hub Connection String Sample](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventhub/azure-eventhub/samples/async_samples/iot_hub_connection_string_receive_async.py).



  See the `azure-eventhubs` [troubleshooting guide](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventhub/azure-eventhub/TROUBLESHOOTING.md) for details on how to diagnose various failure scenarios.





  Please take a look at the [samples](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventhub/azure-eventhub/samples) directory for detailed examples of how to use this library to send and receive events to/from Event Hubs.



  Reference documentation is available [here](https://azuresdkdocs.blob.core.windows.net/$web/python/azure-eventhub/latest/azure.eventhub.html).



  The EventHubs SDK integrates nicely with the [Schema Registry][schemaregistry_service] service and [Avro][avro].
  For more information, please refer to [Schema Registry SDK][schemaregistry_repo] and [Schema Registry Avro Encoder SDK][schemaregistry_avroencoder_repo].



  The Azure Event Hubs client library is now based on a pure Python AMQP implementation. `uAMQP` has been removed as required dependency.

  To use `uAMQP` as the underlying transport:

  1. Install `uamqp` with pip.

  ```
  $ pip install uamqp
  ```

  2. Pass `uamqp_transport=True` during client construction.

  ```python
  from azure.eventhub import EventHubProducerClient, EventHubConsumerClient

  connection_str = '<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>'
  consumer_group = '<< CONSUMER GROUP >>'
  eventhub_name = '<< NAME OF THE EVENT HUB >>'

  client = EventHubProducerClient.from_connection_string(
      connection_str, eventhub_name=eventhub_name, uamqp_transport=True
  )
  client = EventHubConsumerClient.from_connection_string(
      connection_str, consumer_group, eventhub_name=eventhub_name, uamqp_transport=True
  )
  ```

  Note: The `message` attribute on `EventData`/`EventDataBatch`, which previously exposed the `uamqp.Message`, has been deprecated.
   The "Legacy" objects returned by `EventData.message`/`EventDataBatch.message` have been introduced to help facilitate the transition.



  If [uAMQP](https://pypi.org/project/uamqp/) is intended to be used as the underlying AMQP protocol implementation for `azure-eventhub`,
  uAMQP wheels can be found for most major operating systems.

  If you intend to use `uAMQP` and you're running on a platform for which uAMQP wheels are not provided, please follow
   the [uAMQP Installation](https://github.com/Azure/azure-uamqp-python#installation) guidance to install from source.



  If you encounter any bugs or have suggestions, please file an issue in the [Issues](https://github.com/Azure/azure-sdk-for-python/issues) section of the project.



  This 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.

  When 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.

  This 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.

  [avro]: https://avro.apache.org/
  [api_reference]: https://docs.microsoft.com/python/api/overview/azure/eventhub-readme
  [schemaregistry_service]: https://aka.ms/schemaregistry
  [schemaregistry_repo]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/schemaregistry/azure-schemaregistry
  [schemaregistry_avroencoder_repo]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/schemaregistry/azure-schemaregistry-avroencoder

  ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python/sdk/eventhub/azure-eventhub/README.png)








  - Fixed a bug that would prevent reconnect after a long idle period, network drop (issue #28996)





  - Fixed a bug where, when `websocket-client` was not installed, the error was not caught/raised properly (issue #28453).



  Version 5.11.0 is our first stable release of the Azure Event Hubs client library based on a pure Python implemented AMQP stack.



  - A new boolean keyword argument `uamqp_transport` has been added to sync and async `EventHubProducerClient`/`EventHubConsumerClient` constructors which indicates whether to use the `uamqp` library or the default pure Python AMQP library as the underlying transport.



  - Fixed a bug that caused an error when sending batches with tracing enabled (issue #27986).
  - Fixed a bug where `EventHubSharedKeyCredential` returned an `AccessToken.token` of type `bytes` and not `str`, now matching the documentation.



  - The `message` attribute on `EventData`/`EventDataBatch`, which previously exposed the `uamqp.Message`, has been deprecated.
    - `LegacyMessage`/`LegacyBatchMessage` objects returned by the `message` attribute on `EventData`/`EventDataBatch` have been introduced to help facilitate the transition.
  - Removed uAMQP from required dependencies.
  - Adding `uamqp >= 1.6.3` as an optional dependency for use with the `uamqp_transport` keyword.
    - Added support for Python 3.11.





  - Updated the optional dependency for async transport using AMQP over WebSocket from `websocket-client` to `aiohttp` (Issue #24315, thanks @hansmbakker for the suggestion).



  This version and all future versions will require Python 3.7+. Python 3.6 is no longer supported.



  - Added the `uamqp_transport` optional parameter to the clients, to allow switching to the `uamqp` library as the transport.



  This version and all future versions will require Python 3.7+, Python 3.6 is no longer supported.



  - Fixed a bug in async `BufferedProducer` that would block when flushing the queue causing the client to freeze up (issue #23510).
  - Fixed a bug in the async `EventHubProducerClient` and `EventHubConsumerClient` that set the default value of the `transport_type` parameter in the `from_connection_string` methods to `None` rather than `TransportType.Amqp`.



  - Internal refactoring to support upcoming Pure Python AMQP-based release.
  - Updated uAMQP dependency to 1.6.0.





  - Fixed bug that prevented token refresh at regular intervals.
  - Fixed bug that was improperly passing the debug keyword argument, so that network trace debug logs are output when requested.



  - Added logging added in to track proper token refreshes & fetches, output exception reason for producer init failure.





  - Includes the following features related to buffered sending of events:
    - A new method `send_event` to `EventHubProducerClient` which allows sending single `EventData` or `AmqpAnnotatedMessage`.
    - Buffered mode sending to `EventHubProducerClient` which is intended to allow for efficient publishing of events
     without having to explicitly manage batches in the application.
      - The constructor of `EventHubProducerClient` and `from_connection_string` method takes the following new keyword arguments
       for configuration:
        - `buffered_mode`: The flag to enable/disable buffered mode sending.
        - `on_success`: The callback to be called once events have been successfully published.
        - `on_error`: The callback to be called once events have failed to be published.
        - `max_buffer_length`: The total number of events per partition that can be buffered before a flush will be triggered.
        - `max_wait_time`: The amount of time to wait for a batch to be built with events in the buffer before publishing.
      - A new method `EventHubProducerClient.flush` which flushes events in the buffer to be sent immediately.
      - A new method `EventHubProducerClient.get_buffered_event_count` which returns the number of events that are buffered and waiting to be published for a given partition.
      - A new property `EventHubProducerClient.total_buffered_event_count` which returns the total number of events that are currently buffered and waiting to be published, across all partitions.
      - A new boolean keyword argument `flush` to `EventHubProducerClient.close` which indicates whether to flush the buffer or not while closing.





  - Added support for connection using websocket and http proxy.
  - Added support for custom endpoint connection over websocket.





  - The classmethod `from_message_content` has been added to `EventData` for interoperability with the Schema Registry Avro Encoder library, and takes `content` and `content_type` as positional parameters.



  - Features related to buffered sending of events are still in beta and will not be included in this release.





  - Introduced new method `send_event` to `EventHubProducerClient` which allows sending single `EventData` or `AmqpAnnotatedMessage`.
  - Introduced buffered mode sending to `EventHubProducerClient` which is intended to allow for efficient publishing of events
   without having to explicitly manage batches in the application.
    - The constructor of `EventHubProducerClient` and `from_connection_string` method now takes the following new keyword arguments
     for configuration:
      - `buffered_mode`: The flag to enable/disable buffered mode sending.
      - `on_success`: The callback to be called once events have been successfully published.
      - `on_error`: The callback to be called once events have failed to be published.
      - `max_buffer_length`: The total number of events per partition that can be buffered before a flush will be triggered.
      - `max_wait_time`: The amount of time to wait for a batch to be built with events in the buffer before publishing.
    - Introduced new method `EventHubProducerClient.flush` which flushes events in the buffer to be sent immediately.
    - Introduced new method `EventHubProducerClient.get_buffered_event_count` which returns the number of events that are buffered and waiting to be published for a given partition.
    - Introduced new property `EventHubProducerClient.total_buffered_event_count` which returns the total number of events that are currently buffered and waiting to be published, across all partitions.
    - Introduced new boolean keyword argument `flush` to `EventHubProducerClient.close` which indicates whether to flush the buffer or not while closing.



  - Updated `EventData` internals for interoperability with the Schema Registry Avro Encoder library.





  - `from_message_data` on `EventData` has been renamed `from_message_content` for interoperability with the Schema Registry Avro Encoder library. The `data` parameter has been renamed to `content`.





  - Improved the performance of async sending and receiving.



  - The following features have been temporarily pulled out of async `EventHubProducerClient` and `EventHubConsumerClient` which will be added back in future previews as we work towards a stable release:
    - Passing the following keyword arguments to the constructors and `from_connection_string` methods of the `EventHubProducerClient` and `EventHubConsumerClient` is not supported:  `transport_type`, `http_proxy`, `custom_endpoint_address`, and `connection_verify`.





  - Added support for async `EventHubProducerClient` and `EventHubConsumerClient`.



  Version 5.8.0a1 is our first efforts to build an Azure Event Hubs client library based on pure python implemented AMQP stack.



  - The following features have been temporarily pulled out which will be added back in future previews as we work towards a stable release:
    - Async is not supported.
    - Passing the following keyword arguments to the constructors and `from_connection_string` methods of the `EventHubProducerClient` and `EventHubConsumerClient` is not supported:  `transport_type`, `http_proxy`, `custom_endpoint_address`, and `connection_verify`.



  - uAMQP dependency is removed.



  This version and all future versions will require Python 3.6+. Python 2.7 is no longer supported.



  - Added support for fixed (linear) retry backoff:
    - Sync/async `EventHubProducerClient` and `EventHubConsumerClient` constructors and `from_connection_string` take `retry_mode` as a keyword argument.



  - Fixed a bug that `EventHubProducerClient` could be reopened for sending events instead of encountering with `KeyError` when the client is previously closed (issue #21849).



  - Improved token refresh timing to prevent potentially blocking main flow when the token is about to get expired soon.
  - Updated uAMQP dependency to 1.5.1.





  - Fixed a bug for checking that `azure.eventhub.amqp.AmqpMessageHeader` and `azure.eventhub.amqp.AmqpMessageProperties` contain specific properties using the `in` keyword.



  - Updated uAMQP dependency to 1.4.3.
    - Added support for Python 3.10.
    - Fixed memory leak in win32 socketio and tlsio (issue #19777).
    - Fixed memory leak in the process of converting AMQPValue into string (issue #19777).





  - Added support for sending AMQP annotated message which allows full access to the AMQP message fields.
    - Introduced new namespace `azure.eventhub.amqp`.
    - Added new enum class `azure.eventhub.amqp.AmqpMessageBodyType` to represent the body type of the message which includes:
      - `DATA`: The body of message consists of one or more data sections and each section contains opaque binary data.
      - `SEQUENCE`: The body of message consists of one or more sequence sections and each section contains an arbitrary number of structured data elements.
      - `VALUE`: The body of message consists of one amqp-value section and the section contains a single AMQP value.
    - Introduced new class `azure.eventhub.amqp.AmqpAnnotatedMessage` for accessing low-level amqp message sections which can be instantiated for sending.
    - Introduced new classes `azure.eventhub.amqp.AmqpMessageHeader` and `azure.eventhub.amqp.AmqpMessageProperties` for accessing amqp header and properties.
    - Added new property `body_type` on `azure.eventhub.EventData` which returns `azure.eventhub.amqp.AmqpMessageBodyType`.
    - Added new read-only property `raw_amqp_message` on `azure.eventhub.EventData` which returns `azure.eventhub.amqp.AmqpAnnotatedMessage`.



  - Updated uAMQP dependency to 1.4.1.
    - Fixed a bug that attributes creation_time, absolute_expiry_time and group_sequence on MessageProperties should be compatible with integer types on Python 2.7.



  **New Features**

  - Added support for using `azure.core.credentials.AzureNamedKeyCredential` as credential for authenticating producer and consumer clients.

  **Bug Fixes**

  - Fixed bug that custom user agent string should be put in front of the built-in user agent string instead of being appended.
  - Updated uAMQP dependency to 1.4.0.
    - Fixed memory leaks in the process of link attach where source and target cython objects are not properly deallocated (#15747).
    - Improved management operation callback not to parse description value of non AMQP_TYPE_STRING type as string (#18361).

  **Notes**

  - Updated azure-core dependency to 1.14.0.



  This version follows from version 5.3.1, rather than 5.4.0b1 so that the preview idempotent producer feature is not included.

  **New Features**

  - Added support for using `azure.core.credentials.AzureSasCredential` as credential for authenticating producer and consumer clients.
  - Updated `list_ownership`, `claim_ownership`, `update_checkpoint`, `list_checkpoints` on sync and async `CheckpointStore` to support taking `**kwargs`.
    - WARNING: Implementing a custom checkpointstore that does not support taking `**kwargs` in the methods listed previously will result in the following pylint error: `W0221: Parameters differ from overridden ________ method (arguments-differ)`.
  - Updated `update_checkpoint` on sync and async `PartitionContext` to support taking `**kwargs`.

  **Bug Fixes**

  - Updated uAMQP dependency to 1.3.0.
    - Fixed bug that sending message of large size triggering segmentation fault when the underlying socket connection is lost (#13739, #14543).
    - Fixed bug in link flow control where link credit and delivery count should be calculated based on per message instead of per transfer frame (#16934).

  **Notes**

  - Updated azure-core dependency to 1.13.0.



  This version and all future versions will require Python 2.7 or Python 3.6+, Python 3.5 is no longer supported.

  **New Features**

  - Added support for idempotent publishing which is supported by the service to endeavor to reduce the number of duplicate
    events that are published.
    - `EventHubProducerClient` constructor accepts two new parameters for idempotent publishing:
      - `enable_idempotent_partitions`: A boolean value to tell the `EventHubProducerClient` whether to enable idempotency.
      - `partition_config`: The set of configurations that can be specified to influence publishing behavior
       specific to the configured Event Hub partition.
    - Introduced a new method `get_partition_publishing_properties` on `EventHubProducerClient` to inspect the information
      about the state of publishing for a partition.
    - Introduced a new property `published_sequence_number` on `EventData` to get the publishing sequence number assigned
      to the event at the time it was successfully published.
    - Introduced a new property `starting_published_sequence_number` on `EventDataBatch` to get the publishing sequence
      number assigned to the first event in the batch at the time the batch was successfully published.
    - Introduced a new class `azure.eventhub.PartitionPublishingConfiguration` which is a set of configurations that can be
      specified to influence the behavior when publishing directly to an Event Hub partition.

  **Notes**

  - Updated uAMQP dependency to 1.2.15.



  This version will be the last version to officially support Python 3.5, future versions will require Python 2.7 or Python 3.6+.

  **Bug fixes**

  - Sending empty `event_data_batch` will be a no-op now instead of raising error.



  **New Features**

  - Added a `parse_connection_string` method which parses a connection string into a properties bag, `EventHubConnectionStringProperties`, containing its component parts.
  - The constructor and `from_connection_string` method of `EventHubConsumerClient` and `EventHubProducerClient` now accept two new optional arguments:
    - `custom_endpoint_address` which allows for specifying a custom endpoint to use when communicating with the Event Hubs service,
  and is useful when your network does not allow communicating to the standard Event Hubs endpoint.
    - `connection_verify` which allows for specifying the path to the custom CA_BUNDLE file of the SSL certificate which is used to authenticate
  the identity of the connection endpoint.

  **Notes**

  - Updated uAMQP dependency to 1.2.14.



  **Bug fixes**

  - Updated `azure.eventhub.extension.__init__.py` to be compatible with pkgutil-style namespace (PR #13210, thanks @pjachowi).
  - Updated uAMQP dependency to 1.2.13
    - Added support for Python 3.9.
    - Fixed bug that macOS was unable to detect network error (#15473).
    - Fixed bug that `uamqp.ReceiveClient` and `uamqp.ReceiveClientAsync` receive messages during connection establishment (#15555).
    - Fixed bug where connection establishment on macOS with Clang 12 triggering unrecognized selector exception (#15567).
    - Fixed bug in accessing message properties triggering segmentation fault when the underlying C bytes are NULL (#15568).



  **New Features**

  - Connection strings used with `from_connection_string` methods now supports using the `SharedAccessSignature` key in leiu of `sharedaccesskey` and `sharedaccesskeyname`, taking the string of the properly constructed token as value.



  **New Features**

  - `EventHubConsumerClient` constructor accepts two new parameters for the load balancer.
      - `load_balancing_strategy`, which can be "greedy" or "balanced".
       With greedy strategy, one execution of load balancing will claim as many partitions as required to balance the load
       whereas with balanced strategy one execution of load balancing will claim at most 1 partition.
      - `partition_ownership_expiration_interval`, which allows you to customize the partition ownership expiration for load balancing.
       A consumer client may lose its owned partitions more often with a smaller expiration interval. But a larger interval
       may result in idle partitions not being claimed for longer time.
  - Added enum class `azure.eventhub.LoadBalancingStrategy` for `load_balancing_strategy`.



  **New Features**

  - `EventHubProducerClient.send_batch` accepts either an `EventDataBatch` or a finite list of `EventData`. #9181
  - Added enqueueTime to span links of distributed tracing. #9599

  **Bug fixes**

  - Fixed a bug that turned `azure.eventhub.EventhubConsumerClient` into an exclusive receiver when it has no checkpoint store. #11181
  - Updated uAMQP dependency to 1.2.7.
    - Fixed bug in setting certificate of tlsio on MacOS. #7201
    - Fixed bug that caused segmentation fault in network tracing on MacOS when setting `logging_enable` to `True` in `EventHubConsumerClient` and `EventHubProducerClient`.



  **New Features**

  - Added `EventHubConsumerClient.receive_batch()` to receive and process events in batches instead of one by one. #9184
  - `EventHubConsumerCliuent.receive()` has a new param `max_wait_time`.
  `on_event` is called every `max_wait_time` when no events are received and `max_wait_time` is not `None` or 0.
  - Param event of `PartitionContext.update_checkpoint` is now optional. The last received event is used when param event is not passed in.
  - `EventData.system_properties` has added missing properties when consuming messages from IotHub. #10408



  **Bug fixes**

  - Fixed a bug that swallowed errors when receiving events with `azure.eventhub.EventHubConsumerClient`  #9660
  - Fixed a bug that caused `get_eventhub_properties`, `get_partition_ids`, and `get_partition_properties` to raise
  an error on Azure Stack #9920



  **Breaking changes**

  - `EventData`
      - Removed deprecated property `application_properties` and deprecated method `encode_message()`.
  - `EventHubConsumerClient`
      - `on_error` would be called when `EventHubConsumerClient` failed to claim ownership of partitions.
      - `on_partition_close` and `on_partition_initialize` would be called in the case of exceptions raised by `on_event` callback.
          -  `EventHubConsumerClient` would close and re-open the internal partition receiver in this case.
      - Default starting position from where `EventHubConsumerClient` should resume receiving after recovering from an error has been re-prioritized.
          - If there is checkpoint, it will resume from the checkpoint.
          - If there is no checkpoint but `starting_position` is provided, it will resume from `starting_posititon`.
          - If there is no checkpoint or `starting_position`, it will resume from the latest position.
  - `PartitionContext`
      - `update_checkpoint` would do in-memory checkpoint instead of doing nothing when checkpoint store is not explicitly provided.
          - The in-memory checkpoints would be used for `EventHubConsumerClient` receiving recovering.
  - `get_partition_ids`, `get_partition_properties`, `get_eventhub_properties` would raise error in the case of service returning an error status code.
      - `AuthenticationError` would be raised when service returning error code 401.
      - `ConnectError` would be raised when service returning error code 404.
      - `EventHubError` would be raised when service returning other error codes.



  **Breaking changes**

  - All exceptions should now be imported from `azure.eventhub.exceptions`.
  - Introduced separate `EventHubSharedKeyCredential` objects for synchronous and asynchronous operations.
    For async, import the credentials object from the `azure.eventhub.aio` namespace.
  - `EventData`
      - Renamed property `application_properties` to `properties`.
      - `EventData` no longer has attribute `last_enqueued_event_properties` - use this on `PartitionContext` instead.
  - `EvenDataBatch`
      - `EventDataBatch.try_add` has been renamed to `EventDataBatch.add`.
      - Renamed property `size` to `size_in_bytes`.
      - Renamed attribute `max_size` to `max_size_in_bytes`.
  - `EventHubConsumerClient` and `EventHubProducerClient`
      - Renamed method `get_properties` to `get_eventhub_properties`.
      - Renamed parameters in constructor: `host` to `fully_qualified_namespace`, `event_hub_path` to `eventhub_name`.
      - Renamed parameters in `get_partition_properties`: `partition` to `partition_id`.
      - Renamed parameter `consumer_group_name` to `consumer_group` and moved that parameter from `receive` method to the constructor of `EventHubConsumerClient`.
      - Renamed parameter `initial_event_position` to `starting_position` on the `receive` method of `EventHubConsumerClient`.
      - Renamed parameter `event_hub_path` to `eventhub_name` in constructor and `from_connection_string` method of the client object.
      - `EventHubProducerClient.send` has been renamed to `send_batch` which will only accept `EventDataBatch` object as input.
      - `EventHubProducerClient.create_batch` now also takes the `partition_id` and `partition_key` as optional parameters (which are no longer specified at send).
  - Renamed module `PartitionManager` to `CheckpointStore`.
  - Receive event callback parameter has been renamed to `on_event` and now operates on a single event rather than a list of events.
  - Removed class `EventPostition`.
      - The `starting_position` parameter of the `receive` method accepts offset(`str`), sequence number(`int`), datetime (`datetime.datetime`) or `dict` of these types.
      - The `starting_position_inclusive` parameter of the `receive` method accepts `bool` or `dict` indicating whether the given event position is inclusive or not.
  - `PartitionContext` no longer has attribute `owner_id`.
  - `PartitionContext` now has attribute `last_enqueued_event_properties` which is populated if `track_last_enqueued_event_properties` is set to `True` in the `receive` method.

  **New features**

  - Added new parameter `idle_timeout` in construct and `from_connection_string` to `EventHubConsumerClient` and `EventHubProducerClient`
  after which the underlying connection will close if there is no further activity.



  **Breaking changes**

  - `EventHubClient`, `EventHubConsumer` and `EventHubProducer` has been removed. Use `EventHubProducerClient` and `EventHubConsumerClient` instead.
      - Construction of both objects is the same as it was for the previous client.
  - Introduced `EventHubProducerClient` as substitution for`EventHubProducer`.
      - `EventHubProducerClient` supports sending events to different partitions.
  - Introduced `EventHubConsumerClient` as substitution for `EventHubConsumer`.
      - `EventHubConsumerClient` supports receiving events from single/all partitions.
      - There are no longer methods which directly return `EventData`, all receiving is done via callback method: `on_events`.
  - `EventHubConsumerClient` has taken on the responsibility of `EventProcessor`.
      - `EventHubConsumerClient` now accepts `PartitionManager` to do load-balancing and checkpoint.
  - Replaced `PartitionProcessor`by four independent callback methods accepted by the `receive` method on `EventHubConsumerClient`.
      - `on_events(partition_context, events)` called when events are received.
      - `on_error(partition_context, exception` called when errors occur.
      - `on_partition_initialize(partition_context)` called when a partition consumer is opened.
      - `on_partition_close(partition_context, reason)` called when a partition consumer is closed.
  - Some modules and classes that were importable from several different places have been removed:
      - `azure.eventhub.common` has been removed. Import from `azure.eventhub` instead.
      - `azure.eventhub.client_abstract` has been removed. Use `azure.eventhub.EventHubProducerClient` or `azure.eventhub.EventHubConsumerClient` instead.
      - `azure.eventhub.client` has been removed. Use `azure.eventhub.EventHubProducerClient` or `azure.eventhub.EventHubConsumerClient` instead.
      - `azure.eventhub.producer` has been removed. Use `azure.eventhub.EventHubProducerClient` instead.
      - `azure.eventhub.consumer` has been removed. Use `azure.eventhub.EventHubConsumerClient` instead.
      - `azure.eventhub.aio.client_async` has been removed. Use `azure.eventhub.aio.EventHubProducerClient` or `azure.eventhub.aio.EventHubConsumerClient` instead.
      - `azure.eventhub.aio.producer_async` has been removed. Use `azure.eventhub.aio.EventHubProducerClient` instead.
      - `azure.eventhub.aio.consumer_async` has been removed. Use `azure.eventhub.aio.EventHubConsumerClient` instead.
      - `azure.eventhub.aio.event_processor.event_processor` has been removed. Use `azure.eventhub.aio.EventHubConsumerClient` instead.
      - `azure.eventhub.aio.event_processor.partition_processor` has been removed. Use callback methods instead.
      - `azure.eventhub.aio.event_processor.partition_manager` has been removed. Import from `azure.eventhub.aio` instead.
      - `azure.eventhub.aio.event_processor.partition_context` has been removed. Import from `azure.eventhub.aio` instead.
      - `azure.eventhub.aio.event_processor.sample_partition_manager` has been removed.

  **Bug fixes**

  - Fixed bug in user-agent string not being parsed.



  **New features**

  - Added support for tracing (issue #7153).
  - Added the capability of tracking last enqueued event properties of the partition to `EventHubConsumer` .
      - Added new boolean type parameter`track_last_enqueued_event_properties` in method `EventHubClient.create_consumer()`.
      - Added new property `last_enqueued_event_properties` of `EventHubConsumer` which contains sequence_number, offset, enqueued_time and retrieval_time information.
      - By default the capability is disabled as it will cost extra bandwidth for transferring more information if turned on.

  **Breaking changes**

  - Removed support for IoT Hub direct connection.
      - [EventHubs compatible connection string](https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messages-read-builtin) of an IotHub can be used to create `EventHubClient` and read properties or events from an IoT Hub.
  - Removed support for sending EventData to IoT Hub.
  - Removed parameter `exception` in method `close()` of `EventHubConsumer` and `EventHubProcuer`.
  - Updated uAMQP dependency to 1.2.3.



  **New features**

  - Added support for automatic load balancing among multiple `EventProcessor`.
  - Added `BlobPartitionManager` which implements `PartitionManager`.
      - Azure Blob Storage is applied for storing data used by `EventProcessor`.
      - Packaged separately as a plug-in to `EventProcessor`.
      - For details, please refer to [Azure Blob Storage Partition Manager](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/eventhub/azure-eventhub-checkpointstoreblob-aio).
  - Added property `system_properties` on `EventData`.

  **Breaking changes**

  - Removed constructor method of `PartitionProcessor`. For initialization please implement the method `initialize`.
  - Replaced `CheckpointManager` by `PartitionContext`.
      - `PartitionContext` has partition context information and method `update_checkpoint`.
  - Updated all methods of `PartitionProcessor` to include `PartitionContext` as part of the arguments.
  - Updated accessibility of class members in `EventHub/EventHubConsumer/EventHubProducer`to be private.
  - Moved `azure.eventhub.eventprocessor` under `aio` package, which now becomes `azure.eventhub.aio.eventprocessor`.



  **New features**

  - Added method `create_batch` on the `EventHubProducer` to create an `EventDataBatch` that can then be used to add events until the maximum size is reached.
      - This batch object can then be used in the `send()` method to send all the added events to Event Hubs.
      - This allows publishers to build batches without the possibility of encountering the error around the message size exceeding the supported limit when sending events.
      - It also allows publishers with bandwidth concerns to control the size of each batch published.
  - Added new configuration parameters for exponential delay between retry operations.
      - `retry_total`: The total number of attempts to redo the failed operation.
      - `backoff_factor`: The delay time factor.
      - `backoff_max`: The maximum delay time in total.
  - Added support for context manager on `EventHubClient`.
  - Added new error type `OperationTimeoutError` for send operation.
  - Introduced a new class `EventProcessor` which replaces the older concept of [Event Processor Host](https://docs.microsoft.com/azure/event-hubs/event-hubs-event-processor-host). This early preview is intended to allow users to test the new design using a single instance of `EventProcessor`. The ability to checkpoints to a durable store will be added in future updates.
      - `EventProcessor`: EventProcessor creates and runs consumers for all partitions of the eventhub.
      - `PartitionManager`: PartitionManager defines the interface for getting/claiming ownerships of partitions and updating checkpoints.
      - `PartitionProcessor`: PartitionProcessor defines the interface for processing events.
      - `CheckpointManager`: CheckpointManager takes responsibility for updating checkpoints during events processing.

  **Breaking changes**

  - `EventProcessorHost` was replaced by `EventProcessor`, please read the new features for details.
  - Replaced `max_retries` configuration parameter of the EventHubClient with `retry_total`.




  Version 5.0.0b1 is a preview of our efforts to create a client library that is user friendly and idiomatic to the Python ecosystem. The reasons for most of the changes in this update can be found in the [Azure SDK Design Guidelines for Python](https://azuresdkspecs.z5.web.core.windows.net/PythonSpec.html). For more information, please visit https://aka.ms/azure-sdk-preview1-python.

  **New features**

  - Added new configuration parameters for creating EventHubClient.
    - `credential`: The credential object used for authentication which implements `TokenCredential` interface of getting tokens.
    - `transport_type`: The type of transport protocol that will be used for communicating with the Event Hubs service.
    - `max_retries`: The max number of attempts to redo the failed operation when an error happened.
    - for detailed information about the configuration parameters, please read the reference documentation.
  - Added new methods `get_partition_properties` and `get_partition_ids` to EventHubClient.
  - Added support for http proxy.
  - Added support for authentication using azure-identity credential.
  - Added support for transport using AMQP over WebSocket.

  **Breaking changes**

  - New error hierarchy
    - `azure.error.EventHubError`
    - `azure.error.ConnectionLostError`
    - `azure.error.ConnectError`
    - `azure.error.AuthenticationError`
    - `azure.error.EventDataError`
    - `azure.error.EventDataSendError`
  - Renamed Sender/Receiver to EventHubProducer/EventHubConsumer.
    - Renamed `add_sender` to `create_producer` and `add_receiver` to `create_consumer` in EventHubClient.
    - EventHubConsumer is now iterable.
  - Rename class azure.eventhub.Offset to azure.eventhub.EventPosition.
  - Rename method `get_eventhub_info` to `get_properties` of EventHubClient.
  - Reorganized connection management, EventHubClient is no longer responsible for opening/closing EventHubProducer/EventHubConsumer.
    - Each EventHubProducer/EventHubConsumer is responsible for its own connection management.
    - Added support for context manager on EventHubProducer and EventHubConsumer.
  - Reorganized async APIs into "azure.eventhub.aio" namespace and rename to drop the "_async" suffix.
  - Updated uAMQP dependency to 1.2.



  **BugFixes**

  - Fixed bug where datetime offset filter was using a local timestamp rather than UTC.
  - Fixed stackoverflow error in continuous connection reconnect attempts.




  **BugFixes**

  - Added support for auto reconnect on token expiration and other auth errors (issue #89).

  **Features**

  - Added ability to create ServiceBusClient from an existing SAS auth token, including
    providing a function to auto-renew that token on expiry.
  - Added support for storing a custom EPH context value in checkpoint (PR #84, thanks @konstantinmiller)




  - Support for Python 2.7 in azure.eventhub module (azure.eventprocessorhost will not support Python 2.7).
  - Parse EventData.enqueued_time as a UTC timestamp (issue #72, thanks @vjrantal)




  - Fixed bug in Azure namespace package.




  - Changes to `AzureStorageCheckpointLeaseManager` parameters to support other connection options (issue #61):
    - The `storage_account_name`, `storage_account_key` and `lease_container_name` arguments are now optional keyword arguments.
    - Added a `sas_token` argument that must be specified with `storage_account_name` in place of `storage_account_key`.
    - Added an `endpoint_suffix` argument to support storage endpoints in National Clouds.
    - Added a `connection_string` argument that, if specified, overrides all other endpoint arguments.
    - The `lease_container_name` argument now defaults to `"eph-leases"` if not specified.

  - Fix for clients failing to start if run called multipled times (issue #64).
  - Added convenience methods `body_as_str` and `body_as_json` to EventData object for easier processing of message data.




  - API stable.
  - Renamed internal `_async` module to `async_ops` for docs generation.
  - Added optional `auth_timeout` parameter to `EventHubClient` and `EventHubClientAsync` to configure how long to allow for token
    negotiation to complete. Default is 60 seconds.
  - Added optional `send_timeout` parameter to `EventHubClient.add_sender` and `EventHubClientAsync.add_async_sender` to determine the
    timeout for Events to be successfully sent. Default value is 60 seconds.
  - Reformatted logging for performance.




  - Stability improvements for EPH.
  - Updated uAMQP version.
  - Added new configuration options for Sender and Receiver; `keep_alive` and `auto_reconnect`.
    These flags have been added to the following:

    - `EventHubClient.add_receiver`
    - `EventHubClient.add_sender`
    - `EventHubClientAsync.add_async_receiver`
    - `EventHubClientAsync.add_async_sender`
    - `EPHOptions.keey_alive_interval`
    - `EPHOptions.auto_reconnect_on_error`




  - **Breaking change** `EventData.offset` will now return an object of type `~uamqp.common.Offset` rather than str.
    The original string value can be retrieved from `~uamqp.common.Offset.value`.
  - Each sender/receiver will now run in its own independent connection.
  - Updated uAMQP dependency to 0.2.0
  - Fixed issue with IoTHub clients not being able to retrieve partition information.
  - Added support for HTTP proxy settings to both EventHubClient and EPH.
  - Added error handling policy to automatically reconnect on retryable error.
  - Added keep-alive thread for maintaining an unused connection.




  - **Breaking change** Restructured library to support Python 3.7. Submodule `async` has been renamed and all classes from
    this module can now be imported from azure.eventhub directly.
  - **Breaking change** Removed optional `callback` argument from `Receiver.receive` and `AsyncReceiver.receive`.
  - **Breaking change** `EventData.properties` has been renamed to `EventData.application_properties`.
    This removes the potential for messages to be processed via callback for not yet returned
    in the batch.
  - Updated uAMQP dependency to v0.1.0
  - Added support for constructing IoTHub connections.
  - Fixed memory leak in receive operations.
  - Dropped Python 2.7 wheel support.




  - Added `namespace_suffix` to EventHubConfig() to support national clouds.
  - Added `device_id` attribute to EventData to support IoT Hub use cases.
  - Added message header to workaround service bug for PartitionKey support.
  - Updated uAMQP dependency to vRC1.




  - Updated uAMQP to latest version.
  - Further testing and minor bug fixes.




  - Updated uAQMP dependency.


pkgId: 7f0b2ab69a0dab6f85994fb6522495e9e64ed3e82c1060be1e8d11270815cbd3
name: python-azure-eventhub-checkpointstoreblob
arch: src
version: 1.1.4
epoch: 0
release: 1
summary: Microsoft Azure Event Hubs checkpointer implementation with Blob Storage Client Library for Python
rpm_license: MIT License
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-5383eccd-d760-4086-8cea-633089fddb22
checksum_type: sha256
description:
  Azure EventHubs Checkpoint Store is used for storing checkpoints while processing events from Azure Event Hubs.
  This Checkpoint Store package works as a plug-in package to `EventHubConsumerClient`. It uses Azure Storage Blob as the persistent store for maintaining checkpoints and partition ownership information.

  Please note that this is a sync library, for async version of the Azure EventHubs Checkpoint Store client library, please refer to [azure-eventhub-checkpointstoreblob-aio](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/eventhub/azure-eventhub-checkpointstoreblob-aio).

  [Source code](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/eventhub/azure-eventhub-checkpointstoreblob/) | [Package (PyPi)](https://pypi.org/project/azure-eventhub-checkpointstoreblob) | [API reference documentation](https://azuresdkdocs.blob.core.windows.net/$web/python/azure-eventhub/latest/azure.eventhub.html#azure.eventhub.CheckpointStore) | [Azure Eventhubs documentation](https://docs.microsoft.com/azure/event-hubs/) | [Azure Storage documentation](https://docs.microsoft.com/azure/storage/)





  - Python2.7, Python 3.6 or later.
  - **Microsoft Azure Subscription:**  To use Azure services, including Azure Event Hubs, you'll need a subscription. If you do not have an existing Azure account, you may sign up for a free trial or use your MSDN subscriber benefits when you [create an account](https://azure.microsoft.com/).

  - **Event Hubs namespace with an Event Hub:** To interact with Azure Event Hubs, you'll also need to have a namespace and Event Hub  available.  If you are not familiar with creating Azure resources, you may wish to follow the step-by-step guide for [creating an Event Hub using the Azure portal](https://docs.microsoft.com/azure/event-hubs/event-hubs-create).  There, you can also find detailed instructions for using the Azure CLI, Azure PowerShell, or Azure Resource Manager (ARM) templates to create an Event Hub.

  - **Azure Storage Account:** You'll need to have an Azure Storage Account and create a Azure Blob Storage Block Container to store the checkpoint data with blobs. You may follow the guide [creating an Azure Block Blob Storage Account](https://docs.microsoft.com/azure/storage/blobs/storage-blob-create-account-block-blob).



  ```
  $ pip install azure-eventhub-checkpointstoreblob
  ```





  Checkpointing is a process by which readers mark or commit their position within a partition event sequence.
  Checkpointing is the responsibility of the consumer and occurs on a per-partition basis within a consumer group.
  This responsibility means that for each consumer group, each partition reader must keep track of its current position
  in the event stream, and can inform the service when it considers the data stream complete. If a reader disconnects from
  a partition, when it reconnects it begins reading at the checkpoint that was previously submitted by the last reader of
  that partition in that consumer group. When the reader connects, it passes the offset to the event hub to specify the
  location at which to start reading. In this way, you can use checkpointing to both mark events as "complete" by
  downstream applications, and to provide resiliency if a failover between readers running on different machines occurs.
  It is possible to return to older data by specifying a lower offset from this checkpointing process. Through this
  mechanism, checkpointing enables both failover resiliency and event stream replay.


  Both offset & sequence number refer to the position of an event within a partition. You can think of them as a
  client-side cursor. The offset is a byte numbering of the event. The offset/sequence number enables an event consumer
  (reader) to specify a point in the event stream from which they want to begin reading events. You can specify a
  timestamp such that you receive events enqueued only after the given timestamp. Consumers are responsible for
  storing their own offset values outside of the Event Hubs service. Within a partition, each event includes an offset,
  sequence number and the timestamp of when it was enqueued.


  - [Create an Azure EventHubs `EventHubConsumerClient`](#create-an-eventhubconsumerclient)
  - [Consume events using a `BlobCheckpointStore`](#consume-events-using-a-blobcheckpointstore-to-do-checkpoint)


  The easiest way to create a `EventHubConsumerClient` is to use a connection string.
  ```python
  from azure.eventhub import EventHubConsumerClient
  eventhub_client = EventHubConsumerClient.from_connection_string("my_eventhub_namespace_connection_string", "my_consumer_group", eventhub_name="my_eventhub")
  ```
  For other ways of creating a `EventHubConsumerClient`, refer to [EventHubs library](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/eventhub/azure-eventhub) for more details.


  ```python

  from azure.eventhub import EventHubConsumerClient
  from azure.eventhub.extensions.checkpointstoreblob import BlobCheckpointStore

  connection_str = '<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>'
  consumer_group = '<< CONSUMER GROUP >>'
  eventhub_name = '<< NAME OF THE EVENT HUB >>'
  storage_connection_str = '<< CONNECTION STRING OF THE STORAGE >>'
  container_name = '<< STORAGE CONTAINER NAME>>'


  def on_event(partition_context, event):
      
      partition_context.update_checkpoint(event)  # Or update_checkpoint every N events for better performance.

  def main():
      checkpoint_store = BlobCheckpointStore.from_connection_string(
          storage_connection_str,
          container_name
      )
      client = EventHubConsumerClient.from_connection_string(
          connection_str,
          consumer_group,
          eventhub_name=eventhub_name,
          checkpoint_store=checkpoint_store,
      )

      with client:
          client.receive(on_event)

  if __name__ == '__main__':
      main()
  ```


  Some environments have different versions of Azure Storage Service API.
  `BlobCheckpointStore` by default uses the Storage Service API version 2019-07-07. To use it against a different
  version, specify `api_version` when you create the `BlobCheckpointStore` object.





  Enabling logging will be helpful to do trouble shooting.



  - Enable `azure.eventhub.extensions.checkpointstoreblob` logger to collect traces from the library.
  - Enable `azure.eventhub` logger to collect traces from the main azure-eventhub library.
  - Enable `azure.eventhub.extensions.checkpointstoreblob._vendor.storage` logger to collect traces from azure storage blob library.
  - Enable `uamqp` logger to collect traces from the underlying uAMQP library.
  - Enable AMQP frame level trace by setting `logging_enable=True` when creating the client.





  Get started with our [EventHubs Checkpoint Store samples](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/eventhub/azure-eventhub-checkpointstoreblob/samples).

  - [receive_events_using_checkpoint_store.py](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/eventhub/azure-eventhub-checkpointstoreblob/samples/receive_events_using_checkpoint_store.py) - EventHubConsumerClient with blob checkpoint store example
  - [receive_events_using_checkpoint_store_storage_api_version.py](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/eventhub/azure-eventhub-checkpointstoreblob/samples/receive_events_using_checkpoint_store_storage_api_version.py) - EventHubConsumerClient with blob checkpoint store and storage version example



  Reference documentation is available [here](https://azuresdkdocs.blob.core.windows.net/$web/python/azure-eventhub/latest/azure.eventhub.html#azure.eventhub.CheckpointStore).



  If you encounter any bugs or have suggestions, please file an issue in the [Issues](https://github.com/Azure/azure-sdk-for-python/issues) section of the project.



  This 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.

  When 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.

  This 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.

  ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python/sdk/eventhub/azure-eventhub-checkpointstoreblob/README.png)






  This version and all future versions will require Python 2.7 or Python 3.6+, Python 3.5 is no longer supported.

  **New features**
  - Updated `list_ownership`, `claim_ownership`, `update_checkpoint`, `list_checkpoints` on `BlobCheckpointStore` to support taking `**kwargs`.



  This version will be the last version to officially support Python 3.5, future versions will require Python 2.7 or Python 3.6+.

  **Bug fixes**
  - Updated vendor azure-storage-blob dependency to v12.7.1.
    - Fixed storage blob authentication failure due to request date header too old (#16192).



  **Bug fixes**
  - Fixed a bug that `BlobCheckpointStore.list_ownership` and `BlobCheckpointStore.list_checkpoints` triggering `KeyError` due to reading empty metadata of parent node when working with Data Lake enabled Blob Storage.



  **Bug fixes**
  - Fixed a bug that may gradually slow down retrieving checkpoint data from the storage blob if the storage account "File share soft delete" is enabled. #12836



  **New features**
  - Param `api_version` of `BlobCheckpointStore` now supports older versions of Azure Storage Service API.


  Stable release. No new features or API changes.



  **Breaking changes**

  - Renamed `BlobPartitionManager` to `BlobCheckpointStore`.
  - Constructor of `BlobCheckpointStore` has been updated to take the storage container details directly rather than an instance of `ContainerClient`.
  - A `from_connection_string` constructor has been added for Blob Storage connection strings.
  - Module `blobstoragepm` is now internal, all imports should be directly from `azure.eventhub.extensions.checkpointstoreblob`.
  - `BlobCheckpointStore` now has a `close()` function for shutting down an HTTP connection pool, additionally the object can be used in a context manager to manage the connection.



  **New features**

  - `BlobPartitionManager` that uses Azure Blob Storage Block Blob to store EventProcessor checkpoint data

  ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python/sdk/eventhub/azure-eventhub-checkpointstoreblob/HISTORY.png)

url:
  https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/eventhub/azure-eventhub-checkpointstoreblob

location_href:
  00010620-python-azure-eventhub-checkpointstoreblob/python-azure-eventhub-checkpointstoreblob-1.1.4-1.src.rpm


pkgId: 8d29ac77462ec7417043898858fe3d1cd3fe0f079ec115dfd5c88a84f08ad4d3
name: python-azure-eventhub-checkpointstoreblob-aio
arch: src
version: 1.1.4
epoch: 0
release: 1
summary: Microsoft Azure Event Hubs checkpointer implementation with Blob Storage Client Library for Python
rpm_license: MIT License
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-1a132514-106f-4be4-909c-0233bc6a1e93
checksum_type: sha256
description:
  Azure EventHubs Checkpoint Store is used for storing checkpoints while processing events from Azure Event Hubs.
  This Checkpoint Store package works as a plug-in package to `EventHubConsumerClient`. It uses Azure Storage Blob as the persistent store for maintaining checkpoints and partition ownership information.

  Please note that this is an async library, for sync version of the Azure EventHubs Checkpoint Store client library, please refer to [azure-eventhub-checkpointstoreblob](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/eventhub/azure-eventhub-checkpointstoreblob).

  [Source code](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/eventhub/azure-eventhub-checkpointstoreblob-aio/) | [Package (PyPi)](https://pypi.org/project/azure-eventhub-checkpointstoreblob-aio/) | [API reference documentation](https://azuresdkdocs.blob.core.windows.net/$web/python/azure-eventhub/latest/azure.eventhub.aio.html#azure.eventhub.aio.CheckpointStore) | [Azure Eventhubs documentation](https://docs.microsoft.com/azure/event-hubs/) | [Azure Storage documentation](https://docs.microsoft.com/azure/storage/)





  - Python 3.6 or later.
  - **Microsoft Azure Subscription:**  To use Azure services, including Azure Event Hubs, you'll need a subscription.  If you do not have an existing Azure account, you may sign up for a free trial or use your MSDN subscriber benefits when you [create an account](https://azure.microsoft.com/).

  - **Event Hubs namespace with an Event Hub:** To interact with Azure Event Hubs, you'll also need to have a namespace and Event Hub  available.  If you are not familiar with creating Azure resources, you may wish to follow the step-by-step guide for [creating an Event Hub using the Azure portal](https://docs.microsoft.com/azure/event-hubs/event-hubs-create).  There, you can also find detailed instructions for using the Azure CLI, Azure PowerShell, or Azure Resource Manager (ARM) templates to create an Event Hub.

  - **Azure Storage Account:** You'll need to have an Azure Storage Account and create a Azure Blob Storage Block Container to store the checkpoint data with blobs. You may follow the guide [creating an Azure Block Blob Storage Account](https://docs.microsoft.com/azure/storage/blobs/storage-blob-create-account-block-blob).



  ```
  $ pip install azure-eventhub-checkpointstoreblob-aio
  ```





  Checkpointing is a process by which readers mark or commit their position within a partition event sequence.
  Checkpointing is the responsibility of the consumer and occurs on a per-partition basis within a consumer group.
  This responsibility means that for each consumer group, each partition reader must keep track of its current position
  in the event stream, and can inform the service when it considers the data stream complete. If a reader disconnects from
  a partition, when it reconnects it begins reading at the checkpoint that was previously submitted by the last reader of
  that partition in that consumer group. When the reader connects, it passes the offset to the event hub to specify the
  location at which to start reading. In this way, you can use checkpointing to both mark events as "complete" by
  downstream applications, and to provide resiliency if a failover between readers running on different machines occurs.
  It is possible to return to older data by specifying a lower offset from this checkpointing process. Through this
  mechanism, checkpointing enables both failover resiliency and event stream replay.


  Both offset & sequence number refer to the position of an event within a partition. You can think of them as a
  client-side cursor. The offset is a byte numbering of the event. The offset/sequence number enables an event consumer
  (reader) to specify a point in the event stream from which they want to begin reading events. You can specify a
  timestamp such that you receive events enqueued only after the given timestamp. Consumers are responsible for
  storing their own offset values outside of the Event Hubs service. Within a partition, each event includes an offset,
  sequence number and the timestamp of when it was enqueued.


  - [Create an Azure EventHubs `EventHubConsumerClient`](#create-an-eventhubconsumerclient)
  - [Consume events using a `BlobCheckpointStore`](#consume-events-using-a-blobcheckpointstore-to-do-checkpoint)


  The easiest way to create a `EventHubConsumerClient` is to use a connection string.
  ```python
  from azure.eventhub.aio import EventHubConsumerClient
  eventhub_client = EventHubConsumerClient.from_connection_string("my_eventhub_namespace_connection_string", "my_consumer_group", eventhub_name="my_eventhub")
  ```
  For other ways of creating a `EventHubConsumerClient`, refer to [EventHubs library](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/eventhub/azure-eventhub) for more details.


  ```python
  import asyncio

  from azure.eventhub.aio import EventHubConsumerClient
  from azure.eventhub.extensions.checkpointstoreblobaio import BlobCheckpointStore

  connection_str = '<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>'
  consumer_group = '<< CONSUMER GROUP >>'
  eventhub_name = '<< NAME OF THE EVENT HUB >>'
  storage_connection_str = '<< CONNECTION STRING OF THE STORAGE >>'
  container_name = '<< STORAGE CONTAINER NAME>>'

  async def on_event(partition_context, event):
      
      await partition_context.update_checkpoint(event)  # Or update_checkpoint every N events for better performance.

  async def main():
      checkpoint_store = BlobCheckpointStore.from_connection_string(
          storage_connection_str,
          container_name
      )
      client = EventHubConsumerClient.from_connection_string(
          connection_str,
          consumer_group,
          eventhub_name=eventhub_name,
          checkpoint_store=checkpoint_store,
      )

      async with client:
          await client.receive(on_event)

  if __name__ == '__main__':
      loop = asyncio.get_event_loop()
      loop.run_until_complete(main())
  ```


  Some environments have different versions of Azure Storage Service API.
  `BlobCheckpointStore` by default uses the Storage Service API version 2019-07-07. To use it against a different
  version, specify `api_version` when you create the `BlobCheckpointStore` object.





  Enabling logging will be helpful to do trouble shooting.



  - Enable `azure.eventhub.extensions.checkpointstoreblobaio` logger to collect traces from the library.
  - Enable `azure.eventhub` logger to collect traces from the main azure-eventhub library.
  - Enable `azure.eventhub.extensions.checkpointstoreblobaio._vendor.storage` logger to collect traces from azure storage blob library.
  - Enable `uamqp` logger to collect traces from the underlying uAMQP library.
  - Enable AMQP frame level trace by setting `logging_enable=True` when creating the client.





  Get started with our [EventHubs Checkpoint Store async samples](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/eventhub/azure-eventhub-checkpointstoreblob-aio/samples).

  - [receive_events_using_checkpoint_store_async.py](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/eventhub/azure-eventhub-checkpointstoreblob-aio/samples/receive_events_using_checkpoint_store_async.py) - EventHubConsumerClient with blob checkpoint store example
  - [receive_events_using_checkpoint_store_storage_api_version_async.py](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/eventhub/azure-eventhub-checkpointstoreblob-aio/samples/receive_events_using_checkpoint_store_storage_api_version_async.py) - EventHubConsumerClient with blob checkpoint store and storage version example



  Reference documentation is available [here](https://azuresdkdocs.blob.core.windows.net/$web/python/azure-eventhub/latest/azure.eventhub.aio.html#azure.eventhub.aio.CheckpointStore).



  If you encounter any bugs or have suggestions, please file an issue in the [Issues](https://github.com/Azure/azure-sdk-for-python/issues) section of the project.



  This 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.

  When 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.

  This 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.

  ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python/sdk/eventhub/azure-eventhub-checkpointstoreblob-aio/README.png)






  This version and all future versions will require Python 2.7 or Python 3.6+, Python 3.5 is no longer supported.

  **New features**
  - Updated `list_ownership`, `claim_ownership`, `update_checkpoint`, `list_checkpoints` on `BlobCheckpointStore` to support taking `**kwargs`.



  This version will be the last version to officially support Python 3.5, future versions will require Python 2.7 or Python 3.6+.

  **Bug fixes**
  - Updated vendor azure-storage-blob dependency to v12.7.1.
    - Fixed storage blob authentication failure due to request date header too old (#16192).




  **Bug fixes**
  - Fixed a bug that `BlobCheckpointStore.list_ownership` and `BlobCheckpointStore.list_checkpoints` triggering `KeyError` due to reading empty metadata of parent node when working with Data Lake enabled Blob Storage.



  **Bug fixes**
  - Fixed a bug that may gradually slow down retrieving checkpoint data from the storage blob if the storage account "File share soft delete" is enabled. #12836



  **New features**
  - Param `api_version` of `BlobCheckpointStore` now supports older versions of Azure Storage Service API.


  Stable release. No new features or API changes.



  **Breaking changes**

  - Renamed `BlobPartitionManager` to `BlobCheckpointStore`.
  - Constructor of `BlobCheckpointStore` has been updated to take the storage container details directly rather than an instance of `ContainerClient`.
  - A `from_connection_string` constructor has been added for Blob Storage connection strings.
  - Module `blobstoragepmaio` is now internal, all imports should be directly from `azure.eventhub.extensions.checkpointstoreblobaio`.
  - `BlobCheckpointStore` now has a `close()` function for shutting down an HTTP connection pool, additionally the object can be used in a context manager to manage the connection.



  **New features**

  - Added method `list_checkpoints` which list all the checkpoints under given eventhub namespace, eventhub name and consumer group.


  This release has trivial internal changes only. No feature changes.



  **New features**

  - `BlobPartitionManager` that uses Azure Blob Storage Block Blob to store EventProcessor checkpoint data

  ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python/sdk/eventhub/azure-eventhub-checkpointstoreblob-aio/HISTORY.png)

url:
  https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/eventhub/azure-eventhub-checkpointstoreblob-aio

location_href:
  00010354-python-azure-eventhub-checkpointstoreblob-aio/python-azure-eventhub-checkpointstoreblob-aio-1.1.4-1.src.rpm


pkgId: 72a6ad479eb0cbfe0c48010ecd4dff02896a5ebf0ff896332bc2b9179ef0e239
name: python-azure-eventhub-checkpointstoreblob-aio-help
arch: noarch
version: 1.1.4
epoch: 0
release: 1
summary: Development documents and examples for azure-eventhub-checkpointstoreblob-aio
rpm_license: MIT License
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-1a132514-106f-4be4-909c-0233bc6a1e93
rpm_sourcerpm: python-azure-eventhub-checkpointstoreblob-aio-1.1.4-1.src.rpm
checksum_type: sha256
description:
  Azure EventHubs Checkpoint Store is used for storing checkpoints while processing events from Azure Event Hubs.
  This Checkpoint Store package works as a plug-in package to `EventHubConsumerClient`. It uses Azure Storage Blob as the persistent store for maintaining checkpoints and partition ownership information.

  Please note that this is an async library, for sync version of the Azure EventHubs Checkpoint Store client library, please refer to [azure-eventhub-checkpointstoreblob](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/eventhub/azure-eventhub-checkpointstoreblob).

  [Source code](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/eventhub/azure-eventhub-checkpointstoreblob-aio/) | [Package (PyPi)](https://pypi.org/project/azure-eventhub-checkpointstoreblob-aio/) | [API reference documentation](https://azuresdkdocs.blob.core.windows.net/$web/python/azure-eventhub/latest/azure.eventhub.aio.html#azure.eventhub.aio.CheckpointStore) | [Azure Eventhubs documentation](https://docs.microsoft.com/azure/event-hubs/) | [Azure Storage documentation](https://docs.microsoft.com/azure/storage/)





  - Python 3.6 or later.
  - **Microsoft Azure Subscription:**  To use Azure services, including Azure Event Hubs, you'll need a subscription.  If you do not have an existing Azure account, you may sign up for a free trial or use your MSDN subscriber benefits when you [create an account](https://azure.microsoft.com/).

  - **Event Hubs namespace with an Event Hub:** To interact with Azure Event Hubs, you'll also need to have a namespace and Event Hub  available.  If you are not familiar with creating Azure resources, you may wish to follow the step-by-step guide for [creating an Event Hub using the Azure portal](https://docs.microsoft.com/azure/event-hubs/event-hubs-create).  There, you can also find detailed instructions for using the Azure CLI, Azure PowerShell, or Azure Resource Manager (ARM) templates to create an Event Hub.

  - **Azure Storage Account:** You'll need to have an Azure Storage Account and create a Azure Blob Storage Block Container to store the checkpoint data with blobs. You may follow the guide [creating an Azure Block Blob Storage Account](https://docs.microsoft.com/azure/storage/blobs/storage-blob-create-account-block-blob).



  ```
  $ pip install azure-eventhub-checkpointstoreblob-aio
  ```





  Checkpointing is a process by which readers mark or commit their position within a partition event sequence.
  Checkpointing is the responsibility of the consumer and occurs on a per-partition basis within a consumer group.
  This responsibility means that for each consumer group, each partition reader must keep track of its current position
  in the event stream, and can inform the service when it considers the data stream complete. If a reader disconnects from
  a partition, when it reconnects it begins reading at the checkpoint that was previously submitted by the last reader of
  that partition in that consumer group. When the reader connects, it passes the offset to the event hub to specify the
  location at which to start reading. In this way, you can use checkpointing to both mark events as "complete" by
  downstream applications, and to provide resiliency if a failover between readers running on different machines occurs.
  It is possible to return to older data by specifying a lower offset from this checkpointing process. Through this
  mechanism, checkpointing enables both failover resiliency and event stream replay.


  Both offset & sequence number refer to the position of an event within a partition. You can think of them as a
  client-side cursor. The offset is a byte numbering of the event. The offset/sequence number enables an event consumer
  (reader) to specify a point in the event stream from which they want to begin reading events. You can specify a
  timestamp such that you receive events enqueued only after the given timestamp. Consumers are responsible for
  storing their own offset values outside of the Event Hubs service. Within a partition, each event includes an offset,
  sequence number and the timestamp of when it was enqueued.


  - [Create an Azure EventHubs `EventHubConsumerClient`](#create-an-eventhubconsumerclient)
  - [Consume events using a `BlobCheckpointStore`](#consume-events-using-a-blobcheckpointstore-to-do-checkpoint)


  The easiest way to create a `EventHubConsumerClient` is to use a connection string.
  ```python
  from azure.eventhub.aio import EventHubConsumerClient
  eventhub_client = EventHubConsumerClient.from_connection_string("my_eventhub_namespace_connection_string", "my_consumer_group", eventhub_name="my_eventhub")
  ```
  For other ways of creating a `EventHubConsumerClient`, refer to [EventHubs library](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/eventhub/azure-eventhub) for more details.


  ```python
  import asyncio

  from azure.eventhub.aio import EventHubConsumerClient
  from azure.eventhub.extensions.checkpointstoreblobaio import BlobCheckpointStore

  connection_str = '<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>'
  consumer_group = '<< CONSUMER GROUP >>'
  eventhub_name = '<< NAME OF THE EVENT HUB >>'
  storage_connection_str = '<< CONNECTION STRING OF THE STORAGE >>'
  container_name = '<< STORAGE CONTAINER NAME>>'

  async def on_event(partition_context, event):
      
      await partition_context.update_checkpoint(event)  # Or update_checkpoint every N events for better performance.

  async def main():
      checkpoint_store = BlobCheckpointStore.from_connection_string(
          storage_connection_str,
          container_name
      )
      client = EventHubConsumerClient.from_connection_string(
          connection_str,
          consumer_group,
          eventhub_name=eventhub_name,
          checkpoint_store=checkpoint_store,
      )

      async with client:
          await client.receive(on_event)

  if __name__ == '__main__':
      loop = asyncio.get_event_loop()
      loop.run_until_complete(main())
  ```


  Some environments have different versions of Azure Storage Service API.
  `BlobCheckpointStore` by default uses the Storage Service API version 2019-07-07. To use it against a different
  version, specify `api_version` when you create the `BlobCheckpointStore` object.





  Enabling logging will be helpful to do trouble shooting.



  - Enable `azure.eventhub.extensions.checkpointstoreblobaio` logger to collect traces from the library.
  - Enable `azure.eventhub` logger to collect traces from the main azure-eventhub library.
  - Enable `azure.eventhub.extensions.checkpointstoreblobaio._vendor.storage` logger to collect traces from azure storage blob library.
  - Enable `uamqp` logger to collect traces from the underlying uAMQP library.
  - Enable AMQP frame level trace by setting `logging_enable=True` when creating the client.





  Get started with our [EventHubs Checkpoint Store async samples](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/eventhub/azure-eventhub-checkpointstoreblob-aio/samples).

  - [receive_events_using_checkpoint_store_async.py](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/eventhub/azure-eventhub-checkpointstoreblob-aio/samples/receive_events_using_checkpoint_store_async.py) - EventHubConsumerClient with blob checkpoint store example
  - [receive_events_using_checkpoint_store_storage_api_version_async.py](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/eventhub/azure-eventhub-checkpointstoreblob-aio/samples/receive_events_using_checkpoint_store_storage_api_version_async.py) - EventHubConsumerClient with blob checkpoint store and storage version example



  Reference documentation is available [here](https://azuresdkdocs.blob.core.windows.net/$web/python/azure-eventhub/latest/azure.eventhub.aio.html#azure.eventhub.aio.CheckpointStore).



  If you encounter any bugs or have suggestions, please file an issue in the [Issues](https://github.com/Azure/azure-sdk-for-python/issues) section of the project.



  This 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.

  When 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.

  This 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.

  ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python/sdk/eventhub/azure-eventhub-checkpointstoreblob-aio/README.png)






  This version and all future versions will require Python 2.7 or Python 3.6+, Python 3.5 is no longer supported.

  **New features**
  - Updated `list_ownership`, `claim_ownership`, `update_checkpoint`, `list_checkpoints` on `BlobCheckpointStore` to support taking `**kwargs`.



  This version will be the last version to officially support Python 3.5, future versions will require Python 2.7 or Python 3.6+.

  **Bug fixes**
  - Updated vendor azure-storage-blob dependency to v12.7.1.
    - Fixed storage blob authentication failure due to request date header too old (#16192).




  **Bug fixes**
  - Fixed a bug that `BlobCheckpointStore.list_ownership` and `BlobCheckpointStore.list_checkpoints` triggering `KeyError` due to reading empty metadata of parent node when working with Data Lake enabled Blob Storage.



  **Bug fixes**
  - Fixed a bug that may gradually slow down retrieving checkpoint data from the storage blob if the storage account "File share soft delete" is enabled. #12836



  **New features**
  - Param `api_version` of `BlobCheckpointStore` now supports older versions of Azure Storage Service API.


  Stable release. No new features or API changes.



  **Breaking changes**

  - Renamed `BlobPartitionManager` to `BlobCheckpointStore`.
  - Constructor of `BlobCheckpointStore` has been updated to take the storage container details directly rather than an instance of `ContainerClient`.
  - A `from_connection_string` constructor has been added for Blob Storage connection strings.
  - Module `blobstoragepmaio` is now internal, all imports should be directly from `azure.eventhub.extensions.checkpointstoreblobaio`.
  - `BlobCheckpointStore` now has a `close()` function for shutting down an HTTP connection pool, additionally the object can be used in a context manager to manage the connection.



  **New features**

  - Added method `list_checkpoints` which list all the checkpoints under given eventhub namespace, eventhub name and consumer group.


  This release has trivial internal changes only. No feature changes.



  **New features**

  - `BlobPartitionManager` that uses Azure Blob Storage Block Blob to store EventProcessor checkpoint data

  ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python/sdk/eventhub/azure-eventhub-checkpointstoreblob-aio/HISTORY.png)

url:
  https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/eventhub/azure-eventhub-checkpointstoreblob-aio

location_href:
  00010354-python-azure-eventhub-checkpointstoreblob-aio/python-azure-eventhub-checkpointstoreblob-aio-help-1.1.4-1.noarch.rpm


pkgId: 068f12b85194a53e62d4ddbc2e445441691f88cd5583ee7cbb42fb4379a576fb
name: python-azure-eventhub-checkpointstoreblob-help
arch: noarch
version: 1.1.4
epoch: 0
release: 1
summary: Development documents and examples for azure-eventhub-checkpointstoreblob
rpm_license: MIT License
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-5383eccd-d760-4086-8cea-633089fddb22
rpm_sourcerpm: python-azure-eventhub-checkpointstoreblob-1.1.4-1.src.rpm
checksum_type: sha256
description:
  Azure EventHubs Checkpoint Store is used for storing checkpoints while processing events from Azure Event Hubs.
  This Checkpoint Store package works as a plug-in package to `EventHubConsumerClient`. It uses Azure Storage Blob as the persistent store for maintaining checkpoints and partition ownership information.

  Please note that this is a sync library, for async version of the Azure EventHubs Checkpoint Store client library, please refer to [azure-eventhub-checkpointstoreblob-aio](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/eventhub/azure-eventhub-checkpointstoreblob-aio).

  [Source code](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/eventhub/azure-eventhub-checkpointstoreblob/) | [Package (PyPi)](https://pypi.org/project/azure-eventhub-checkpointstoreblob) | [API reference documentation](https://azuresdkdocs.blob.core.windows.net/$web/python/azure-eventhub/latest/azure.eventhub.html#azure.eventhub.CheckpointStore) | [Azure Eventhubs documentation](https://docs.microsoft.com/azure/event-hubs/) | [Azure Storage documentation](https://docs.microsoft.com/azure/storage/)





  - Python2.7, Python 3.6 or later.
  - **Microsoft Azure Subscription:**  To use Azure services, including Azure Event Hubs, you'll need a subscription. If you do not have an existing Azure account, you may sign up for a free trial or use your MSDN subscriber benefits when you [create an account](https://azure.microsoft.com/).

  - **Event Hubs namespace with an Event Hub:** To interact with Azure Event Hubs, you'll also need to have a namespace and Event Hub  available.  If you are not familiar with creating Azure resources, you may wish to follow the step-by-step guide for [creating an Event Hub using the Azure portal](https://docs.microsoft.com/azure/event-hubs/event-hubs-create).  There, you can also find detailed instructions for using the Azure CLI, Azure PowerShell, or Azure Resource Manager (ARM) templates to create an Event Hub.

  - **Azure Storage Account:** You'll need to have an Azure Storage Account and create a Azure Blob Storage Block Container to store the checkpoint data with blobs. You may follow the guide [creating an Azure Block Blob Storage Account](https://docs.microsoft.com/azure/storage/blobs/storage-blob-create-account-block-blob).



  ```
  $ pip install azure-eventhub-checkpointstoreblob
  ```





  Checkpointing is a process by which readers mark or commit their position within a partition event sequence.
  Checkpointing is the responsibility of the consumer and occurs on a per-partition basis within a consumer group.
  This responsibility means that for each consumer group, each partition reader must keep track of its current position
  in the event stream, and can inform the service when it considers the data stream complete. If a reader disconnects from
  a partition, when it reconnects it begins reading at the checkpoint that was previously submitted by the last reader of
  that partition in that consumer group. When the reader connects, it passes the offset to the event hub to specify the
  location at which to start reading. In this way, you can use checkpointing to both mark events as "complete" by
  downstream applications, and to provide resiliency if a failover between readers running on different machines occurs.
  It is possible to return to older data by specifying a lower offset from this checkpointing process. Through this
  mechanism, checkpointing enables both failover resiliency and event stream replay.


  Both offset & sequence number refer to the position of an event within a partition. You can think of them as a
  client-side cursor. The offset is a byte numbering of the event. The offset/sequence number enables an event consumer
  (reader) to specify a point in the event stream from which they want to begin reading events. You can specify a
  timestamp such that you receive events enqueued only after the given timestamp. Consumers are responsible for
  storing their own offset values outside of the Event Hubs service. Within a partition, each event includes an offset,
  sequence number and the timestamp of when it was enqueued.


  - [Create an Azure EventHubs `EventHubConsumerClient`](#create-an-eventhubconsumerclient)
  - [Consume events using a `BlobCheckpointStore`](#consume-events-using-a-blobcheckpointstore-to-do-checkpoint)


  The easiest way to create a `EventHubConsumerClient` is to use a connection string.
  ```python
  from azure.eventhub import EventHubConsumerClient
  eventhub_client = EventHubConsumerClient.from_connection_string("my_eventhub_namespace_connection_string", "my_consumer_group", eventhub_name="my_eventhub")
  ```
  For other ways of creating a `EventHubConsumerClient`, refer to [EventHubs library](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/eventhub/azure-eventhub) for more details.


  ```python

  from azure.eventhub import EventHubConsumerClient
  from azure.eventhub.extensions.checkpointstoreblob import BlobCheckpointStore

  connection_str = '<< CONNECTION STRING FOR THE EVENT HUBS NAMESPACE >>'
  consumer_group = '<< CONSUMER GROUP >>'
  eventhub_name = '<< NAME OF THE EVENT HUB >>'
  storage_connection_str = '<< CONNECTION STRING OF THE STORAGE >>'
  container_name = '<< STORAGE CONTAINER NAME>>'


  def on_event(partition_context, event):
      
      partition_context.update_checkpoint(event)  # Or update_checkpoint every N events for better performance.

  def main():
      checkpoint_store = BlobCheckpointStore.from_connection_string(
          storage_connection_str,
          container_name
      )
      client = EventHubConsumerClient.from_connection_string(
          connection_str,
          consumer_group,
          eventhub_name=eventhub_name,
          checkpoint_store=checkpoint_store,
      )

      with client:
          client.receive(on_event)

  if __name__ == '__main__':
      main()
  ```


  Some environments have different versions of Azure Storage Service API.
  `BlobCheckpointStore` by default uses the Storage Service API version 2019-07-07. To use it against a different
  version, specify `api_version` when you create the `BlobCheckpointStore` object.





  Enabling logging will be helpful to do trouble shooting.



  - Enable `azure.eventhub.extensions.checkpointstoreblob` logger to collect traces from the library.
  - Enable `azure.eventhub` logger to collect traces from the main azure-eventhub library.
  - Enable `azure.eventhub.extensions.checkpointstoreblob._vendor.storage` logger to collect traces from azure storage blob library.
  - Enable `uamqp` logger to collect traces from the underlying uAMQP library.
  - Enable AMQP frame level trace by setting `logging_enable=True` when creating the client.





  Get started with our [EventHubs Checkpoint Store samples](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/eventhub/azure-eventhub-checkpointstoreblob/samples).

  - [receive_events_using_checkpoint_store.py](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/eventhub/azure-eventhub-checkpointstoreblob/samples/receive_events_using_checkpoint_store.py) - EventHubConsumerClient with blob checkpoint store example
  - [receive_events_using_checkpoint_store_storage_api_version.py](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/eventhub/azure-eventhub-checkpointstoreblob/samples/receive_events_using_checkpoint_store_storage_api_version.py) - EventHubConsumerClient with blob checkpoint store and storage version example



  Reference documentation is available [here](https://azuresdkdocs.blob.core.windows.net/$web/python/azure-eventhub/latest/azure.eventhub.html#azure.eventhub.CheckpointStore).



  If you encounter any bugs or have suggestions, please file an issue in the [Issues](https://github.com/Azure/azure-sdk-for-python/issues) section of the project.



  This 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.

  When 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.

  This 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.

  ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python/sdk/eventhub/azure-eventhub-checkpointstoreblob/README.png)






  This version and all future versions will require Python 2.7 or Python 3.6+, Python 3.5 is no longer supported.

  **New features**
  - Updated `list_ownership`, `claim_ownership`, `update_checkpoint`, `list_checkpoints` on `BlobCheckpointStore` to support taking `**kwargs`.



  This version will be the last version to officially support Python 3.5, future versions will require Python 2.7 or Python 3.6+.

  **Bug fixes**
  - Updated vendor azure-storage-blob dependency to v12.7.1.
    - Fixed storage blob authentication failure due to request date header too old (#16192).



  **Bug fixes**
  - Fixed a bug that `BlobCheckpointStore.list_ownership` and `BlobCheckpointStore.list_checkpoints` triggering `KeyError` due to reading empty metadata of parent node when working with Data Lake enabled Blob Storage.



  **Bug fixes**
  - Fixed a bug that may gradually slow down retrieving checkpoint data from the storage blob if the storage account "File share soft delete" is enabled. #12836



  **New features**
  - Param `api_version` of `BlobCheckpointStore` now supports older versions of Azure Storage Service API.


  Stable release. No new features or API changes.



  **Breaking changes**

  - Renamed `BlobPartitionManager` to `BlobCheckpointStore`.
  - Constructor of `BlobCheckpointStore` has been updated to take the storage container details directly rather than an instance of `ContainerClient`.
  - A `from_connection_string` constructor has been added for Blob Storage connection strings.
  - Module `blobstoragepm` is now internal, all imports should be directly from `azure.eventhub.extensions.checkpointstoreblob`.
  - `BlobCheckpointStore` now has a `close()` function for shutting down an HTTP connection pool, additionally the object can be used in a context manager to manage the connection.



  **New features**

  - `BlobPartitionManager` that uses Azure Blob Storage Block Blob to store EventProcessor checkpoint data

  ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python/sdk/eventhub/azure-eventhub-checkpointstoreblob/HISTORY.png)

url:
  https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/eventhub/azure-eventhub-checkpointstoreblob

location_href:
  00010620-python-azure-eventhub-checkpointstoreblob/python-azure-eventhub-checkpointstoreblob-help-1.1.4-1.noarch.rpm


pkgId: 01310253937c45b0c2637b9ad5c6399dcf473ac5fe6383b63f83e6cdbbc68c00
name: python-azure-functions
arch: src
version: 1.13.3
epoch: 0
release: 1
summary: Azure Functions for Python
url: https://pypi.org/project/azure-functions/
rpm_license: MIT
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-d0c7b886-d2fe-4d2a-ab58-03eee84cfbaa
location_href: 00010074-python-azure-functions/python-azure-functions-1.13.3-1.src.rpm
checksum_type: sha256
description:
  | Branch | CodeCov                                                                                                                                                            |
  |--------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|
  | master | [![codecov](https://codecov.io/gh/Azure/azure-functions-python-library/branch/master/graph/badge.svg)](https://codecov.io/gh/Azure/azure-functions-python-library) |
  | dev    | [![codecov](https://codecov.io/gh/Azure/azure-functions-python-library/branch/dev/graph/badge.svg)](https://codecov.io/gh/Azure/azure-functions-python-library)    |



  Python support for Azure Functions is based on Python 3.6/3.7/3.8/3.9 and 3.10 (coming soon), serverless hosting on Linux and the Functions 2.0, 3.0
  and 4.0 runtime.

  Here is the current status of Python in Azure Functions:

  _What are the supported Python versions?_

  | Azure Functions Runtime | Python 3.6 | Python 3.7 | Python 3.8 | Python 3.9 | Python 3.10  | Python 3.11 |
  |-------------------------|--------|-------|-------|--------|--------------|-------------|
  | Azure Functions 3.0     | [EOL](https://learn.microsoft.com/azure/azure-functions/migrate-version-3-version-4)|[EOL](https://learn.microsoft.com/azure/azure-functions/migrate-version-3-version-4)|[EOL](https://learn.microsoft.com/azure/azure-functions/migrate-version-3-version-4)| [EOL](https://learn.microsoft.com/azure/azure-functions/migrate-version-3-version-4)| -       |-        |
  | Azure Functions 4.0     | &#x2713; | &#x2713; | &#x2713; | &#x2713; | &#x2713;    | coming soon |

  _What's available?_
  - Build, test, debug and publish using Azure Functions Core Tools (CLI) or Visual Studio Code
  - Triggers / Bindings : HTTP, Blob, Queue, Timer, Cosmos DB, Event Grid, Event Hubs and Service Bus
  - Create a Python Function on Linux using a custom docker image
  - Triggers / Bindings : Custom binding support



  - [Create your first Python function](https://docs.microsoft.com/en-us/azure/azure-functions/functions-create-first-function-python)
  - [Developer guide](https://docs.microsoft.com/en-us/azure/azure-functions/functions-reference-python)
  - [Binding API reference](https://docs.microsoft.com/en-us/python/api/azure-functions/azure.functions?view=azure-python)
  - [Develop using VS Code](https://docs.microsoft.com/en-us/azure/azure-functions/functions-create-first-function-vs-code)
  - [Create a Python Function on Linux using a custom docker image](https://docs.microsoft.com/en-us/azure/azure-functions/functions-create-function-linux-custom-image)



  Issues and feature requests are tracked in a variety of places. To report this feedback, please file an issue to the relevant repository below:

  | Item          | Description                                  | Link                                                                           |
  |---------------|----------------------------------------------|--------------------------------------------------------------------------------|
  | Python Worker | Programming Model, Triggers & Bindings       | [File an Issue](https://github.com/Azure/azure-functions-python-worker/issues) |
  | Linux         | Base Docker Images                           | [File an Issue](https://github.com/Azure/azure-functions-docker/issues)        |
  | Runtime       | Script Host & Language Extensibility         | [File an Issue](https://github.com/Azure/azure-functions-host/issues)          |
  | VSCode        | VSCode Extension for Azure Functions         | [File an Issue](https://github.com/microsoft/vscode-azurefunctions/issues)     |
  | Core Tools    | Command Line Interface for Local Development | [File an Issue](https://github.com/Azure/azure-functions-core-tools/issues)    |
  | Portal        | User Interface or Experience Issue           | [File an Issue](https://github.com/azure/azure-functions-ux/issues)            |
  | Templates     | Code Issues with Creation Template           | [File an Issue](https://github.com/Azure/azure-functions-templates/issues)     |



  This 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.

  When 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.

  This 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.


pkgId: 55b3e4719536498034a4668c22228307aeca9f7b1780b141b5ac4f6b731e163c
name: python-azure-functions-devops-build
arch: src
version: 0.0.22
epoch: 0
release: 1
url: https://github.com/Azure/azure-functions-devops-build
rpm_license: MIT
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-037e16f4-9d88-4ef6-b198-03ea52cfb450
location_href: 00010476-python-azure-functions-devops-build/python-azure-functions-devops-build-0.0.22-1.src.rpm
checksum_type: sha256
summary:
  Python package for integrating Azure Functions with Azure DevOps. Specifically made for the Azure CLI

description:
  > :construction: The project is currently **work in progress**. Please **do not use in production** as we expect developments over time. :construction:

  This project provides the class AzureDevopsBuildManager and supporting classes. This manager class allows
  the caller to manage Azure Devops pipelines that are maintained within an Azure Devops account. This project was created to be able to support command line tooling for the AZ Cli.


  To install the package from pip:
  ```
  pip install azure-functions-devops-build
  ```

  To use the API, you need to first establish a connection to azure by loging into your azure account using `az login`. You can then follow the example as below. Firstly we get the token from login and use this to authenticate the different python function calls.

  ```python
  from azure.cli.core import get_default_cli
  from azure.cli.core._profile import Profile
  from azure_functions_devops_build.organization.organization_manager import OrganizationManager
  import pprint


  cli_ctx = get_default_cli()
  profile = Profile(cli_ctx=cli_ctx)
  creds, _, _ = profile.get_login_credentials(subscription_id=None)


  organization_manager = OrganizationManager(creds=creds)


  organizations = organization_manager.list_organizations()


  for organization in organizations.value:
      pprint.pprint(organization.__dict__)
  ```



  This Python library extensively uses the Azure DevOps REST APIs and Azure Devops Python API. See the [Azure DevOps REST API reference](https://docs.microsoft.com/en-us/rest/api/vsts/?view=vsts-rest-5.0) for details on calling different APIs and [Azure DevOps Python SDK](https://github.com/Microsoft/azure-devops-python-api) for details on the azure-devops-python-api.



  See samples by looking at tests or viewing the [az-cli functionapp devops-build module](https://github.com/Azure/azure-cli/tree/dev/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice).



  Several things need to be setup before you can run the tests:
  1. Signed into the az cli. You can do this by using `az login`.
  2. Since this directly deploys to azure functions, [create an azure functions functionapp using the azure portal](https://docs.microsoft.com/en-us/azure/azure-functions/functions-create-first-azure-function). You need to make a functionapp for these tests to successfully run and make sure you record the details of the subscription name, project name, application type and storage name.
  3. Follow the tests/_config_example.py file, create a tests/_config.py with your own testing environment.
  4. Run the full test suite using `python -m tests.suite`
  5. To run specific manager tests run `python -m tests.{NAME_OF_MANAGER}` eg. `python -m tests.test_builder_manager`



  This 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.

  When 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.

  This 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.


pkgId: fa71e8c4d0ba7e3f9b289e243644f4be360eb3bdc2f0c5974bdb17fde536def5
name: python-azure-functions-devops-build-help
arch: noarch
version: 0.0.22
epoch: 0
release: 1
summary: Development documents and examples for azure-functions-devops-build
url: https://github.com/Azure/azure-functions-devops-build
rpm_license: MIT
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-037e16f4-9d88-4ef6-b198-03ea52cfb450
rpm_sourcerpm: python-azure-functions-devops-build-0.0.22-1.src.rpm
checksum_type: sha256
description:
  > :construction: The project is currently **work in progress**. Please **do not use in production** as we expect developments over time. :construction:

  This project provides the class AzureDevopsBuildManager and supporting classes. This manager class allows
  the caller to manage Azure Devops pipelines that are maintained within an Azure Devops account. This project was created to be able to support command line tooling for the AZ Cli.


  To install the package from pip:
  ```
  pip install azure-functions-devops-build
  ```

  To use the API, you need to first establish a connection to azure by loging into your azure account using `az login`. You can then follow the example as below. Firstly we get the token from login and use this to authenticate the different python function calls.

  ```python
  from azure.cli.core import get_default_cli
  from azure.cli.core._profile import Profile
  from azure_functions_devops_build.organization.organization_manager import OrganizationManager
  import pprint


  cli_ctx = get_default_cli()
  profile = Profile(cli_ctx=cli_ctx)
  creds, _, _ = profile.get_login_credentials(subscription_id=None)


  organization_manager = OrganizationManager(creds=creds)


  organizations = organization_manager.list_organizations()


  for organization in organizations.value:
      pprint.pprint(organization.__dict__)
  ```



  This Python library extensively uses the Azure DevOps REST APIs and Azure Devops Python API. See the [Azure DevOps REST API reference](https://docs.microsoft.com/en-us/rest/api/vsts/?view=vsts-rest-5.0) for details on calling different APIs and [Azure DevOps Python SDK](https://github.com/Microsoft/azure-devops-python-api) for details on the azure-devops-python-api.



  See samples by looking at tests or viewing the [az-cli functionapp devops-build module](https://github.com/Azure/azure-cli/tree/dev/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice).



  Several things need to be setup before you can run the tests:
  1. Signed into the az cli. You can do this by using `az login`.
  2. Since this directly deploys to azure functions, [create an azure functions functionapp using the azure portal](https://docs.microsoft.com/en-us/azure/azure-functions/functions-create-first-azure-function). You need to make a functionapp for these tests to successfully run and make sure you record the details of the subscription name, project name, application type and storage name.
  3. Follow the tests/_config_example.py file, create a tests/_config.py with your own testing environment.
  4. Run the full test suite using `python -m tests.suite`
  5. To run specific manager tests run `python -m tests.{NAME_OF_MANAGER}` eg. `python -m tests.test_builder_manager`



  This 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.

  When 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.

  This 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.

location_href:
  00010476-python-azure-functions-devops-build/python-azure-functions-devops-build-help-0.0.22-1.noarch.rpm


pkgId: 16e0bc9fdb7f4fdd20f357cb56bed62853a096be2829cdbe01d5571c4dd95b13
name: python-azure-identity
arch: src
version: 1.12.0
epoch: 0
release: 1
summary: Microsoft Azure Identity Library for Python
url: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity
rpm_license: MIT License
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-6c563f4a-e574-41b1-87c8-3c7d3afd97d4
location_href: 00009018-python-azure-identity/python-azure-identity-1.12.0-1.src.rpm
checksum_type: sha256
description:
  The Azure Identity library provides [Azure Active Directory (Azure AD)](https://learn.microsoft.com/azure/active-directory/fundamentals/active-directory-whatis) token authentication support across the Azure SDK. It provides a set of [`TokenCredential`](https://learn.microsoft.com/python/api/azure-core/azure.core.credentials.tokencredential?view=azure-python) implementations which can be used to construct Azure SDK clients which support Azure AD token authentication.

  [Source code](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/identity/azure-identity)
  | [Package (PyPI)](https://pypi.org/project/azure-identity/)
  | [API reference documentation][ref_docs]
  | [Azure AD documentation](https://learn.microsoft.com/azure/active-directory/)





  Install Azure Identity with pip:

  ```sh
  pip install azure-identity
  ```



  - an [Azure subscription](https://azure.microsoft.com/free/)
  - Python 3.7 or a recent version of Python 3 (this library doesn't support
    end-of-life versions)



  When debugging and executing code locally it is typical for developers to use
  their own accounts for authenticating calls to Azure services. The Azure
  Identity library supports authenticating through developer tools to simplify
  local development.



  Developers using Visual Studio Code can use the [Azure Account extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.azure-account) to authenticate via the editor. Apps using `DefaultAzureCredential` or `VisualStudioCodeCredential` can then use this account to authenticate calls in their app when running locally.

  To authenticate in Visual Studio Code, ensure the Azure Account extension is installed. Once installed, open the **Command Palette** and run the **Azure: Sign In** command.

  It's a [known issue](https://github.com/Azure/azure-sdk-for-python/issues/23249) that `VisualStudioCodeCredential` doesn't work with [Azure Account extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.azure-account) versions newer than **0.9.11**. A long-term fix to this problem is in progress. In the meantime, consider [authenticating via the Azure CLI](#authenticate-via-the-azure-cli).



  `DefaultAzureCredential` and `AzureCliCredential` can authenticate as the user
  signed in to the [Azure CLI][azure_cli]. To sign in to the Azure CLI, run
  `az login`. On a system with a default web browser, the Azure CLI will launch
  the browser to authenticate a user.

  When no default browser is available, `az login` will use the device code
  authentication flow. This can also be selected manually by running `az login --use-device-code`.





  A credential is a class which contains or can obtain the data needed for a
  service client to authenticate requests. Service clients across the Azure SDK
  accept a credential instance when they are constructed, and use that credential
  to authenticate requests.

  The Azure Identity library focuses on OAuth authentication with Azure AD. It offers a variety of credential classes capable of acquiring
  an Azure AD access token. See the [Credential classes](#credential-classes "Credential classes") section below for a list of
  this library's credential classes.



  `DefaultAzureCredential` is appropriate for most applications which will run in Azure because it combines common production credentials with development credentials. `DefaultAzureCredential` attempts to authenticate via the following mechanisms, in this order, stopping when one succeeds:

  >Note: `DefaultAzureCredential` is intended to simplify getting started with the library by handling common
  >scenarios with reasonable default behaviors. Developers who want more control or whose scenario
  >isn't served by the default settings should use other credential types.

  ![DefaultAzureCredential authentication flow](https://raw.githubusercontent.com/Azure/azure-sdk-for-python/main/sdk/identity/azure-identity/images/mermaidjs/DefaultAzureCredentialAuthFlow.svg)

  1. **Environment** - `DefaultAzureCredential` will read account information specified via [environment variables](#environment-variables "environment variables") and use it to authenticate.
  1. **Managed Identity** - If the application is deployed to an Azure host with Managed Identity enabled, `DefaultAzureCredential` will authenticate with it.
  1. **Azure CLI** - If a user has signed in via the Azure CLI `az login` command, `DefaultAzureCredential` will authenticate as that user.
  1. **Azure PowerShell** - If a user has signed in via Azure PowerShell's `Connect-AzAccount` command, `DefaultAzureCredential` will authenticate as that user.
  1. **Interactive browser** - If enabled, `DefaultAzureCredential` will interactively authenticate a user via the default browser. This is disabled by default.



  Due to a [known issue](https://github.com/Azure/azure-sdk-for-python/issues/23249), `VisualStudioCodeCredential` has been removed from the `DefaultAzureCredential` token chain. When the issue is resolved in a future release, this change will be reverted.



  The following examples are provided below:

  - [Authenticate with DefaultAzureCredential](#authenticate-with-defaultazurecredential "Authenticate with DefaultAzureCredential")
  - [Define a custom authentication flow with ChainedTokenCredential](#define-a-custom-authentication-flow-with-chainedtokencredential "Define a custom authentication flow with ChainedTokenCredential")
  - [Async credentials](#async-credentials "Async credentials")



  More details on configuring your environment to use the `DefaultAzureCredential`
  can be found in the class's [reference documentation][default_cred_ref].

  This example demonstrates authenticating the `BlobServiceClient` from the
  [azure-storage-blob][azure_storage_blob] library using
  `DefaultAzureCredential`.

  ```py
  from azure.identity import DefaultAzureCredential
  from azure.storage.blob import BlobServiceClient

  default_credential = DefaultAzureCredential()

  client = BlobServiceClient(account_url, credential=default_credential)
  ```



  Interactive authentication is disabled in the `DefaultAzureCredential` by
  default and can be enabled with a keyword argument:

  ```py
  DefaultAzureCredential(exclude_interactive_browser_credential=False)
  ```

  When enabled, `DefaultAzureCredential` falls back to interactively
  authenticating via the system's default web browser when no other credential is
  available.



  Many Azure hosts allow the assignment of a user assigned managed identity. To
  configure `DefaultAzureCredential` to authenticate a user assigned identity,
  use the `managed_identity_client_id` keyword argument:

  ```py
  DefaultAzureCredential(managed_identity_client_id=client_id)
  ```

  Alternatively, set the environment variable `AZURE_CLIENT_ID` to the identity's
  client ID.



  `DefaultAzureCredential` is generally the quickest way to get started developing
  applications for Azure. For more advanced scenarios,
  [ChainedTokenCredential][chain_cred_ref] links multiple credential instances
  to be tried sequentially when authenticating. It will try each chained
  credential in turn until one provides a token or fails to authenticate due to
  an error.

  The following example demonstrates creating a credential which will attempt to
  authenticate using managed identity, and fall back to authenticating via the
  Azure CLI when a managed identity is unavailable. This example uses the
  `EventHubProducerClient` from the [azure-eventhub][azure_eventhub] client library.

  ```py
  from azure.eventhub import EventHubProducerClient
  from azure.identity import AzureCliCredential, ChainedTokenCredential, ManagedIdentityCredential

  managed_identity = ManagedIdentityCredential()
  azure_cli = AzureCliCredential()
  credential_chain = ChainedTokenCredential(managed_identity, azure_cli)

  client = EventHubProducerClient(namespace, eventhub_name, credential_chain)
  ```



  This library includes a set of async APIs. To use the async
  credentials in [azure.identity.aio][ref_docs_aio], you must first install an
  async transport, such as [aiohttp](https://pypi.org/project/aiohttp/). See
  [azure-core documentation][azure_core_transport_doc] for more information.

  Async credentials should be closed when they're no longer needed. Each async
  credential is an async context manager and defines an async `close` method. For
  example:

  ```py
  from azure.identity.aio import DefaultAzureCredential


  credential = DefaultAzureCredential()
  ...
  await credential.close()


  credential = DefaultAzureCredential()
  async with credential:
    ...
  ```

  This example demonstrates authenticating the asynchronous `SecretClient` from
  [azure-keyvault-secrets][azure_keyvault_secrets] with an asynchronous
  credential.

  ```py
  from azure.identity.aio import DefaultAzureCredential
  from azure.keyvault.secrets.aio import SecretClient

  default_credential = DefaultAzureCredential()
  client = SecretClient("https://my-vault.vault.azure.net", default_credential)
  ```



  [Managed identity authentication](https://learn.microsoft.com/azure/active-directory/managed-identities-azure-resources/overview) is supported via either the `DefaultAzureCredential` or the `ManagedIdentityCredential` directly for the following Azure services:

  * [Azure App Service and Azure Functions](https://learn.microsoft.com/azure/app-service/overview-managed-identity?tabs=python)
  * [Azure Arc](https://learn.microsoft.com/azure/azure-arc/servers/managed-identity-authentication)
  * [Azure Cloud Shell](https://learn.microsoft.com/azure/cloud-shell/msi-authorization)
  * [Azure Kubernetes Service](https://learn.microsoft.com/azure/aks/use-managed-identity)
  * [Azure Service Fabric](https://learn.microsoft.com/azure/service-fabric/concepts-managed-identity)
  * [Azure Virtual Machines](https://learn.microsoft.com/azure/active-directory/managed-identities-azure-resources/how-to-use-vm-token)
  * [Azure Virtual Machines Scale Sets](https://learn.microsoft.com/azure/active-directory/managed-identities-azure-resources/qs-configure-powershell-windows-vmss)





  ```py
  from azure.identity import ManagedIdentityCredential
  from azure.keyvault.secrets import SecretClient

  credential = ManagedIdentityCredential(client_id=managed_identity_client_id)
  client = SecretClient("https://my-vault.vault.azure.net", credential)
  ```



  ```py
  from azure.identity import ManagedIdentityCredential
  from azure.keyvault.secrets import SecretClient

  credential = ManagedIdentityCredential()
  client = SecretClient("https://my-vault.vault.azure.net", credential)
  ```


  Credentials default to authenticating to the Azure AD endpoint for
  Azure Public Cloud. To access resources in other clouds, such as Azure Government
  or a private cloud, configure credentials with the `authority` argument.
  [AzureAuthorityHosts](https://aka.ms/azsdk/python/identity/docs#azure.identity.AzureAuthorityHosts)
  defines authorities for well-known clouds:
  ```py
  from azure.identity import AzureAuthorityHosts

  DefaultAzureCredential(authority=AzureAuthorityHosts.AZURE_GOVERNMENT)
  ```
  Not all credentials require this configuration. Credentials which authenticate
  through a development tool, such as `AzureCliCredential`, use that tool's
  configuration. Similarly, `VisualStudioCodeCredential` accepts an `authority`
  argument but defaults to the authority matching VS Code's "Azure: Cloud" setting.





  |Credential|Usage
  |-|-
  |[`DefaultAzureCredential`][default_cred_ref]| Provides a simplified authentication experience to quickly start developing applications run in Azure.
  |[`ChainedTokenCredential`][chain_cred_ref]| Allows users to define custom authentication flows composing multiple credentials.
  |[`EnvironmentCredential`][environment_cred_ref]| Authenticates a service principal or user via credential information specified in environment variables.
  |[`ManagedIdentityCredential`][managed_id_cred_ref]| Authenticates the managed identity of an Azure resource.



  |Credential|Usage|Reference
  |-|-|-
  |[`CertificateCredential`][cert_cred_ref]| Authenticates a service principal using a certificate. | [Service principal authentication](https://learn.microsoft.com/azure/active-directory/develop/app-objects-and-service-principals)
  |[`ClientAssertionCredential`][client_assertion_cred_ref]| Authenticates a service principal using a signed client assertion. |
  |[`ClientSecretCredential`][client_secret_cred_ref]| Authenticates a service principal using a secret. | [Service principal authentication](https://learn.microsoft.com/azure/active-directory/develop/app-objects-and-service-principals)



  |Credential|Usage|Reference
  |-|-|-
  |[`AuthorizationCodeCredential`][auth_code_cred_ref]| Authenticates a user with a previously obtained authorization code. | [OAuth2 authentication code](https://learn.microsoft.com/azure/active-directory/develop/v2-oauth2-auth-code-flow)
  |[`DeviceCodeCredential`][device_code_cred_ref]| Interactively authenticates a user on devices with limited UI. | [Device code authentication](https://learn.microsoft.com/azure/active-directory/develop/v2-oauth2-device-code)
  |[`InteractiveBrowserCredential`][interactive_cred_ref]| Interactively authenticates a user with the default system browser. | [OAuth2 authentication code](https://learn.microsoft.com/azure/active-directory/develop/v2-oauth2-auth-code-flow)
  |[`OnBehalfOfCredential`][obo_cred_ref]| Propagates the delegated user identity and permissions through the request chain. | [On-behalf-of authentication](https://learn.microsoft.com/azure/active-directory/develop/v2-oauth2-on-behalf-of-flow)
  |[`UsernamePasswordCredential`][userpass_cred_ref]| Authenticates a user with a username and password (does not support multi-factor authentication). |  [Username + password authentication](https://learn.microsoft.com/azure/active-directory/develop/v2-oauth-ropc)



  |Credential|Usage|Reference
  |-|-|-
  |[`AzureCliCredential`][cli_cred_ref]| Authenticates in a development environment with the Azure CLI. | [Azure CLI authentication](https://learn.microsoft.com/cli/azure/authenticate-azure-cli)
  |[`PowerShellCredential`][powershell_cred_ref]| Authenticates in a development environment with the Azure PowerShell. | [Azure PowerShell authentication](https://learn.microsoft.com/powershell/azure/authenticate-azureps)
  |[`VisualStudioCodeCredential`][vscode_cred_ref]| Authenticates as the user signed in to the Visual Studio Code Azure Account extension. | [VS Code Azure Account extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.azure-account)



  [DefaultAzureCredential][default_cred_ref] and
  [EnvironmentCredential][environment_cred_ref] can be configured with
  environment variables. Each type of authentication requires values for specific
  variables:


  |Variable name|Value
  |-|-
  |`AZURE_CLIENT_ID`|ID of an Azure AD application
  |`AZURE_TENANT_ID`|ID of the application's Azure AD tenant
  |`AZURE_CLIENT_SECRET`|one of the application's client secrets


  |Variable name|Value
  |-|-
  |`AZURE_CLIENT_ID`|ID of an Azure AD application
  |`AZURE_TENANT_ID`|ID of the application's Azure AD tenant
  |`AZURE_CLIENT_CERTIFICATE_PATH`|path to a PEM or PKCS12 certificate file including private key
  |`AZURE_CLIENT_CERTIFICATE_PASSWORD`|password of the certificate file, if any


  |Variable name|Value
  |-|-
  |`AZURE_CLIENT_ID`|ID of an Azure AD application
  |`AZURE_USERNAME`|a username (usually an email address)
  |`AZURE_PASSWORD`|that user's password

  Configuration is attempted in the above order. For example, if values for a
  client secret and certificate are both present, the client secret will be used.



  See the [troubleshooting guide][troubleshooting_guide] for details on how to diagnose various failure scenarios.



  Credentials raise `CredentialUnavailableError` when they're unable to attempt
  authentication because they lack required data or state. For example,
  [EnvironmentCredential][environment_cred_ref] will raise this exception when
  [its configuration](#environment-variables "its configuration") is incomplete.

  Credentials raise `azure.core.exceptions.ClientAuthenticationError` when they fail
  to authenticate. `ClientAuthenticationError` has a `message` attribute which
  describes why authentication failed. When raised by
  `DefaultAzureCredential` or `ChainedTokenCredential`,
  the message collects error messages from each credential in the chain.

  For more details on handling specific Azure AD errors, see the Azure AD [error code documentation](https://learn.microsoft.com/azure/active-directory/develop/reference-aadsts-error-codes).



  This library uses the standard
  [logging](https://docs.python.org/3/library/logging.html) library for logging.
  Credentials log basic information, including HTTP sessions (URLs, headers, etc.) at INFO level. These log entries do not contain authentication secrets.

  Detailed DEBUG level logging, including request/response bodies and header values, is not enabled by default. It can be enabled with the `logging_enable` argument, for example:

  ```py
  credential = DefaultAzureCredential(logging_enable=True)
  ```

  > CAUTION: DEBUG level logs from credentials contain sensitive information.
  > These logs must be protected to avoid compromising account security.





  Client and management libraries listed on the
  [Azure SDK release page](https://azure.github.io/azure-sdk/releases/latest/python.html)
  which support Azure AD authentication accept credentials from this library. You can learn more
  about using these libraries in their documentation, which is linked from the release page.



  This library doesn't support [Azure AD B2C][b2c].

  For other open issues, refer to the library's [GitHub repository](https://github.com/Azure/azure-sdk-for-python/issues?q=is%3Aopen+is%3Aissue+label%3AAzure.Identity).



  If you encounter bugs or have suggestions, please
  [open an issue](https://github.com/Azure/azure-sdk-for-python/issues).



  This 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](https://cla.microsoft.com).

  When 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.

  This 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.

  [auth_code_cred_ref]: https://aka.ms/azsdk/python/identity/authorizationcodecredential
  [azure_appconfiguration]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/appconfiguration/azure-appconfiguration
  [azure_cli]: https://learn.microsoft.com/cli/azure
  [azure_core_transport_doc]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md#transport
  [azure_eventhub]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventhub/azure-eventhub
  [azure_keyvault_certificates]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk//keyvault/azure-keyvault-certificates
  [azure_keyvault_keys]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/keyvault/azure-keyvault-keys
  [azure_keyvault_secrets]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/keyvault/azure-keyvault-secrets
  [azure_storage_blob]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/storage/azure-storage-blob
  [azure_storage_queue]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/storage/azure-storage-queue
  [b2c]: https://learn.microsoft.com/azure/active-directory-b2c/overview
  [cert_cred_ref]: https://aka.ms/azsdk/python/identity/certificatecredential
  [chain_cred_ref]: https://aka.ms/azsdk/python/identity/chainedtokencredential
  [cli_cred_ref]: https://aka.ms/azsdk/python/identity/azclicredential
  [client_assertion_cred_ref]: https://aka.ms/azsdk/python/identity/clientassertioncredential
  [client_secret_cred_ref]: https://aka.ms/azsdk/python/identity/clientsecretcredential
  [default_cred_ref]: https://aka.ms/azsdk/python/identity/defaultazurecredential
  [device_code_cred_ref]: https://aka.ms/azsdk/python/identity/devicecodecredential
  [environment_cred_ref]: https://aka.ms/azsdk/python/identity/environmentcredential
  [interactive_cred_ref]: https://aka.ms/azsdk/python/identity/interactivebrowsercredential
  [managed_id_cred_ref]: https://aka.ms/azsdk/python/identity/managedidentitycredential
  [obo_cred_ref]: https://aka.ms/azsdk/python/identity/onbehalfofcredential
  [powershell_cred_ref]: https://aka.ms/azsdk/python/identity/powershellcredential
  [ref_docs]: https://aka.ms/azsdk/python/identity/docs
  [ref_docs_aio]: https://aka.ms/azsdk/python/identity/aio/docs
  [troubleshooting_guide]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/identity/azure-identity/TROUBLESHOOTING.md
  [userpass_cred_ref]: https://aka.ms/azsdk/python/identity/usernamepasswordcredential
  [vscode_cred_ref]: https://aka.ms/azsdk/python/identity/vscodecredential

  ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fsdk%2Fidentity%2Fazure-identity%2FREADME.png)








  - `AzureCliCredential` now works even when `az` prints warnings to stderr. ([#26857](https://github.com/Azure/azure-sdk-for-python/issues/26857)) (thanks to @micromaomao for the contribution)
  - Fixed issue where user-supplied `TokenCachePersistenceOptions` weren't propagated when using `SharedTokenCacheCredential` ([#26982](https://github.com/Azure/azure-sdk-for-python/issues/26982))



  - Excluded `VisualStudioCodeCredential` from `DefaultAzureCredential` token chain by default as SDK
    authentication via Visual Studio Code is broken due to
    issue [#23249](https://github.com/Azure/azure-sdk-for-python/issues/23249). The `VisualStudioCodeCredential` will be
    re-enabled in the `DefaultAzureCredential` flow once a fix is in place.
    Issue [#25713](https://github.com/Azure/azure-sdk-for-python/issues/25713) tracks this. In the meantime
    Visual Studio Code users can authenticate their development environment using the [Azure CLI](https://learn.microsoft.com/cli/azure/).



  - Added Python 3.11 support and stopped supporting Python 3.6.



  1.12.0 release candidate





  - Added ability to specify `tenant_id` for `AzureCliCredential` & `AzurePowerShellCredential` (thanks @tikicoder)    ([#25207](https://github.com/Azure/azure-sdk-for-python/pull/25207))
  - Removed `VisualStudioCodeCredential` from `DefaultAzureCredential` token chain. ([#23249](https://github.com/Azure/azure-sdk-for-python/issues/23249))
  - `EnvironmentCredential` added `AZURE_CLIENT_CERTIFICATE_PASSWORD` support for the cert password    ([#24652](https://github.com/Azure/azure-sdk-for-python/issues/24652))
  - Added `validate_authority` support for msal client  ([#22625](https://github.com/Azure/azure-sdk-for-python/issues/22625))





  - Added `additionally_allowed_tenants` to the following credential options to force explicit opt-in behavior for multi-tenant authentication:
    - `AuthorizationCodeCredential`
    - `AzureCliCredential`
    - `AzurePowerShellCredential`
    - `CertificateCredential`
    - `ClientAssertionCredential`
    - `ClientSecretCredential`
    - `DefaultAzureCredential`
    - `OnBehalfOfCredential`
    - `UsernamePasswordCredential`
    - `VisualStudioCodeCredential`



  - Credential types supporting multi-tenant authentication will now throw `ClientAuthenticationError` if the requested tenant ID doesn't match the credential's tenant ID, and is not included in `additionally_allowed_tenants`. Applications must now explicitly add additional tenants to the `additionally_allowed_tenants` list, or add '*' to list, to enable acquiring tokens from tenants other than the originally specified tenant ID.

  More information on this change and the consideration behind it can be found [here](https://aka.ms/azsdk/blog/multi-tenant-guidance).

  - These beta features in 1.11.0b3 have been removed from this release and will be added back in 1.12.0b1
    - `tenant_id` for `AzureCliCredential`
    - removed `VisualStudioCodeCredential` from `DefaultAzureCredential` token chain
    - `AZURE_CLIENT_CERTIFICATE_PASSWORD` support for `EnvironmentCredential`
    - `validate_authority` support



  Azure-identity 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).



  - Added ability to specify `tenant_id` for `AzureCliCredential` (thanks @tikicoder)    ([#25207](https://github.com/Azure/azure-sdk-for-python/pull/25207))



  - Removed `VisualStudioCodeCredential` from `DefaultAzureCredential` token chain. ([#23249](https://github.com/Azure/azure-sdk-for-python/issues/23249))





  - `EnvironmentCredential` added `AZURE_CLIENT_CERTIFICATE_PASSWORD` support for the cert password    ([#24652](https://github.com/Azure/azure-sdk-for-python/issues/24652))



  - Fixed the issue that failed to parse PEM certificate if it does not start with "-----"    ([#24643](https://github.com/Azure/azure-sdk-for-python/issues/24643))





  - Added `validate_authority` support for msal client  ([#22625](https://github.com/Azure/azure-sdk-for-python/issues/22625))





  > These changes do not impact the API of stable versions such as 1.9.0.
  > Only code written against a beta version such as 1.10.0b1 may be affected.
  - `validate_authority` support is not available in 1.10.0.



  - Supported msal-extensions version 1.0.0    ([#23927](https://github.com/Azure/azure-sdk-for-python/issues/23927))





  - Added `validate_authority` support for msal client  ([#22625](https://github.com/Azure/azure-sdk-for-python/issues/22625))





  - Added PII logging if logging.DEBUG is enabled.    ([#23203](https://github.com/Azure/azure-sdk-for-python/issues/23203))



  > These changes do not impact the API of stable versions such as 1.8.0.
  > Only code written against a beta version such as 1.9.0b1 may be affected.
  - `validate_authority` support is not available in 1.9.0.



  - Added check on `content` from msal response.    ([#23483](https://github.com/Azure/azure-sdk-for-python/issues/23483))
  - Fixed the issue that async OBO credential does not refresh correctly.    ([#21981](https://github.com/Azure/azure-sdk-for-python/issues/21981))



  - Removed `resource_id`, please use `identity_config` instead.
  - Renamed argument name `get_assertion` to `func` for `ClientAssertionCredential`.





  - Added `validate_authority` support for msal client  ([#22625](https://github.com/Azure/azure-sdk-for-python/issues/22625))
  - Added `resource_id` support for user-assigned managed identity  ([#22329](https://github.com/Azure/azure-sdk-for-python/issues/22329))
  - Added `ClientAssertionCredential` support  ([#22328](https://github.com/Azure/azure-sdk-for-python/issues/22328))
  - Updated App service API version to "2019-08-01" ([#23034](https://github.com/Azure/azure-sdk-for-python/issues/23034))





  - Handle injected "tenant_id" and "claims" ([#23138](https://github.com/Azure/azure-sdk-for-python/issues/23138))

    "tenant_id" argument in get_token() method is only supported by:

    - `AuthorizationCodeCredential`
    - `AzureCliCredential`
    - `AzurePowerShellCredential`
    - `InteractiveBrowserCredential`
    - `DeviceCodeCredential`
    - `EnvironmentCredential`
    - `UsernamePasswordCredential`

     it is ignored by other types of credentials.



  - Python 2.7 is no longer supported. Please use Python version 3.6 or later.





  - Fix multi-tenant auth using async AadClient ([#21289](https://github.com/Azure/azure-sdk-for-python/issues/21289))




  > These changes do not impact the API of stable versions such as 1.6.0.
  > Only code written against a beta version such as 1.7.0b1 may be affected.

  - The `allow_multitenant_authentication` argument has been removed and the default behavior is now as if it were true.
    The multitenant authentication feature can be totally disabled by setting the environment variable
    `AZURE_IDENTITY_DISABLE_MULTITENANTAUTH` to `True`.
  - `azure.identity.RegionalAuthority` is removed.
  - `regional_authority` argument is removed for `CertificateCredential` and `ClientSecretCredential`.
  - `AzureApplicationCredential` is removed.
  - `client_credential` in the ctor of `OnBehalfOfCredential` is removed. Please use `client_secret` or `client_certificate` instead.
  - Make `user_assertion` in the ctor of `OnBehalfOfCredential` a keyword only argument.




  - `CertificateCredential` accepts certificates in PKCS12 format
    ([#13540](https://github.com/Azure/azure-sdk-for-python/issues/13540))
  - `OnBehalfOfCredential` supports the on-behalf-of authentication flow for
    accessing resources on behalf of users
    ([#19308](https://github.com/Azure/azure-sdk-for-python/issues/19308))
  - `DefaultAzureCredential` allows specifying the client ID of interactive browser via keyword argument `interactive_browser_client_id`
    ([#20487](https://github.com/Azure/azure-sdk-for-python/issues/20487))


  - Added context manager methods and `close()` to credentials in the
    `azure.identity` namespace. At the end of a `with` block, or when `close()`
    is called, these credentials close their underlying transport sessions.
    ([#18798](https://github.com/Azure/azure-sdk-for-python/issues/18798))





  - Persistent cache implementations are now loaded on demand, enabling
    workarounds when importing transitive dependencies such as pywin32
    fails
    ([#19989](https://github.com/Azure/azure-sdk-for-python/issues/19989))





  > These changes do not impact the API of stable versions such as 1.6.0.
  > Only code written against a beta version such as 1.7.0b1 may be affected.
  - Renamed `AZURE_POD_IDENTITY_TOKEN_URL` to `AZURE_POD_IDENTITY_AUTHORITY_HOST`.
    The value should now be a host, for example "http://169.254.169.254" (the
    default).


  - Fixed import of `azure.identity.aio.AzureApplicationCredential`
    ([#19943](https://github.com/Azure/azure-sdk-for-python/issues/19943))


  - Added `CustomHookPolicy` to credential HTTP pipelines. This allows applications
    to initialize credentials with `raw_request_hook` and `raw_response_hook`
    keyword arguments. The value of these arguments should be a callback taking a
    `PipelineRequest` and `PipelineResponse`, respectively. For example:
    `ManagedIdentityCredential(raw_request_hook=lambda request: print(request.http_request.url))`
  - Reduced redundant `ChainedTokenCredential` and `DefaultAzureCredential`
    logging. On Python 3.7+, credentials invoked by these classes now log debug
    rather than info messages.
    ([#18972](https://github.com/Azure/azure-sdk-for-python/issues/18972))
  - Persistent cache implementations are now loaded on demand, enabling
    workarounds when importing transitive dependencies such as pywin32
    fails
    ([#19989](https://github.com/Azure/azure-sdk-for-python/issues/19989))




  - `InteractiveBrowserCredential` keyword argument `login_hint` enables
    pre-filling the username/email address field on the login page
    ([#19225](https://github.com/Azure/azure-sdk-for-python/issues/19225))
  - `AzureApplicationCredential`, a default credential chain for applications
    deployed to Azure
    ([#19309](https://github.com/Azure/azure-sdk-for-python/issues/19309))


  - `azure.identity.aio.ManagedIdentityCredential` is an async context manager
    that closes its underlying transport session at the end of a `with` block


  - Most credentials can use tenant ID values returned from authentication
    challenges, enabling them to request tokens from the correct tenant. This
    behavior is optional and controlled by a new keyword argument,
    `allow_multitenant_authentication`.
    ([#19300](https://github.com/Azure/azure-sdk-for-python/issues/19300))
    - When `allow_multitenant_authentication` is False, which is the default, a
      credential will raise `ClientAuthenticationError` when its configured tenant
      doesn't match the tenant specified for a token request. This may be a
      different exception than was raised by prior versions of the credential. To
      maintain the prior behavior, set environment variable
      AZURE_IDENTITY_ENABLE_LEGACY_TENANT_SELECTION to "True".
  - `CertificateCredential` and `ClientSecretCredential` support regional STS
    on Azure VMs by either keyword argument `regional_authority` or environment
    variable `AZURE_REGIONAL_AUTHORITY_NAME`. See `azure.identity.RegionalAuthority`
    for possible values.
    ([#19301](https://github.com/Azure/azure-sdk-for-python/issues/19301))
  - Upgraded minimum `azure-core` version to 1.11.0 and minimum `msal` version to
    1.12.0
  - After IMDS authentication fails, `ManagedIdentityCredential` raises consistent
    error messages and uses `raise from` to propagate inner exceptions
    ([#19423](https://github.com/Azure/azure-sdk-for-python/pull/19423))


  Beginning with this release, this library requires Python 2.7 or 3.6+.


  - `VisualStudioCodeCredential` gets its default tenant and authority
    configuration from VS Code user settings
    ([#14808](https://github.com/Azure/azure-sdk-for-python/issues/14808))


  This is the last version to support Python 3.5. The next version will require
  Python 2.7 or 3.6+.


  - `AzurePowerShellCredential` authenticates as the identity logged in to Azure
    PowerShell. This credential is part of `DefaultAzureCredential` by default
    but can be disabled by a keyword argument:
    `DefaultAzureCredential(exclude_powershell_credential=True)`
    ([#17341](https://github.com/Azure/azure-sdk-for-python/issues/17341))


  - `AzureCliCredential` raises `CredentialUnavailableError` when the CLI times out,
    and kills timed out subprocesses
  - Reduced retry delay for `ManagedIdentityCredential` on Azure VMs



  > These changes do not impact the API of stable versions such as 1.5.0.
  > Only code written against a beta version such as 1.6.0b1 may be affected.
  - Removed property `AuthenticationRequiredError.error_details`


  - Credentials consistently retry token requests after connection failures, or
    when instructed to by a Retry-After header
  - ManagedIdentityCredential caches tokens correctly


  - `InteractiveBrowserCredential` functions in more WSL environments
    ([#17615](https://github.com/Azure/azure-sdk-for-python/issues/17615))



  > These changes do not impact the API of stable versions such as 1.5.0.
  > Only code written against a beta version such as 1.6.0b1 may be affected.
  - Renamed `CertificateCredential` keyword argument `certificate_bytes` to
    `certificate_data`
  - Credentials accepting keyword arguments `allow_unencrypted_cache` and
    `enable_persistent_cache` to configure persistent caching accept a
    `cache_persistence_options` argument instead whose value should be an
    instance of `TokenCachePersistenceOptions`. For example:
    ```
    
    DeviceCodeCredential(enable_persistent_cache=True, allow_unencrypted_cache=True)

    
    cache_options = TokenCachePersistenceOptions(allow_unencrypted_storage=True)
    DeviceCodeCredential(cache_persistence_options=cache_options)
    ```

    See the documentation and samples for more details.


  - New class `TokenCachePersistenceOptions` configures persistent caching
  - The `AuthenticationRequiredError.claims` property provides any additional
    claims required by a user credential's `authenticate()` method



  - Raised minimum msal version to 1.7.0
  - Raised minimum six version to 1.12.0


  - `InteractiveBrowserCredential` uses PKCE internally to protect authorization
    codes
  - `CertificateCredential` can load a certificate from bytes instead of a file
    path. To provide a certificate as bytes, use the keyword argument
    `certificate_bytes` instead of `certificate_path`, for example:
    `CertificateCredential(tenant_id, client_id, certificate_bytes=cert_bytes)`
    ([#14055](https://github.com/Azure/azure-sdk-for-python/issues/14055))
  - User credentials support Continuous Access Evaluation (CAE)
  - Application authentication APIs from 1.5.0b2


  - `ManagedIdentityCredential` correctly parses responses from the current
    (preview) version of Azure ML managed identity
    ([#15361](https://github.com/Azure/azure-sdk-for-python/issues/15361))



  - Renamed optional `CertificateCredential` keyword argument `send_certificate`
    (added in 1.5.0b1) to `send_certificate_chain`
  - Removed user authentication APIs added in prior betas. These will be
    reintroduced in 1.6.0b1. Passing the keyword arguments below
    generally won't cause a runtime error, but the arguments have no effect.
    ([#14601](https://github.com/Azure/azure-sdk-for-python/issues/14601))
    - Removed `authenticate` method from `DeviceCodeCredential`,
      `InteractiveBrowserCredential`, and `UsernamePasswordCredential`
    - Removed `allow_unencrypted_cache` and `enable_persistent_cache` keyword
      arguments from `CertificateCredential`, `ClientSecretCredential`,
      `DeviceCodeCredential`, `InteractiveBrowserCredential`, and
      `UsernamePasswordCredential`
    - Removed `disable_automatic_authentication` keyword argument from
      `DeviceCodeCredential` and `InteractiveBrowserCredential`
    - Removed `allow_unencrypted_cache` keyword argument from
      `SharedTokenCacheCredential`
    - Removed classes `AuthenticationRecord` and `AuthenticationRequiredError`
  - Removed `identity_config` keyword argument from `ManagedIdentityCredential`
    (was added in 1.5.0b1)


  - `DeviceCodeCredential` parameter `client_id` is now optional. When not
     provided, the credential will authenticate users to an Azure development
     application.
     ([#14354](https://github.com/Azure/azure-sdk-for-python/issues/14354))
  - Credentials raise `ValueError` when constructed with tenant IDs containing
    invalid characters
    ([#14821](https://github.com/Azure/azure-sdk-for-python/issues/14821))
  - Raised minimum msal version to 1.6.0


  - `ManagedIdentityCredential` supports Service Fabric
    ([#12705](https://github.com/Azure/azure-sdk-for-python/issues/12705))
    and Azure Arc
    ([#12702](https://github.com/Azure/azure-sdk-for-python/issues/12702))


  - Prevent `VisualStudioCodeCredential` using invalid authentication data when
    no user is signed in to Visual Studio Code
    ([#14438](https://github.com/Azure/azure-sdk-for-python/issues/14438))
  - `ManagedIdentityCredential` uses the API version supported by Azure Functions
    on Linux consumption hosting plans
    ([#14670](https://github.com/Azure/azure-sdk-for-python/issues/14670))
  - `InteractiveBrowserCredential.get_token()` raises a clearer error message when
    it times out waiting for a user to authenticate on Python 2.7
    ([#14773](https://github.com/Azure/azure-sdk-for-python/pull/14773))



  - `AzureCliCredential.get_token` correctly sets token expiration time,
    preventing clients from using expired tokens
    ([#14345](https://github.com/Azure/azure-sdk-for-python/issues/14345))


  - Adopted msal-extensions 0.3.0
  ([#13107](https://github.com/Azure/azure-sdk-for-python/issues/13107))



  - `AzureCliCredential.get_token` correctly sets token expiration time,
    preventing clients from using expired tokens
    ([#14345](https://github.com/Azure/azure-sdk-for-python/issues/14345))



  - Application authentication APIs from 1.4.0b7
  - `ManagedIdentityCredential` supports the latest version of App Service
    ([#11346](https://github.com/Azure/azure-sdk-for-python/issues/11346))
  - `DefaultAzureCredential` allows specifying the client ID of a user-assigned
    managed identity via keyword argument `managed_identity_client_id`
    ([#12991](https://github.com/Azure/azure-sdk-for-python/issues/12991))
  - `CertificateCredential` supports Subject Name/Issuer authentication when
    created with `send_certificate=True`. The async `CertificateCredential`
    (`azure.identity.aio.CertificateCredential`) will support this in a
    future version.
    ([#10816](https://github.com/Azure/azure-sdk-for-python/issues/10816))
  - Credentials in `azure.identity` support ADFS authorities, excepting
    `VisualStudioCodeCredential`. To configure a credential for this, configure
    the credential with `authority` and `tenant_id="adfs"` keyword arguments, for
    example
    `ClientSecretCredential(authority="<your ADFS URI>", tenant_id="adfs")`.
    Async credentials (those in `azure.identity.aio`) will support ADFS in a
    future release.
    ([#12696](https://github.com/Azure/azure-sdk-for-python/issues/12696))
  - `InteractiveBrowserCredential` keyword argument `redirect_uri` enables
    authentication with a user-specified application having a custom redirect URI
    ([#13344](https://github.com/Azure/azure-sdk-for-python/issues/13344))


  - Removed `authentication_record` keyword argument from the async
    `SharedTokenCacheCredential`, i.e. `azure.identity.aio.SharedTokenCacheCredential`



  - `DefaultAzureCredential` uses the value of environment variable
  `AZURE_CLIENT_ID` to configure a user-assigned managed identity.
  ([#10931](https://github.com/Azure/azure-sdk-for-python/issues/10931))


  - Renamed `VSCodeCredential` to `VisualStudioCodeCredential`
  - Removed application authentication APIs added in 1.4.0 beta versions. These
    will be reintroduced in 1.5.0b1. Passing the keyword arguments below
    generally won't cause a runtime error, but the arguments have no effect.
    - Removed `authenticate` method from `DeviceCodeCredential`,
      `InteractiveBrowserCredential`, and `UsernamePasswordCredential`
    - Removed `allow_unencrypted_cache` and `enable_persistent_cache` keyword
      arguments from `CertificateCredential`, `ClientSecretCredential`,
      `DeviceCodeCredential`, `InteractiveBrowserCredential`, and
      `UsernamePasswordCredential`
    - Removed `disable_automatic_authentication` keyword argument from
      `DeviceCodeCredential` and `InteractiveBrowserCredential`
    - Removed `allow_unencrypted_cache` keyword argument from
      `SharedTokenCacheCredential`
    - Removed classes `AuthenticationRecord` and `AuthenticationRequiredError`
    - Removed `identity_config` keyword argument from `ManagedIdentityCredential`


  - `DefaultAzureCredential` has a new optional keyword argument,
  `visual_studio_code_tenant_id`, which sets the tenant the credential should
  authenticate in when authenticating as the Azure user signed in to Visual
  Studio Code.
  - Renamed `AuthenticationRecord.deserialize` positional parameter `json_string`
  to `data`.



  - `AzureCliCredential` no longer raises an exception due to unexpected output
    from the CLI when run by PyCharm (thanks @NVolcz)
    ([#11362](https://github.com/Azure/azure-sdk-for-python/pull/11362))
  - Upgraded minimum `msal` version to 1.3.0
  - The async `AzureCliCredential` correctly invokes `/bin/sh`
    ([#12048](https://github.com/Azure/azure-sdk-for-python/issues/12048))


  - Prevent an error on importing `AzureCliCredential` on Windows caused by a bug
    in old versions of Python 3.6 (this bug was fixed in Python 3.6.5).
    ([#12014](https://github.com/Azure/azure-sdk-for-python/issues/12014))
  - `SharedTokenCacheCredential.get_token` raises `ValueError` instead of
    `ClientAuthenticationError` when called with no scopes.
    ([#11553](https://github.com/Azure/azure-sdk-for-python/issues/11553))


  - `ManagedIdentityCredential` can configure a user-assigned identity using any
    identifier supported by the current hosting environment. To specify an
    identity by its client ID, continue using the `client_id` argument. To
    specify an identity by any other ID, use the `identity_config` argument,
    for example: `ManagedIdentityCredential(identity_config={"object_id": ".."})`
    ([#10989](https://github.com/Azure/azure-sdk-for-python/issues/10989))
  - `CertificateCredential` and `ClientSecretCredential` can optionally store
    access tokens they acquire in a persistent cache. To enable this, construct
    the credential with `enable_persistent_cache=True`. On Linux, the persistent
    cache requires libsecret and `pygobject`. If these are unavailable or
    unusable (e.g. in an SSH session), loading the persistent cache will raise an
    error. You may optionally configure the credential to fall back to an
    unencrypted cache by constructing it with keyword argument
    `allow_unencrypted_cache=True`.
    ([#11347](https://github.com/Azure/azure-sdk-for-python/issues/11347))
  - `AzureCliCredential` raises `CredentialUnavailableError` when no user is
    logged in to the Azure CLI.
    ([#11819](https://github.com/Azure/azure-sdk-for-python/issues/11819))
  - `AzureCliCredential` and `VSCodeCredential`, which enable authenticating as
    the identity signed in to the Azure CLI and Visual Studio Code, respectively,
    can be imported from `azure.identity` and `azure.identity.aio`.
  - `azure.identity.aio.AuthorizationCodeCredential.get_token()` no longer accepts
    optional keyword arguments `executor` or `loop`. Prior versions of the method
    didn't use these correctly, provoking exceptions, and internal changes in this
    version have made them obsolete.
  - `InteractiveBrowserCredential` raises `CredentialUnavailableError` when it
    can't start an HTTP server on `localhost`.
    ([#11665](https://github.com/Azure/azure-sdk-for-python/pull/11665))
  - When constructing `DefaultAzureCredential`, you can now configure a tenant ID
    for `InteractiveBrowserCredential`. When none is specified, the credential
    authenticates users in their home tenants. To specify a different tenant, use
    the keyword argument `interactive_browser_tenant_id`, or set the environment
    variable `AZURE_TENANT_ID`.
    ([#11548](https://github.com/Azure/azure-sdk-for-python/issues/11548))
  - `SharedTokenCacheCredential` can be initialized with an `AuthenticationRecord`
    provided by a user credential.
    ([#11448](https://github.com/Azure/azure-sdk-for-python/issues/11448))
  - The user authentication API added to `DeviceCodeCredential` and
    `InteractiveBrowserCredential` in 1.4.0b3 is available on
    `UsernamePasswordCredential` as well.
    ([#11449](https://github.com/Azure/azure-sdk-for-python/issues/11449))
  - The optional persistent cache for `DeviceCodeCredential` and
    `InteractiveBrowserCredential` added in 1.4.0b3 is now available on Linux and
    macOS as well as Windows.
    ([#11134](https://github.com/Azure/azure-sdk-for-python/issues/11134))
    - On Linux, the persistent cache requires libsecret and `pygobject`. If these
      are unavailable, or libsecret is unusable (e.g. in an SSH session), loading
      the persistent cache will raise an error. You may optionally configure the
      credential to fall back to an unencrypted cache by constructing it with
      keyword argument `allow_unencrypted_cache=True`.


  - `EnvironmentCredential` correctly initializes `UsernamePasswordCredential`
  with the value of `AZURE_TENANT_ID`
  ([#11127](https://github.com/Azure/azure-sdk-for-python/pull/11127))
  - Values for the constructor keyword argument `authority` and
  `AZURE_AUTHORITY_HOST` may optionally specify an "https" scheme. For example,
  "https://login.microsoftonline.us" and "login.microsoftonline.us" are both valid.
  ([#10819](https://github.com/Azure/azure-sdk-for-python/issues/10819))
  - First preview of new API for authenticating users with `DeviceCodeCredential`
    and `InteractiveBrowserCredential`
    ([#10612](https://github.com/Azure/azure-sdk-for-python/pull/10612))
    - new method `authenticate` interactively authenticates a user, returns a
      serializable `AuthenticationRecord`
    - new constructor keyword arguments
      - `authentication_record` enables initializing a credential with an
        `AuthenticationRecord` from a prior authentication
      - `disable_automatic_authentication=True` configures the credential to raise
      `AuthenticationRequiredError` when interactive authentication is necessary
      to acquire a token rather than immediately begin that authentication
      - `enable_persistent_cache=True` configures these credentials to use a
      persistent cache on supported platforms (in this release, Windows only).
      By default they cache in memory only.
  - Now `DefaultAzureCredential` can authenticate with the identity signed in to
  Visual Studio Code's Azure extension.
  ([#10472](https://github.com/Azure/azure-sdk-for-python/issues/10472))


  - After an instance of `DefaultAzureCredential` successfully authenticates, it
  uses the same authentication method for every subsequent token request. This
  makes subsequent requests more efficient, and prevents unexpected changes of
  authentication method.
  ([#10349](https://github.com/Azure/azure-sdk-for-python/pull/10349))
  - All `get_token` methods consistently require at least one scope argument,
  raising an error when none is passed. Although `get_token()` may sometimes
  have succeeded in prior versions, it couldn't do so consistently because its
  behavior was undefined, and dependened on the credential's type and internal
  state. ([#10243](https://github.com/Azure/azure-sdk-for-python/issues/10243))
  - `SharedTokenCacheCredential` raises `CredentialUnavailableError` when the
  cache is available but contains ambiguous or insufficient information. This
  causes `ChainedTokenCredential` to correctly try the next credential in the
  chain. ([#10631](https://github.com/Azure/azure-sdk-for-python/issues/10631))
  - The host of the Active Directory endpoint credentials should use can be set
  in the environment variable `AZURE_AUTHORITY_HOST`. See
  `azure.identity.KnownAuthorities` for a list of common values.
  ([#8094](https://github.com/Azure/azure-sdk-for-python/issues/8094))




  - `ManagedIdentityCredential` raises `CredentialUnavailableError` when no
  identity is configured for an IMDS endpoint. This causes
  `ChainedTokenCredential` to correctly try the next credential in the chain.
  ([#10488](https://github.com/Azure/azure-sdk-for-python/issues/10488))



  - `DefaultAzureCredential` can now authenticate using the identity logged in to
  the Azure CLI, unless explicitly disabled with a keyword argument:
  `DefaultAzureCredential(exclude_cli_credential=True)`
  ([#10092](https://github.com/Azure/azure-sdk-for-python/pull/10092))




  - Correctly parse token expiration time on Windows App Service
  ([#9393](https://github.com/Azure/azure-sdk-for-python/issues/9393))
  - Credentials raise `CredentialUnavailableError` when they can't attempt to
  authenticate due to missing data or state
  ([#9372](https://github.com/Azure/azure-sdk-for-python/pull/9372))
  - `CertificateCredential` supports password-protected private keys
  ([#9434](https://github.com/Azure/azure-sdk-for-python/pull/9434))




  - All credential pipelines include `ProxyPolicy`
  ([#8945](https://github.com/Azure/azure-sdk-for-python/pull/8945))
  - Async credentials are async context managers and have an async `close` method
  ([#9090](https://github.com/Azure/azure-sdk-for-python/pull/9090))




  - Constructing `DefaultAzureCredential` no longer raises `ImportError` on Python
  3.8 on Windows ([8294](https://github.com/Azure/azure-sdk-for-python/pull/8294))
  - `InteractiveBrowserCredential` raises when unable to open a web browser
  ([8465](https://github.com/Azure/azure-sdk-for-python/pull/8465))
  - `InteractiveBrowserCredential` prompts for account selection
  ([8470](https://github.com/Azure/azure-sdk-for-python/pull/8470))
  - The credentials composing `DefaultAzureCredential` are configurable by keyword
  arguments ([8514](https://github.com/Azure/azure-sdk-for-python/pull/8514))
  - `SharedTokenCacheCredential` accepts an optional `tenant_id` keyword argument
  ([8689](https://github.com/Azure/azure-sdk-for-python/pull/8689))




  - `ClientCertificateCredential` uses application and tenant IDs correctly
  ([8315](https://github.com/Azure/azure-sdk-for-python/pull/8315))
  - `InteractiveBrowserCredential` properly caches tokens
  ([8352](https://github.com/Azure/azure-sdk-for-python/pull/8352))
  - Adopted msal 1.0.0 and msal-extensions 0.1.3
  ([8359](https://github.com/Azure/azure-sdk-for-python/pull/8359))




  - Async credentials now default to [`aiohttp`](https://pypi.org/project/aiohttp/)
  for transport but the library does not require it as a dependency because the
  async API is optional. To use async credentials, please install
  [`aiohttp`](https://pypi.org/project/aiohttp/) or see
  [azure-core documentation](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/README.md#transport)
  for information about customizing the transport.
  - Renamed `ClientSecretCredential` parameter "`secret`" to "`client_secret`"
  - All credentials with `tenant_id` and `client_id` positional parameters now accept them in that order
  - Changes to `InteractiveBrowserCredential` parameters
    - positional parameter `client_id` is now an optional keyword argument. If no value is provided,
  the Azure CLI's client ID will be used.
    - Optional keyword argument `tenant` renamed `tenant_id`
  - Changes to `DeviceCodeCredential`
    - optional positional parameter `prompt_callback` is now a keyword argument
    - `prompt_callback`'s third argument is now a `datetime` representing the
    expiration time of the device code
    - optional keyword argument `tenant` renamed `tenant_id`
  - Changes to `ManagedIdentityCredential`
    - now accepts no positional arguments, and only one keyword argument:
    `client_id`
    - transport configuration is now done through keyword arguments as
    described in
    [`azure-core` documentation](https://github.com/Azure/azure-sdk-for-python/blob/azure-identity_1.0.0/sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md#transport)


  - Authenticating with a single sign-on shared with other Microsoft applications
  only requires a username when multiple users have signed in
  ([#8095](https://github.com/Azure/azure-sdk-for-python/pull/8095))
  - `DefaultAzureCredential` accepts an `authority` keyword argument, enabling
  its use in national clouds
  ([#8154](https://github.com/Azure/azure-sdk-for-python/pull/8154))


  - Adopted [`msal_extensions`](https://pypi.org/project/msal-extensions/) 0.1.2
  - Constrained [`msal`](https://pypi.org/project/msal/) requirement to >=0.4.1,
  <1.0.0




  - `AuthorizationCodeCredential` authenticates with a previously obtained
  authorization code. See Azure Active Directory's
  [authorization code documentation](https://docs.microsoft.com/azure/active-directory/develop/v2-oauth2-auth-code-flow)
  for more information about this authentication flow.
  - Multi-cloud support: client credentials accept the authority of an Azure Active
  Directory authentication endpoint as an `authority` keyword argument. Known
  authorities are defined in `azure.identity.KnownAuthorities`. The default
  authority is for Azure Public Cloud, `login.microsoftonline.com`
  (`KnownAuthorities.AZURE_PUBLIC_CLOUD`). An application running in Azure
  Government would use `KnownAuthorities.AZURE_GOVERNMENT` instead:
  >```
  >from azure.identity import DefaultAzureCredential, KnownAuthorities
  >credential = DefaultAzureCredential(authority=KnownAuthorities.AZURE_GOVERNMENT)
  >```


  - Removed `client_secret` parameter from `InteractiveBrowserCredential`


  - `UsernamePasswordCredential` correctly handles environment configuration with
  no tenant information ([#7260](https://github.com/Azure/azure-sdk-for-python/pull/7260))
  - user realm discovery requests are sent through credential pipelines
  ([#7260](https://github.com/Azure/azure-sdk-for-python/pull/7260))




  - `SharedTokenCacheCredential` authenticates with tokens stored in a local
  cache shared by Microsoft applications. This enables Azure SDK clients to
  authenticate silently after you've signed in to Visual Studio 2019, for
  example. `DefaultAzureCredential` includes `SharedTokenCacheCredential` when
  the shared cache is available, and environment variable `AZURE_USERNAME`
  is set. See the
  [README](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/identity/azure-identity/README.md#single-sign-on)
  for more information.


  - New dependency: [`msal-extensions`](https://pypi.org/project/msal-extensions/)
  0.1.1



  - Removed `azure.core.Configuration` from the public API in preparation for a
  revamped configuration API. Static `create_config` methods have been renamed
  `_create_config`, and will be removed in a future release.


  - Adopted [azure-core](https://pypi.org/project/azure-core/) 1.0.0b2
    - If you later want to revert to a version requiring azure-core 1.0.0b1,
    of this or another Azure SDK library, you must explicitly install azure-core
    1.0.0b1 as well. For example:
    `pip install azure-core==1.0.0b1 azure-identity==1.0.0b1`
  - Adopted [MSAL](https://pypi.org/project/msal/) 0.4.1
  - New dependency for Python 2.7: [mock](https://pypi.org/project/mock/)


  - Added credentials for authenticating users:
   - `DeviceCodeCredential`
   - `InteractiveBrowserCredential`
   - `UsernamePasswordCredential`
    - async versions of these credentials will be added in a future release


  Version 1.0.0b1 is the first preview of our efforts to create a user-friendly
  and Pythonic authentication API for Azure SDK client libraries. For more
  information about preview releases of other Azure SDK libraries, please visit
  https://aka.ms/azure-sdk-preview1-python.

  This release supports service principal and managed identity authentication.
  See the
  [documentation](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/identity/azure-identity/README.md)
  for more details. User authentication will be added in an upcoming preview
  release.

  This release supports only global Azure Active Directory tenants, i.e. those
  using the https://login.microsoftonline.com authentication endpoint.


pkgId: 981142f2589eb2d4bc0132e905128aa1c7ea9f920f2ac8f63cbcc75167b1acca
name: python-azure-mgmt-common
arch: src
version: 0.20.0
epoch: 0
release: 1
summary: Microsoft Azure Resource Management Client Library for Python (Common)
url: https://github.com/Azure/azure-sdk-for-python
rpm_license: Apache License 2.0
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-cb9170a8-f0b0-4796-8ee7-20dbff5b41ef
location_href: 00014174-python-azure-mgmt-common/python-azure-mgmt-common-0.20.0-1.src.rpm
checksum_type: sha256
description:
  This is the Microsoft Azure Resource Management common code.
  This package provides shared code by the Azure Management packages.
  If you are looking to install the Azure client libraries, see the
  `azure <https://pypi.python.org/pypi/azure>`__ bundle package.


pkgId: b6e06711637e34a3291d7b36ae6b24d93c76f54efc9761ec7d4714c4d35b0389
name: python-azure-mgmt-core
arch: src
version: 1.4.0
epoch: 0
release: 1
summary: Microsoft Azure Management Core Library for Python
url: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/core/azure-mgmt-core
rpm_license: MIT License
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-2b4739c3-8e93-4fc3-b2d8-3179eb80be9a
location_href: 00009108-python-azure-mgmt-core/python-azure-mgmt-core-1.4.0-1.src.rpm
checksum_type: sha256
description:
  Azure management core library defines extensions to Azure Core that are specific to ARM (Azure Resource Management) needed when you use client libraries.

  As an end user, you don't need to manually install azure-mgmt-core because it will be installed automatically when you install other SDKs.

  [Source code](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-mgmt-core/) | [Package (Pypi)][package] | [API reference documentation](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-mgmt-core/)



  This 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](https://cla.microsoft.com).

  When 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.

  This 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.

  <!-- LINKS -->
  [package]: https://pypi.org/project/azure-mgmt-core/







  - Added AuxiliaryAuthenticationPolicy



  - Rename "DEFAULT_HEADERS_WHITELIST" to "DEFAULT_HEADERS_ALLOWLIST". Added a backward compatible alias.





  - Updated mindep about `azure-core` from `1.23.0` to `1.24.0`





  - Updated mindep about `azure-core` from `1.15.0` to `1.23.0`





  - Support CAE





  - Updated required `azure-core` version





  - Updated required `azure-core` version





  - ARMChallengeAuthenticationPolicy supports bearer token authorization and CAE challenges





  - Fixed bug to allow polling for PATCH long-running-operation.





  - Fixed bug to allow polling in the case of parameterized endpoints with relative polling urls  #14097





  - The `allowed_header_names` property of ARMHttpLoggingPolicy now includes the management plane specific
  allowed headers  #12218



  - Added `http_logging_policy` property on the `Configuration` object, allowing users to individually
  set the http logging policy of the config  #12218





  - Info logger now logs ARM throttling information  #10940






  - Internal refactoring of polling on top of azure-core 1.4.0



  - Preview 1 release


pkgId: a1970065bc28a2cbd69afe75cbce3b82475eb484762c21b0d8a575a5d2ad0e8e
name: python-azure-mgmt-nspkg
arch: src
version: 3.0.2
epoch: 0
release: 1
summary: Microsoft Azure Resource Management Namespace Package [Internal]
url: https://github.com/Azure/azure-sdk-for-python
rpm_license: MIT License
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-3ae57cbd-e1b8-4b16-93da-56ce209d91b2
location_href: 00009216-python-azure-mgmt-nspkg/python-azure-mgmt-nspkg-3.0.2-1.src.rpm
checksum_type: sha256
description:
  This is the Microsoft Azure Management namespace package.
  This package is not intended to be installed directly by the end user.
  Since version 3.0, this is Python 2 package only, Python 3.x SDKs will use `PEP420 <https://www.python.org/dev/peps/pep-0420/>`__ as namespace package strategy.
  To avoid issues with package servers that does not support `python_requires`, a Python 3 package is installed but is empty.
  It provides the necessary files for other packages to extend the azure.mgmt namespace.
  If you are looking to install the Azure client libraries, see the
  `azure <https://pypi.python.org/pypi/azure>`__ bundle package.


pkgId: 4c6221101db80dbdc96d4f814347d24502f6e5e45efbae80732ff9963914fb41
name: python-azure-monitor-opentelemetry-exporter
arch: src
version: 1.0.0b12
epoch: 0
release: 1
summary: Microsoft Azure Monitor Opentelemetry Exporter Client Library for Python
rpm_license: MIT License
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-5d9b69ef-f9d1-4278-9611-e078499518a5
checksum_type: sha256
description:
  The exporter for Azure Monitor allows you to export data utilizing the OpenTelemetry SDK and send telemetry data to Azure Monitor for applications written in Python.

  [Source code](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/monitor/azure-monitor-opentelemetry-exporter) | [Package (PyPi)][pypi] | [API reference documentation][api_docs] | [Product documentation][product_docs] | [Samples](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/monitor/azure-monitor-opentelemetry-exporter/samples) | [Changelog](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/monitor/azure-monitor-opentelemetry-exporter/CHANGELOG.md)





  Install the Microsoft OpenTelemetry exporter for Azure Monitor with [pip][pip]:

  ```Bash
  pip install azure-monitor-opentelemetry-exporter --pre
  ```



  To use this package, you must have:

  * Azure subscription - [Create a free account][azure_sub]
  * Azure Monitor - [How to use application insights][application_insights_namespace]
  * OpenTelemetry SDK - [OpenTelemetry SDK for Python][ot_sdk_python]
  * Python 3.7 or later - [Install Python][python]



  Interaction with Azure monitor exporter starts with an instance of the `AzureMonitorTraceExporter` class for distributed tracing, `AzureMonitorLogExporter` for logging and `AzureMonitorMetricExporter` for metrics. You will need a **connection_string** to instantiate the object.
  Please find the samples linked below for demonstration as to how to construct the exporter using a connection string.



  NOTE: The logging signal for the `AzureMonitorLogExporter` is currently in an EXPERIMENTAL state. Possible breaking changes may ensue in the future.

  ```Python
  from azure.monitor.opentelemetry.exporter import AzureMonitorLogExporter
  exporter = AzureMonitorLogExporter(
      connection_string=os.environ["APPLICATIONINSIGHTS_CONNECTION_STRING"]
  )
  ```



  ```Python
  from azure.monitor.opentelemetry.exporter import AzureMonitorMetricExporter
  exporter = AzureMonitorMetricExporter(
      connection_string=os.environ["APPLICATIONINSIGHTS_CONNECTION_STRING"]
  )
  ```



  ```Python
  from azure.monitor.opentelemetry.exporter import AzureMonitorTraceExporter
  exporter = AzureMonitorTraceExporter(
      connection_string=os.environ["APPLICATIONINSIGHTS_CONNECTION_STRING"]
  )
  ```

  You can also instantiate the exporter directly via the constructor. In this case, the connection string will be automatically populated from the `APPLICATIONINSIGHTS_CONNECTION_STRING` environment variable.

  ```python
  from azure.monitor.opentelemetry.exporter import AzureMonitorLogExporter
  exporter = AzureMonitorLogExporter()
  ```

  ```python
  from azure.monitor.opentelemetry.exporter import AzureMonitorMetricExporter
  exporter = AzureMonitorMetricExporter()
  ```

  ```python
  from azure.monitor.opentelemetry.exporter import AzureMonitorTraceExporter
  exporter = AzureMonitorTraceExporter()
  ```



  Some of the key concepts for the Azure monitor exporter include:

  * [OpenTelemetry][opentelemetry_spec]: OpenTelemetry is a set of libraries used to collect and export telemetry data (metrics, logs, and traces) for analysis in order to understand your software's performance and behavior.

  * [Instrumentation][instrumentation_library]: The ability to call the OpenTelemetry API directly by any application is facilitated by instrumentation. A library that enables OpenTelemetry observability for another library is called an instrumentation Library.

  * [Log][log_concept]: Log refers to capturing of logging, exception and events.

  * [LogRecord][log_record]: Represents a log record emitted from a supported logging library.

  * [Logger][logger]: Converts a `LogRecord` into a readable `LogData`, and will be pushed through the SDK to be exported.

  * [Logger Provider][logger_provider]: Provides a `Logger` for the given instrumentation library.

  * [LogRecordProcessor][log_record_processor]: Interface to hook the log record emitting action.

  * [LoggingHandler][logging_handler]: A handler class which writes logging records in OpenTelemetry format from the standard Python `logging` library.

  * [AzureMonitorLogExporter][log_reference]: This is the class that is initialized to send logging related telemetry to Azure Monitor.

  * [Metric][metric_concept]: `Metric` refers to recording raw measurements with predefined aggregation and sets of attributes for a period in time.

  * [Measurement][measurement]: Represents a data point recorded at a point in time.

  * [Instrument][instrument]: Instruments are used to report `Measurement`s.

  * [Meter][meter]: The `Meter` is responsible for creating `Instruments`.

  * [Meter Provider][meter_provider]: Provides a `Meter` for the given instrumentation library.

  * [Metric Reader][metric_reader]: An SDK implementation object that provides the common configurable aspects of the OpenTelemetry Metrics SDK such as collection, flushing and shutdown.

  * [AzureMonitorMetricExporter][metric_reference]: This is the class that is initialized to send metric related telemetry to Azure Monitor.

  * [Trace][trace_concept]: Trace refers to distributed tracing. A distributed trace is a set of events, triggered as a result of a single logical operation, consolidated across various components of an application. In particular, a Trace can be thought of as a directed acyclic graph (DAG) of Spans, where the edges between Spans are defined as parent/child relationship.

  * [Span][span]: Represents a single operation within a `Trace`. Can be nested to form a trace tree. Each trace contains a root span, which typically describes the entire operation and, optionally, one ore more sub-spans for its sub-operations.

  * [Tracer][tracer]: Responsible for creating `Span`s.

  * [Tracer Provider][tracer_provider]: Provides a `Tracer` for use by the given instrumentation library.

  * [Span Processor][span_processor]: A span processor allows hooks for SDK's `Span` start and end method invocations. Follow the link for more information.

  * [AzureMonitorTraceExporter][trace_reference]: This is the class that is initialized to send tracing related telemetry to Azure Monitor.

  * [Sampling][sampler_ref]: Sampling is a mechanism to control the noise and overhead introduced by OpenTelemetry by reducing the number of samples of traces collected and sent to the backend.

  * ApplicationInsightsSampler: Application Insights specific sampler used for consistent sampling across Application Insights SDKs and OpenTelemetry-based SDKs sending data to Application Insights. This sampler MUST be used whenever `AzureMonitorTraceExporter` is used.

  For more information about these resources, see [What is Azure Monitor?][product_docs].



  All configuration options can be passed through the constructors of exporters through `kwargs`. Below is a list of configurable options.

  * `connection_string`: The connection string used for your Application Insights resource.
  * `disable_offline_storage`: Boolean value to determine whether to disable storing failed telemetry records for retry. Defaults to `False`.
  * `storage_directory`: Storage directory in which to store retry files. Defaults to `<tempfile.gettempdir()>/Microsoft/AzureMonitor/opentelemetry-python-<your-instrumentation-key>`.





  NOTE: The logging signal for the `AzureMonitorLogExporter` is currently in an EXPERIMENTAL state. Possible breaking changes may ensue in the future.

  The following sections provide several code snippets covering some of the most common tasks, including:

  * [Exporting a log record](#export-hello-world-log)
  * [Exporting correlated log record](#export-correlated-log)
  * [Exporting log record with custom properties](#export-custom-properties-log)
  * [Exporting an exceptions log record](#export-exceptions-log)

  Review the [OpenTelemetry Logging SDK][ot_logging_sdk] to learn how to use OpenTelemetry components to collect logs.



  ```Python
  """
  An example to show an application using Opentelemetry logging sdk. Logging calls to the standard Python
  logging library are tracked and telemetry is exported to application insights with the AzureMonitorLogExporter.
  """
  import os
  import logging

  from opentelemetry.sdk._logs import (
      LoggerProvider,
      LoggingHandler,
      set_logger_provider,
  )
  from opentelemetry.sdk._logs.export import BatchLogRecordProcessor

  from azure.monitor.opentelemetry.exporter import AzureMonitorLogExporter

  logger_provider = LoggerProvider()
  set_logger_provider(logger_provider)

  exporter = AzureMonitorLogExporter(
      connection_string=os.environ["APPLICATIONINSIGHTS_CONNECTION_STRING"]
  )

  logger_provider.add_log_record_processor(BatchLogRecordProcessor(exporter))
  handler = LoggingHandler()


  logging.getLogger().addHandler(handler)
  logging.getLogger().setLevel(logging.NOTSET)

  logger = logging.getLogger(__name__)

  logger.warning("Hello World!")
  ```



  ```Python
  """
  An example showing how to include context correlation information in logging telemetry.
  """
  import os
  import logging

  from opentelemetry import trace
  from opentelemetry.sdk._logs import (
      LoggerProvider,
      LoggingHandler,
      set_logger_provider,
  )
  from opentelemetry.sdk._logs.export import BatchLogRecordProcessor
  from opentelemetry.sdk.trace import TracerProvider

  from azure.monitor.opentelemetry.exporter import AzureMonitorLogExporter

  trace.set_tracer_provider(TracerProvider())
  tracer = trace.get_tracer(__name__)
  logger_provider = LoggerProvider()
  set_logger_provider(logger_provider)

  exporter = AzureMonitorLogExporter(
      connection_string=os.environ["APPLICATIONINSIGHTS_CONNECTION_STRING"]
  )

  logger_provider.add_log_record_processor(BatchLogRecordProcessor(exporter))
  handler = LoggingHandler()


  logging.getLogger().addHandler(handler)
  logging.getLogger().setLevel(logging.NOTSET)

  logger = logging.getLogger(__name__)

  logger.info("INFO: Outside of span")
  with tracer.start_as_current_span("foo"):
      logger.warning("WARNING: Inside of span")
  logger.error("ERROR: After span")
  ```



  ```Python
  """
  An example showing how to add custom properties to logging telemetry.
  """
  import os
  import logging

  from opentelemetry.sdk._logs import (
      LoggerProvider,
      LoggingHandler,
      set_logger_provider,
  )
  from opentelemetry.sdk._logs.export import BatchLogRecordProcessor

  from azure.monitor.opentelemetry.exporter import AzureMonitorLogExporter

  logger_provider = LoggerProvider()
  set_logger_provider(logger_provider)

  exporter = AzureMonitorLogExporter(
      connection_string=os.environ["APPLICATIONINSIGHTS_CONNECTION_STRING"]
  )

  logger_provider.add_log_record_processor(BatchLogRecordProcessor(exporter))
  handler = LoggingHandler()


  logging.getLogger().addHandler(handler)
  logging.getLogger().setLevel(logging.NOTSET)

  logger = logging.getLogger(__name__)


  logger.debug("DEBUG: Debug with properties", extra={"debug": "true"})
  ```



  ```Python
  """
  An example showing how to export exception telemetry using the AzureMonitorLogExporter.
  """
  import os
  import logging

  from opentelemetry._logs import (
      get_logger_provider,
      set_logger_provider,
  )
  from opentelemetry.sdk._logs import (
      LoggerProvider,
      LoggingHandler,
  )
  from opentelemetry.sdk._logs.export import BatchLogRecordProcessor

  from azure.monitor.opentelemetry.exporter import AzureMonitorLogExporter

  set_logger_provider(LoggerProvider())
  exporter = AzureMonitorLogExporter(
      connection_string=os.environ["APPLICATIONINSIGHTS_CONNECTION_STRING"]
  )
  get_logger_provider().add_log_record_processor(BatchLogRecordProcessor(exporter))


  handler = LoggingHandler()
  logger = logging.getLogger(__name__)
  logger.addHandler(handler)
  logger.setLevel(logging.NOTSET)



  try:
      val = 1 / 0
      print(val)
  except ZeroDivisionError:
      logger.exception("Error: Division by zero")

  try:
      val = 1 / 0
      print(val)
  except ZeroDivisionError:
      logger.error("Error: Division by zero", stack_info=True, exc_info=True)
  ```



  The following sections provide several code snippets covering some of the most common tasks, including:

  * [Using different metric instruments](#metric-instrument-usage)
  * [Customizing outputted metrics with views](#metric-custom-views)
  * [Recording instruments with attributes](#metric-record-attributes)

  Review the [OpenTelemetry Metrics SDK][ot_metrics_sdk] to learn how to use OpenTelemetry components to collect metrics.



  ```python
  """
  An example to show an application using all instruments in the OpenTelemetry SDK. Metrics created
  and recorded using the sdk are tracked and telemetry is exported to application insights with the
  AzureMonitorMetricsExporter.
  """
  import os
  from typing import Iterable

  from opentelemetry import metrics
  from opentelemetry.metrics import CallbackOptions, Observation
  from opentelemetry.sdk.metrics import MeterProvider
  from opentelemetry.sdk.metrics.export import PeriodicExportingMetricReader

  from azure.monitor.opentelemetry.exporter import AzureMonitorMetricExporter

  exporter = AzureMonitorMetricExporter(
      connection_string=os.environ["APPLICATIONINSIGHTS_CONNECTION_STRING"]
  )
  reader = PeriodicExportingMetricReader(exporter, export_interval_millis=5000)
  metrics.set_meter_provider(MeterProvider(metric_readers=[reader]))


  meter = metrics.get_meter_provider().get_meter("sample")


  def observable_counter_func(options: CallbackOptions) -> Iterable[Observation]:
      yield Observation(1, {})


  def observable_up_down_counter_func(
      options: CallbackOptions,
  ) -> Iterable[Observation]:
      yield Observation(-10, {})


  def observable_gauge_func(options: CallbackOptions) -> Iterable[Observation]:
      yield Observation(9, {})


  counter = meter.create_counter("counter")
  counter.add(1)


  observable_counter = meter.create_observable_counter(
      "observable_counter", [observable_counter_func]
  )


  up_down_counter = meter.create_up_down_counter("up_down_counter")
  up_down_counter.add(1)
  up_down_counter.add(-5)


  observable_up_down_counter = meter.create_observable_up_down_counter(
      "observable_up_down_counter", [observable_up_down_counter_func]
  )


  histogram = meter.create_histogram("histogram")
  histogram.record(99.9)


  gauge = meter.create_observable_gauge("gauge", [observable_gauge_func])

  ```



  ```python
  """
  This example shows how to customize the metrics that are output by the SDK using Views. Metrics created
  and recorded using the sdk are tracked and telemetry is exported to application insights with the
  AzureMonitorMetricsExporter.
  """
  import os

  from opentelemetry import metrics
  from opentelemetry.sdk.metrics import Counter, MeterProvider
  from opentelemetry.sdk.metrics.export import PeriodicExportingMetricReader
  from opentelemetry.sdk.metrics.view import View

  from azure.monitor.opentelemetry.exporter import AzureMonitorMetricExporter

  exporter = AzureMonitorMetricExporter.from_connection_string(
      os.environ["APPLICATIONINSIGHTS_CONNECTION_STRING"]
  )


  change_metric_name_view = View(
      instrument_type=Counter,
      instrument_name="my.counter",
      name="my.counter.total",
  )

  reader = PeriodicExportingMetricReader(exporter, export_interval_millis=5000)
  provider = MeterProvider(
      metric_readers=[
          reader,
      ],
      views=[
          change_metric_name_view,
      ],
  )
  metrics.set_meter_provider(provider)

  meter = metrics.get_meter_provider().get_meter("view-name-change")
  my_counter = meter.create_counter("my.counter")
  my_counter.add(100)

  ```

  More examples with the metrics `Views` SDK can be found [here](https://github.com/open-telemetry/opentelemetry-python/tree/main/docs/examples/metrics/views).



  ```python
  """
  An example to show an application using different attributes with instruments in the OpenTelemetry SDK.
  Metrics created and recorded using the sdk are tracked and telemetry is exported to application insights
  with the AzureMonitorMetricsExporter.
  """
  import os

  from opentelemetry import metrics
  from opentelemetry.sdk.metrics import MeterProvider
  from opentelemetry.sdk.metrics.export import PeriodicExportingMetricReader

  from azure.monitor.opentelemetry.exporter import AzureMonitorMetricExporter

  exporter = AzureMonitorMetricExporter.from_connection_string(
      os.environ["APPLICATIONINSIGHTS_CONNECTION_STRING"]
  )
  reader = PeriodicExportingMetricReader(exporter, export_interval_millis=5000)
  metrics.set_meter_provider(MeterProvider(metric_readers=[reader]))

  attribute_set1 = {
      "key1": "val1"
  }
  attribute_set2 = {
      "key2": "val2"
  }
  large_attribute_set = {}
  for i in range(20):
      key = "key{}".format(i)
      val = "val{}".format(i)
      large_attribute_set[key] = val

  meter = metrics.get_meter_provider().get_meter("sample")


  counter = meter.create_counter("attr1_counter")
  counter.add(1, attribute_set1)


  counter2 = meter.create_counter("attr2_counter")
  counter2.add(10, attribute_set1)
  counter2.add(30, attribute_set2)


  counter3 = meter.create_counter("large_attr_counter")
  counter3.add(100, attribute_set1)
  counter3.add(200, large_attribute_set)

  ```



  The following sections provide several code snippets covering some of the most common tasks, including:

  * [Exporting a custom span](#export-hello-world-trace)
  * [Using an instrumentation to track a library](#instrumentation-with-requests-library)
  * [Enabling sampling to limit the amount of telemetry sent](#enabling-sampling)

  Review the [OpenTelemetry Tracing SDK][ot_tracing_sdk] to learn how to use OpenTelemetry components to collect logs.



  ```Python
  """
  An example to show an application using Opentelemetry tracing api and sdk. Custom dependencies are
  tracked via spans and telemetry is exported to application insights with the AzureMonitorTraceExporter.
  """
  import os
  from opentelemetry import trace
  from opentelemetry.sdk.trace import TracerProvider
  from opentelemetry.sdk.trace.export import BatchSpanProcessor
  from azure.monitor.opentelemetry.exporter import AzureMonitorTraceExporter

  trace.set_tracer_provider(TracerProvider())
  tracer = trace.get_tracer(__name__)

  exporter = AzureMonitorTraceExporter(
      connection_string=os.environ["APPLICATIONINSIGHTS_CONNECTION_STRING"]
  )
  span_processor = BatchSpanProcessor(exporter)
  trace.get_tracer_provider().add_span_processor(span_processor)

  with tracer.start_as_current_span("hello"):
      print("Hello, World!")
  ```



  OpenTelemetry also supports several instrumentations which allows to instrument with third party libraries.

  For a list of instrumentations available in OpenTelemetry, visit the contrib [documentation](https://opentelemetry-python-contrib.readthedocs.io/en/latest/).

  This example shows how to instrument with the [requests](https://pypi.org/project/requests/) library.

  * Install the requests instrumentation package using pip install opentelemetry-instrumentation-requests.

  ```Python
  """
  An example to show an application instrumented with the OpenTelemetry requests instrumentation.
  Calls made with the requests library will be automatically tracked and telemetry is exported to
  application insights with the AzureMonitorTraceExporter.
  See more info on the requests instrumentation here:
  https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation/opentelemetry-instrumentation-requests
  """
  import os
  import requests
  from opentelemetry import trace
  from opentelemetry.instrumentation.requests import RequestsInstrumentor
  from opentelemetry.sdk.trace import TracerProvider
  from opentelemetry.sdk.trace.export import BatchSpanProcessor
  from azure.monitor.opentelemetry.exporter import AzureMonitorTraceExporter


  RequestsInstrumentor().instrument()

  trace.set_tracer_provider(TracerProvider())
  tracer = trace.get_tracer(__name__)
  exporter = AzureMonitorTraceExporter(
      connection_string=os.environ["APPLICATIONINSIGHTS_CONNECTION_STRING"]
  )
  span_processor = BatchSpanProcessor(exporter)
  trace.get_tracer_provider().add_span_processor(span_processor)


  response = requests.get(url="https://azure.microsoft.com/")
  ```



  You can enable sampling to limit the amount of telemetry records you receive. In order to enable correct sampling in Application Insights, use the `ApplicationInsightsSampler` as shown below.

  ```Python
  """
  An example to show an application using the ApplicationInsightsSampler to enable sampling for your telemetry.
  Specify a sampling rate for the sampler to limit the amount of telemetry records you receive. Custom dependencies
   are tracked via spans and telemetry is exported to application insights with the AzureMonitorTraceExporter.
  """
  import os
  from opentelemetry import trace
  from opentelemetry.sdk.trace import TracerProvider
  from opentelemetry.sdk.trace.export import BatchSpanProcessor
  from azure.monitor.opentelemetry.exporter import (
      ApplicationInsightsSampler,
      AzureMonitorTraceExporter,
  )



  sampler = ApplicationInsightsSampler(0.75)
  trace.set_tracer_provider(TracerProvider(sampler=sampler))
  tracer = trace.get_tracer(__name__)
  exporter = AzureMonitorTraceExporter(
      connection_string=os.environ["APPLICATIONINSIGHTS_CONNECTION_STRING"]
  )
  span_processor = BatchSpanProcessor(exporter)
  trace.get_tracer_provider().add_span_processor(span_processor)

  for i in range(100):
      
      with tracer.start_as_current_span("hello"):
          print("Hello, World!")
  ```



  The exporter raises exceptions defined in [Azure Core](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/README.md#azure-core-library-exceptions).





  Please find further examples in the [samples](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/monitor/azure-monitor-opentelemetry-exporter/samples) directory demonstrating common scenarios.



  For more extensive documentation on the Azure Monitor service, see the [Azure Monitor documentation][product_docs] on docs.microsoft.com.

  For detailed overview of OpenTelemetry, visit their [overview](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/overview.md) page.

  For the official OpenTelemetry Python documentation and how to enable other telemetry scenarios, visit the official OpenTelemetry [website](https://opentelemetry.io/docs/instrumentation/python/).

  For more information on the Azure Monitor OpenTelemetry Distro, which is a bundle of useful, pre-assembled components (one of them being this current package) that enable telemetry scenarios with Azure Monitor, visit the [README](https://github.com/microsoft/ApplicationInsights-Python/tree/main/azure-monitor-opentelemetry-distro).



  This 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.

  When 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.

  This 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.

  <!-- LINKS -->
  [api_docs]: https://azuresdkdocs.blob.core.windows.net/$web/python/azure-opentelemetry-exporter-azuremonitor/1.0.0b2/index.html
  [product_docs]: https://docs.microsoft.com/azure/azure-monitor/overview
  [azure_sub]: https://azure.microsoft.com/free/
  [pip]: https://pypi.org/project/pip/
  [pypi]: https://pypi.org/project/azure-monitor-opentelemetry-exporter/
  [python]: https://www.python.org/downloads/
  [ot_sdk_python]: https://github.com/open-telemetry/opentelemetry-python
  [application_insights_namespace]: https://docs.microsoft.com/azure/azure-monitor/app/app-insights-overview#how-do-i-use-application-insights
  [opentelemetry_spec]: https://opentelemetry.io/
  [instrumentation_library]: https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/overview.md#instrumentation-libraries
  [log_concept]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/overview.md#log-signal
  [log_record]: https://opentelemetry-python.readthedocs.io/en/stable/sdk/logs.html#opentelemetry.sdk._logs.LogRecord
  [logger]: https://opentelemetry-python.readthedocs.io/en/stable/sdk/logs.html#opentelemetry.sdk._logs.Logger
  [logger_provider]: https://opentelemetry-python.readthedocs.io/en/stable/sdk/logs.html#opentelemetry.sdk._logs.LoggerProvider
  [log_record_processor]: https://opentelemetry-python.readthedocs.io/en/stable/sdk/logs.html#opentelemetry.sdk._logs.LogRecordProcessor
  [logging_handler]: https://opentelemetry-python.readthedocs.io/en/stable/sdk/logs.html#opentelemetry.sdk._logs.LoggingHandler
  [log_reference]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/export/logs/_exporter.py
  [ot_logging_sdk]: https://opentelemetry-python.readthedocs.io/en/stable/sdk/logs.html
  [metric_concept]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/overview.md#metric-signal
  [measurement]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md#measurement
  [instrument]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md#instrument
  [meter]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md#meter
  [meter_provider]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md#meterprovider
  [metric_reader]:https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#metricreader
  [metric_reference]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/export/metrics/_exporter.py
  [ot_metrics_sdk]: https://opentelemetry-python.readthedocs.io/en/stable/sdk/metrics.html
  [trace_concept]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/overview.md#tracing-signal
  [span]: https://opentelemetry-python.readthedocs.io/en/stable/api/trace.html?highlight=TracerProvider#opentelemetry.trace.Span
  [tracer]: https://opentelemetry-python.readthedocs.io/en/stable/api/trace.html?highlight=TracerProvider#opentelemetry.trace.Tracer
  [tracer_provider]: https://opentelemetry-python.readthedocs.io/en/stable/api/trace.html?highlight=TracerProvider#opentelemetry.trace.TracerProvider
  [span_processor]: https://opentelemetry-python.readthedocs.io/en/stable/_modules/opentelemetry/sdk/trace.html?highlight=SpanProcessor#
  [trace_reference]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/export/trace/_exporter.py
  [ot_tracing_sdk]: https://opentelemetry-python.readthedocs.io/en/stable/sdk/trace.html
  [sampler_ref]: https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/sdk.md#sampling

url:
  https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/monitor/azure-monitor-opentelemetry-exporter

location_href:
  00013964-python-azure-monitor-opentelemetry-exporter/python-azure-monitor-opentelemetry-exporter-1.0.0b12-1.src.rpm


