# packages

pkgId: 9e23c31db4a626be7fb858e0d1a476e8e76747e5104bf3b9b627720873186305
name: python-artifactory
arch: src
version: 0.1.17
epoch: 0
release: 1
summary: A Python to Artifactory interface
url: http://github.com/parallels/artifactory
rpm_license: MIT License
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-ce63270f-2741-4c38-a4fb-01263c1842ce
location_href: 00011593-python-artifactory/python-artifactory-0.1.17-1.src.rpm
checksum_type: sha256
description:
  |Build Status|
  This module is intended to serve as a logical descendant of
  `pathlib <https://docs.python.org/3/library/pathlib.html>`__, a Python 3
  module for object-oriented path manipulations. As such, it implements
  everything as closely as possible to the origin with few exceptions,
  such as stat().


pkgId: b4273d23b936f65563b650e34e25783157fb0cd96157e8399b87efc6b4f256b3
name: python-arviz
arch: src
version: 0.15.1
epoch: 0
release: 1
summary: Exploratory analysis of Bayesian models
url: http://github.com/arviz-devs/arviz
rpm_license: Apache-2.0
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-4da2c70a-9f52-4605-b643-45b5a2a0eb5d
location_href: 00003052-python-arviz/python-arviz-0.15.1-1.src.rpm
checksum_type: sha256
description:
  <p>
  <table>
  <tr>
    <td>
    <a href="https://python.arviz.org/en/latest/examples/plot_forest_ridge.html">
    <img alt="Ridge plot"
    src="https://raw.githubusercontent.com/arviz-devs/arviz/gh-pages/_images/mpl_plot_forest_ridge.png" />
    </a>
    </td>
    <td>
    <a href="https://python.arviz.org/en/latest/examples/plot_forest.html">
    <img alt="Forest Plot"
    src="https://raw.githubusercontent.com/arviz-devs/arviz/gh-pages/_images/mpl_plot_forest.png" />
    </a>
    </td>
    <td>
    <a href="https://python.arviz.org/en/latest/examples/plot_violin.html">
    <img alt="Violin Plot"
    src="https://raw.githubusercontent.com/arviz-devs/arviz/gh-pages/_images/mpl_plot_violin.png" />
    </a>
    </td>
  </tr>
  <tr>
    <td>
    <a href="https://python.arviz.org/en/latest/examples/plot_ppc.html">
    <img alt="Posterior predictive plot"
    src="https://raw.githubusercontent.com/arviz-devs/arviz/gh-pages/_images/mpl_plot_ppc.png" />
    </a>
    </td>
    <td>
    <a href="https://python.arviz.org/en/latest/examples/plot_dot.html">
    <img alt="Joint plot"
    src="https://raw.githubusercontent.com/arviz-devs/arviz/gh-pages/_images/mpl_plot_dot.png" />
    </a>
    </td>
    <td>
    <a href="https://python.arviz.org/en/latest/examples/plot_posterior.html">
    <img alt="Posterior plot"
    src="https://raw.githubusercontent.com/arviz-devs/arviz/gh-pages/_images/mpl_plot_posterior.png" />
    </a>
    </td>
  </tr>
  <tr>
    <td>
    <a href="https://python.arviz.org/en/latest/examples/plot_density.html">
    <img alt="Density plot"
    src="https://raw.githubusercontent.com/arviz-devs/arviz/gh-pages/_images/mpl_plot_density.png" />
    </a>
    </td>
    <td>
    <a href="https://python.arviz.org/en/latest/examples/plot_pair.html">
    <img alt="Pair plot"
    src="https://raw.githubusercontent.com/arviz-devs/arviz/gh-pages/_images/mpl_plot_pair.png" />
    </a>
    </td>
    <td>
    <a href="https://python.arviz.org/en/latest/examples/plot_pair_hex.html">
    <img alt="Hexbin Pair plot"
    src="https://raw.githubusercontent.com/arviz-devs/arviz/gh-pages/_images/mpl_plot_pair_hex.png" />
    </a>
    </td>
  </tr>
  <tr>
    <td>
    <a href="https://python.arviz.org/en/latest/examples/plot_trace.html">
    <img alt="Trace plot"
    src="https://raw.githubusercontent.com/arviz-devs/arviz/gh-pages/_images/mpl_plot_trace.png" />
    </a>
    </td>
    <td>
    <a href="https://python.arviz.org/en/latest/examples/plot_energy.html">
    <img alt="Energy Plot"
    src="https://raw.githubusercontent.com/arviz-devs/arviz/gh-pages/_images/mpl_plot_energy.png" />
    </a>
    </td>
    <td>
    <a href="https://python.arviz.org/en/latest/examples/plot_rank.html">
    <img alt="Rank Plot"
    src="https://raw.githubusercontent.com/arviz-devs/arviz/gh-pages/_images/mpl_plot_rank.png" />
    </a>
    </td>
  </tr>
  </table>

  ArviZ is tested on Python 3.7, 3.8 and 3.9, and depends on NumPy, SciPy, xarray, and Matplotlib.

  If you use ArviZ and want to cite it please use [![DOI](http://joss.theoj.org/papers/10.21105/joss.01143/status.svg)](https://doi.org/10.21105/joss.01143)
  Here is the citation in BibTeX format
  ```
  @article{arviz_2019,
    doi = {10.21105/joss.01143},
    url = {https://doi.org/10.21105/joss.01143},
    year = {2019},
    publisher = {The Open Journal},
    volume = {4},
    number = {33},
    pages = {1143},
    author = {Ravin Kumar and Colin Carroll and Ari Hartikainen and Osvaldo Martin},
    title = {ArviZ a unified library for exploratory analysis of Bayesian models in Python},
    journal = {Journal of Open Source Software}
  }
  ```

  ArviZ is a community project and welcomes contributions.
  Additional information can be found in the [Contributing Readme](https://github.com/arviz-devs/arviz/blob/main/CONTRIBUTING.md)

  ArviZ wishes to maintain a positive community. Additional details
  can be found in the [Code of Conduct](https://github.com/arviz-devs/arviz/blob/main/CODE_OF_CONDUCT.md)

  ArviZ is a non-profit project under NumFOCUS umbrella. If you want to support ArviZ financially, you can donate [here](https://numfocus.org/donate-to-arviz).

  [![NumFOCUS](https://www.numfocus.org/wp-content/uploads/2017/07/NumFocus_LRG.png)](https://numfocus.org)


pkgId: 898c207fad4c807420bb45160e85c98828c17b0685a13666f1e733f18ccdfc89
name: python-asciitree
arch: src
version: 0.3.3
epoch: 0
release: 1
summary: Draws ASCII trees.
url: http://github.com/mbr/asciitree
rpm_license: MIT
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-3aaa4f9a-85a1-4b2a-81f8-537984d2e3a6
location_href: 00012090-python-asciitree/python-asciitree-0.3.3-1.src.rpm
checksum_type: sha256
description:
    asciitree
     +-- sometimes
     |   +-- you
     +-- just
     |   +-- want
     |       +-- to
     |       +-- draw
     +-- trees
     +-- in
         +-- your
             +-- terminal
    from asciitree import LeftAligned
    from collections import OrderedDict as OD
    tree = {
        'asciitree': OD([
            ('sometimes',
                {'you': {}}),
            ('just',
                {'want': OD([
                    ('to', {}),
                    ('draw', {}),
                ])}),
            ('trees', {}),
            ('in', {
                'your': {
                    'terminal': {}
                }
            })
        ])
    }
    tr = LeftAligned()
    print(tr(tree))
  Read the documentation at http://pythonhosted.org/asciitree


pkgId: ddc4a9b9142eb8d94e0febed979a1155c2866f620808f937dba294e32c9e5693
name: python-ase
arch: src
version: 3.22.1
epoch: 0
release: 1
summary: Atomic Simulation Environment
url: https://wiki.fysik.dtu.dk/ase
rpm_license: LGPLv2.1+
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-edb4404f-f3a9-4f8c-952e-f673df06bb04
location_href: 00003053-python-ase/python-ase-3.22.1-1.src.rpm
checksum_type: sha256
description:
  ASE is a set of tools and Python modules for setting up, manipulating,
  running, visualizing and analyzing atomistic simulations.
  Webpage: http://wiki.fysik.dtu.dk/ase


pkgId: 9ea978c5c6c846d4423bc60dda91e65b57f10aa723d00c7d434f88c0e0c37d31
name: python-asgiref
arch: src
version: 3.6.0
epoch: 0
release: 1
summary: ASGI specs, helper code, and adapters
url: https://github.com/django/asgiref/
rpm_license: BSD-3-Clause
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-c7cee169-6550-434c-be98-42eb33059b6f
location_href: 00003054-python-asgiref/python-asgiref-3.6.0-1.src.rpm
checksum_type: sha256
description:
  ASGI is a standard for Python asynchronous web apps and servers to communicate
  with each other, and positioned as an asynchronous successor to WSGI. You can
  read more at https://asgi.readthedocs.io/en/latest/
  This package includes ASGI base libraries, such as:
  * Sync-to-async and async-to-sync function wrappers, ``asgiref.sync``
  * Server base classes, ``asgiref.server``
  * A WSGI-to-ASGI adapter, in ``asgiref.wsgi``


pkgId: 0b8d615faf06d38f9c13b01529e85b8fce20d4f5c1d975e237037436f88ff5bc
name: python-asn1crypto
arch: src
version: 1.5.1
epoch: 0
release: 1
url: https://github.com/wbond/asn1crypto
rpm_license: MIT
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-fe45a266-56ec-4eb0-bd10-d81ea13b3510
location_href: 00008952-python-asn1crypto/python-asn1crypto-1.5.1-1.src.rpm
checksum_type: sha256
summary:
  Fast ASN.1 parser and serializer with definitions for private keys, public keys, certificates, CRL, OCSP, CMS, PKCS#3, PKCS#7, PKCS#8, PKCS#12, PKCS#5, X.509 and TSP

description:
  A fast, pure Python library for parsing and serializing ASN.1 structures.

   - [Features](#features)
   - [Why Another Python ASN.1 Library?](#why-another-python-asn1-library)
   - [Related Crypto Libraries](#related-crypto-libraries)
   - [Current Release](#current-release)
   - [Dependencies](#dependencies)
   - [Installation](#installation)
   - [License](#license)
   - [Security Policy](#security-policy)
   - [Documentation](#documentation)
   - [Continuous Integration](#continuous-integration)
   - [Testing](#testing)
   - [Development](#development)
   - [CI Tasks](#ci-tasks)

  [![GitHub Actions CI](https://github.com/wbond/asn1crypto/workflows/CI/badge.svg)](https://github.com/wbond/asn1crypto/actions?workflow=CI)
  [![CircleCI](https://circleci.com/gh/wbond/asn1crypto.svg?style=shield)](https://circleci.com/gh/wbond/asn1crypto)
  [![PyPI](https://img.shields.io/pypi/v/asn1crypto.svg)](https://pypi.org/project/asn1crypto/)



  In addition to an ASN.1 BER/DER decoder and DER serializer, the project includes
  a bunch of ASN.1 structures for use with various common cryptography standards:

  | Standard               | Module                                      | Source                                                                                                                 |
  | ---------------------- | ------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
  | X.509                  | [`asn1crypto.x509`](asn1crypto/x509.py)     | [RFC 5280](https://tools.ietf.org/html/rfc5280)                                                                        |
  | CRL                    | [`asn1crypto.crl`](asn1crypto/crl.py)       | [RFC 5280](https://tools.ietf.org/html/rfc5280)                                                                        |
  | CSR                    | [`asn1crypto.csr`](asn1crypto/csr.py)       | [RFC 2986](https://tools.ietf.org/html/rfc2986), [RFC 2985](https://tools.ietf.org/html/rfc2985)                       |
  | OCSP                   | [`asn1crypto.ocsp`](asn1crypto/ocsp.py)     | [RFC 6960](https://tools.ietf.org/html/rfc6960)                                                                        |
  | PKCS#12                | [`asn1crypto.pkcs12`](asn1crypto/pkcs12.py) | [RFC 7292](https://tools.ietf.org/html/rfc7292)                                                                        |
  | PKCS#8                 | [`asn1crypto.keys`](asn1crypto/keys.py)     | [RFC 5208](https://tools.ietf.org/html/rfc5208)                                                                        |
  | PKCS#1 v2.1 (RSA keys) | [`asn1crypto.keys`](asn1crypto/keys.py)     | [RFC 3447](https://tools.ietf.org/html/rfc3447)                                                                        |
  | DSA keys               | [`asn1crypto.keys`](asn1crypto/keys.py)     | [RFC 3279](https://tools.ietf.org/html/rfc3279)                                                                        |
  | Elliptic curve keys    | [`asn1crypto.keys`](asn1crypto/keys.py)     | [SECG SEC1 V2](http://www.secg.org/sec1-v2.pdf)                                                                        |
  | PKCS#3 v1.4            | [`asn1crypto.algos`](asn1crypto/algos.py)   | [PKCS#3 v1.4](ftp://ftp.rsasecurity.com/pub/pkcs/ascii/pkcs-3.asc)                                                        |
  | PKCS#5 v2.1            | [`asn1crypto.algos`](asn1crypto/algos.py)   | [PKCS#5 v2.1](http://www.emc.com/collateral/white-papers/h11302-pkcs5v2-1-password-based-cryptography-standard-wp.pdf) |
  | CMS (and PKCS#7)       | [`asn1crypto.cms`](asn1crypto/cms.py)       | [RFC 5652](https://tools.ietf.org/html/rfc5652), [RFC 2315](https://tools.ietf.org/html/rfc2315)                       |
  | TSP                    | [`asn1crypto.tsp`](asn1crypto/tsp.py)       | [RFC 3161](https://tools.ietf.org/html/rfc3161)                                                                        |
  | PDF signatures         | [`asn1crypto.pdf`](asn1crypto/pdf.py)       | [PDF 1.7](http://wwwimages.adobe.com/content/dam/Adobe/en/devnet/pdf/pdfs/PDF32000_2008.pdf)                           |



  Python has long had the [pyasn1](https://pypi.org/project/pyasn1/) and
  [pyasn1_modules](https://pypi.org/project/pyasn1-modules/) available for
  parsing and serializing ASN.1 structures. While the project does include a
  comprehensive set of tools for parsing and serializing, the performance of the
  library can be very poor, especially when dealing with bit fields and parsing
  large structures such as CRLs.

  After spending extensive time using *pyasn1*, the following issues were
  identified:

   1. Poor performance
   2. Verbose, non-pythonic API
   3. Out-dated and incomplete definitions in *pyasn1-modules*
   4. No simple way to map data to native Python data structures
   5. No mechanism for overridden universal ASN.1 types

  The *pyasn1* API is largely method driven, and uses extensive configuration
  objects and lowerCamelCase names. There were no consistent options for
  converting types of native Python data structures. Since the project supports
  out-dated versions of Python, many newer language features are unavailable
  for use.

  Time was spent trying to profile issues with the performance, however the
  architecture made it hard to pin down the primary source of the poor
  performance. Attempts were made to improve performance by utilizing unreleased
  patches and delaying parsing using the `Any` type. Even with such changes, the
  performance was still unacceptably slow.

  Finally, a number of structures in the cryptographic space use universal data
  types such as `BitString` and `OctetString`, but interpret the data as other
  types. For instance, signatures are really byte strings, but are encoded as
  `BitString`. Elliptic curve keys use both `BitString` and `OctetString` to
  represent integers. Parsing these structures as the base universal types and
  then re-interpreting them wastes computation.

  *asn1crypto* uses the following techniques to improve performance, especially
  when extracting one or two fields from large, complex structures:

   - Delayed parsing of byte string values
   - Persistence of original ASN.1 encoded data until a value is changed
   - Lazy loading of child fields
   - Utilization of high-level Python stdlib modules

  While there is no extensive performance test suite, the
  `CRLTests.test_parse_crl` test case was used to parse a 21MB CRL file on a
  late 2013 rMBP. *asn1crypto* parsed the certificate serial numbers in just
  under 8 seconds. With *pyasn1*, using definitions from *pyasn1-modules*, the
  same parsing took over 4,100 seconds.

  For smaller structures the performance difference can range from a few times
  faster to an order of magnitude or more.



  *asn1crypto* is part of the modularcrypto family of Python packages:

   - [asn1crypto](https://github.com/wbond/asn1crypto)
   - [oscrypto](https://github.com/wbond/oscrypto)
   - [csrbuilder](https://github.com/wbond/csrbuilder)
   - [certbuilder](https://github.com/wbond/certbuilder)
   - [crlbuilder](https://github.com/wbond/crlbuilder)
   - [ocspbuilder](https://github.com/wbond/ocspbuilder)
   - [certvalidator](https://github.com/wbond/certvalidator)



  1.5.0 - [changelog](changelog.md)



  Python 2.6, 2.7, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, 3.10 or pypy. *No third-party
  packages required.*



  ```bash
  pip install asn1crypto
  ```



  *asn1crypto* is licensed under the terms of the MIT license. See the
  [LICENSE](LICENSE) file for the exact license text.



  The security policies for this project are covered in
  [SECURITY.md](https://github.com/wbond/asn1crypto/blob/master/SECURITY.md).



  The documentation for *asn1crypto* is composed of tutorials on basic usage and
  links to the source for the various pre-defined type classes.



   - [Universal Types with BER/DER Decoder and DER Encoder](docs/universal_types.md)
   - [PEM Encoder and Decoder](docs/pem.md)



   - [Universal types](asn1crypto/core.py), `asn1crypto.core`
   - [Digest, HMAC, signed digest and encryption algorithms](asn1crypto/algos.py), `asn1crypto.algos`
   - [Private and public keys](asn1crypto/keys.py), `asn1crypto.keys`
   - [X509 certificates](asn1crypto/x509.py), `asn1crypto.x509`
   - [Certificate revocation lists (CRLs)](asn1crypto/crl.py), `asn1crypto.crl`
   - [Online certificate status protocol (OCSP)](asn1crypto/ocsp.py), `asn1crypto.ocsp`
   - [Certificate signing requests (CSRs)](asn1crypto/csr.py), `asn1crypto.csr`
   - [Private key/certificate containers (PKCS#12)](asn1crypto/pkcs12.py), `asn1crypto.pkcs12`
   - [Cryptographic message syntax (CMS, PKCS#7)](asn1crypto/cms.py), `asn1crypto.cms`
   - [Time stamp protocol (TSP)](asn1crypto/tsp.py), `asn1crypto.tsp`
   - [PDF signatures](asn1crypto/pdf.py), `asn1crypto.pdf`



  Various combinations of platforms and versions of Python are tested via:

   - [macOS, Linux, Windows](https://github.com/wbond/asn1crypto/actions/workflows/ci.yml) via GitHub Actions
   - [arm64](https://circleci.com/gh/wbond/asn1crypto) via CircleCI



  Tests are written using `unittest` and require no third-party packages.

  Depending on what type of source is available for the package, the following
  commands can be used to run the test suite.



  When working within a Git working copy, or an archive of the Git repository,
  the full test suite is run via:

  ```bash
  python run.py tests
  ```

  To run only some tests, pass a regular expression as a parameter to `tests`.

  ```bash
  python run.py tests ocsp
  ```



  When working within an extracted source distribution (aka `.tar.gz`) from
  PyPi, the full test suite is run via:

  ```bash
  python setup.py test
  ```



  When the package has been installed via pip (or another method), the package
  `asn1crypto_tests` may be installed and invoked to run the full test suite:

  ```bash
  pip install asn1crypto_tests
  python -m asn1crypto_tests
  ```



  To install the package used for linting, execute:

  ```bash
  pip install --user -r requires/lint
  ```

  The following command will run the linter:

  ```bash
  python run.py lint
  ```

  Support for code coverage can be installed via:

  ```bash
  pip install --user -r requires/coverage
  ```

  Coverage is measured by running:

  ```bash
  python run.py coverage
  ```

  To change the version number of the package, run:

  ```bash
  python run.py version {pep440_version}
  ```

  To install the necessary packages for releasing a new version on PyPI, run:

  ```bash
  pip install --user -r requires/release
  ```

  Releases are created by:

   - Making a git tag in [PEP 440](https://www.python.org/dev/peps/pep-0440/#examples-of-compliant-version-schemes) format
   - Running the command:

     ```bash
     python run.py release
     ```

  Existing releases can be found at https://pypi.org/project/asn1crypto/.



  A task named `deps` exists to download and stage all necessary testing
  dependencies. On posix platforms, `curl` is used for downloads and on Windows
  PowerShell with `Net.WebClient` is used. This configuration sidesteps issues
  related to getting pip to work properly and messing with `site-packages` for
  the version of Python being used.

  The `ci` task runs `lint` (if flake8 is available for the version of Python) and
  `coverage` (or `tests` if coverage is not available for the version of Python).
  If the current directory is a clean git working copy, the coverage data is
  submitted to codecov.io.

  ```bash
  python run.py deps
  python run.py ci
  ```


pkgId: f9d18f8af3083fb7c5a58a5dfede7341cf72d9588befda9999c560d61024e99d
name: python-aspy.yaml
arch: src
version: 1.3.0
epoch: 0
release: 1
summary: A few extensions to pyyaml.
url: https://github.com/asottile/aspy.yaml
rpm_license: MIT
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-b0012d35-98b7-4d45-91fd-3546f6f0d6e1
location_href: 00010341-python-aspy-yaml/python-aspy.yaml-1.3.0-1.src.rpm
checksum_type: sha256
description:
  Some extensions to pyyaml.

  `pip install aspy.yaml`

  yaml.load which respects order for dictionaries in the yaml file.
  ```python
  >>> from aspy.yaml import ordered_load
  >>> ordered_load(
          'foo: bar\n'
          'bar: baz\n'
          'herp: derp\n'
      )
  OrderedDict([('foo', 'bar'), ('bar', 'baz'), ('herp', 'derp')])
  ```

  yaml.dump which respects order for dictionaries in the yaml file.
  ```python
  >>> from aspy.yaml import ordered_dump
  >>> print(ordered_dump(
          OrderedDict((('a', '1'), ('b', '2'), ('c', '3'), ('d', '4'))),
          default_flow_style=False,
      ))
  a: '1'
  b: '2'
  c: '3'
  d: '4'
  ```


pkgId: b0a61ba6d832225393ca3418e9d53d453c928896f07117f7f24baea5ccecbcf1
name: python-assemblyline-core
arch: src
version: 4.4.0.4
epoch: 0
release: 1
summary: Assemblyline 4 - Core components
url: https://github.com/CybercentreCanada/assemblyline-core/
rpm_license: MIT
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-44877525-11ce-4fdb-b72d-db04dced2a78
location_href: 00013520-python-assemblyline-core/python-assemblyline-core-4.4.0.4-1.src.rpm
checksum_type: sha256
description:
  This repository provides cores services for Assemblyline 4.





  Create alerts for the different submissions in the system.



  Route the files in the system while a submission is tacking place. Make sure all files during a submission are completed by all required services.



  Delete submissions and their results when their TTL expires.



  Move ingested files from the priority queues to the processing queues.



  Generates metrics of the different components in the system.



  Spin up and down services in the system depending on the load.



  Make sure the different services get their latest update files.



  Run the different workflows in the system and apply their labels, priority and status.


pkgId: 2e58f322cd760006be70f02a944b0c3c281898c3c228a121c9cb01cfb4551540
name: python-assertpy
arch: src
version: 1.1
epoch: 0
release: 1
summary: Simple assertion library for unit testing in python with a fluent API
url: https://github.com/assertpy/assertpy
rpm_license: BSD
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-db185cb7-24d2-4765-be97-d3652d8a59d0
location_href: 00010928-python-assertpy/python-assertpy-1.1-1.src.rpm
checksum_type: sha256
description:
  Simple assertions library for unit testing in Python with a nice fluent API. Supports both Python 2 and 3.


pkgId: b3a9240f914e63eafe7f6260a99ddfe74d47439c7725e1b5ca73c59a3c7b605d
name: python-asteval
arch: src
version: 0.9.29
epoch: 0
release: 1
summary: Safe, minimalistic evaluator of python expression using ast module
url: https://github.com/newville/asteval
rpm_license: MIT License
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-18f26d54-62d9-4d41-b9b1-648569407138
location_href: 00011131-python-asteval/python-asteval-0.9.29-1.src.rpm
checksum_type: sha256
description:
  ASTEVAL provides a numpy-aware, safe(ish) 'eval' function
  Emphasis is on mathematical expressions, and so numpy ufuncs
  are used if available.  Symbols are held in the Interpreter
  symbol table 'symtable':  a simple dictionary supporting a
  simple, flat namespace.
  Expressions can be compiled into ast node for later evaluation,
  using the values in the symbol table current at evaluation time.


pkgId: 754d8261987e61720282cd4b98ddc09d8c26a363dccd8437f4e377299f0cbdf3
name: python-astpretty
arch: src
version: 3.0.0
epoch: 0
release: 1
summary: Pretty print the output of python stdlib `ast.parse`.
url: https://github.com/asottile/astpretty
rpm_license: MIT
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-2cbf8ead-4364-486e-b17a-24732bc61fd8
location_href: 00013892-python-astpretty/python-astpretty-3.0.0-1.src.rpm
checksum_type: sha256
description:
  Pretty print the output of python stdlib `ast.parse`.
  astpretty is intended to be a replacement for `ast.dump`.

  `pip install astpretty`

  `astpretty` provides two api functions:

  Print a representation of the ast node.
  ```python
  >>> astpretty.pprint(ast.parse('if x == y: y += 4').body[0])
  If(
      lineno=1,
      col_offset=0,
      test=Compare(
          lineno=1,
          col_offset=3,
          left=Name(lineno=1, col_offset=3, id='x', ctx=Load()),
          ops=[Eq()],
          comparators=[Name(lineno=1, col_offset=8, id='y', ctx=Load())],
      ),
      body=[
          AugAssign(
              lineno=1,
              col_offset=11,
              target=Name(lineno=1, col_offset=11, id='y', ctx=Store()),
              op=Add(),
              value=Num(lineno=1, col_offset=16, n=4),
          ),
      ],
      orelse=[],
  )
  ```
  `indent` allows control over the indentation string:
  ```python
  >>> astpretty.pprint(ast.parse('if x == y: y += 4').body[0], indent='  ')
  If(
    lineno=1,
    col_offset=0,
    test=Compare(
      lineno=1,
      col_offset=3,
      left=Name(lineno=1, col_offset=3, id='x', ctx=Load()),
      ops=[Eq()],
      comparators=[Name(lineno=1, col_offset=8, id='y', ctx=Load())],
    ),
    body=[
      AugAssign(
        lineno=1,
        col_offset=11,
        target=Name(lineno=1, col_offset=11, id='y', ctx=Store()),
        op=Add(),
        value=Num(lineno=1, col_offset=16, n=4),
      ),
    ],
    orelse=[],
  )
  ```
  `show_offsets` controls whether the output includes line / column information:
  ```python
  >>> astpretty.pprint(ast.parse('x += 5').body[0], show_offsets=False)
  AugAssign(
      target=Name(id='x', ctx=Store()),
      op=Add(),
      value=Num(n=5),
  )
  ```

  Return a string representation of the ast node.
  Arguments are identical to `astpretty.pprint`.
  ```python
  >>> astpretty.pformat(ast.parse('if x == y: y += 4').body[0])
  "If(\n    lineno=1,\n    col_offset=0,\n    test=Compare(\n        lineno=1,\n        col_offset=3,\n        left=Name(lineno=1, col_offset=3, id='x', ctx=Load()),\n        ops=[Eq()],\n        comparators=[Name(lineno=1, col_offset=8, id='y', ctx=Load())],\n    ),\n    body=[\n        AugAssign(\n            lineno=1,\n            col_offset=11,\n            target=Name(lineno=1, col_offset=11, id='y', ctx=Store()),\n            op=Add(),\n            value=Num(lineno=1, col_offset=16, n=4),\n        ),\n    ],\n    orelse=[],\n)"
  ```

  ```python
  >>> print(ast.dump(ast.parse('if x == y: y += 4').body[0]))
  If(test=Compare(left=Name(id='x', ctx=Load()), ops=[Eq()], comparators=[Name(id='y', ctx=Load())]), body=[AugAssign(target=Name(id='y', ctx=Store()), op=Add(), value=Num(n=4))], orelse=[])
  ```

  `astpretty` works with [typed-ast](https://github.com/python/typed_ast)!
  For usage with `typed-ast` make sure you have `typed-ast` installed, a
  convenient way to do this is with the `typed` extra to `astpretty`:
  ```bash
  pip install astpretty[typed]
  ```
  The apis above work equally well with the return values from the `ast` modules
  provided by `typed_ast`:
  ```pycon
  >>> import astpretty
  >>> from typed_ast import ast3
  >>> astpretty.pprint(ast3.parse('x = 4  # type: int'))
  Module(
      body=[
          Assign(
              lineno=1,
              col_offset=0,
              targets=[Name(lineno=1, col_offset=0, id='x', ctx=Store())],
              value=Num(lineno=1, col_offset=4, n=4),
              type_comment='int',
          ),
      ],
      type_ignores=[],
  )
  ```
  With `typed-ast` installed, the commandline interface adds `--typed-27` and
  `--typed-3` options for using the alternative ast parsers:
  ```console
  $ astpretty --typed-3 t.py
  Module(
      body=[
          Assign(
              lineno=1,
              col_offset=0,
              targets=[Name(lineno=1, col_offset=0, id='x', ctx=Store())],
              value=Num(lineno=1, col_offset=4, n=4),
              type_comment='int',
          ),
      ],
      type_ignores=[],
  )
  ```


pkgId: 1a7d545d0e21dcf534d39d7ecffda8f55e9a8fe3e605634f7a93f04be3df6dce
name: python-astrometry
arch: src
version: 4.1.1
epoch: 0
release: 1
summary: Astrometry.net solver interface
url: https://github.com/neuromorphicsystems/astrometry
rpm_license: GNU General Public License v3 (GPLv3)
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-b7b504ae-bbf6-4afe-842e-4ba914e27ed7
location_href: 00003057-python-astrometry/python-astrometry-4.1.1-1.src.rpm
checksum_type: sha256
description:
  - [Astrometry](#astrometry)
  - [Get started](#get-started)
  - [Examples](#examples)
      - [Provide size and position hints](#provide-size-and-position-hints)
      - [Print progress information (download and solve)](#print-progress-information-download-and-solve)
      - [Print field stars metadata](#print-field-stars-metadata)
      - [Calculate field stars pixel positions with astropy](#calculate-field-stars-pixel-positions-with-astropy)
      - [Print series description and size (without downloading them)](#print-series-description-and-size-without-downloading-them)
      - [Disable tune-up and distortion](#disable-tune-up-and-distortion)
      - [Stop the solver early using the log-odds callback](#stop-the-solver-early-using-the-log-odds-callback)
          - [Return after the first match](#return-after-the-first-match)
          - [Return early if the best log-odds are larger than 100.0](#return-early-if-the-best-log-odds-are-larger-than-1000)
          - [Return early if there are at least ten matches](#return-early-if-there-are-at-least-ten-matches)
          - [Return early if the three best matches are similar](#return-early-if-the-three-best-matches-are-similar)
  - [Choosing series](#choosing-series)
  - [Documentation](#documentation)
      - [Solver](#solver)
      - [SizeHint](#sizehint)
      - [PositionHint](#positionhint)
      - [Action](#action)
      - [Parity](#parity)
      - [SolutionParameters](#solutionparameters)
      - [Solution](#solution)
      - [Match](#match)
      - [Star](#star)
      - [Series](#series)
      - [batches\_generator](#batches_generator)
      - [SupportsFloatMapping](#supportsfloatmapping)
  - [Contribute](#contribute)
  - [Publish](#publish)
  - [MSVC compatibility (work in progress)](#msvc-compatibility-work-in-progress)



  Astrometry turns a list of star positions into a pixel-to-sky transformation (WCS) by calling C functions from the Astrometry.net library (https://astrometry.net).

  Astrometry.net star index files ("series") are automatically downloaded when required.

  This package is useful for solving plates from a Python script, comparing star extraction methods, or hosting a simple local version of Astrometry.net with minimal dependencies. See https://github.com/dam90/astrometry for a more complete self-hosting solution.

  Unlike Astrometry.net, Astrometry does not include FITS parsing or image pre-processing algorithms. Stars must be provided as a list of pixel positions.

  This library works on Linux and macOS, but not Windows (at the moment). WSL should work but has not been tested.

  We are not the authors of the Astrometry.net library. You should cite works from https://astrometry.net/biblio.html if you use the Astrometry.net algorithm via this package.



  ```sh
  python3 -m pip install astrometry
  ```

  ```py
  import astrometry

  solver = astrometry.Solver(
      astrometry.series_5200.index_files(
          cache_directory="astrometry_cache",
          scales={6},
      )
  )

  stars = [
      [388.9140568247906, 656.5003281719216],
      [732.9210858972549, 473.66395545775106],
      [401.03459504299843, 253.788113189415],
      [312.6591868096163, 624.7527729425295],
      [694.6844564647456, 606.8371776658344],
      [741.7233477959561, 344.41284826261443],
      [867.3574610200455, 672.014835980283],
      [1063.546651153479, 593.7844603550848],
      [286.69070190952704, 422.170016812049],
      [401.12779619355155, 16.13543616977013],
      [205.12103484692776, 698.1847350789413],
      [202.88444768690894, 111.24830187635557],
      [339.1627757703069, 86.60739435924549],
  ]

  solution = solver.solve(
      stars=stars,
      size_hint=None,
      position_hint=None,
      solution_parameters=astrometry.SolutionParameters(),
  )

  if solution.has_match():
      print(f"{solution.best_match().center_ra_deg=}")
      print(f"{solution.best_match().center_dec_deg=}")
      print(f"{solution.best_match().scale_arcsec_per_pixel=}")
  ```

  `solve` is thread-safe. It can be called any number of times from the same `Solver` object.





  ```py
  import astrometry

  solver = ...
  solution = solver.solve(
      stars=...,
      size_hint=astrometry.SizeHint(
          lower_arcsec_per_pixel=1.0,
          upper_arcsec_per_pixel=2.0,
      ),
      position_hint=astrometry.PositionHint(
          ra_deg=65.7,
          dec_deg=36.2,
          radius_deg=1.0,
      ),
      solution_parameters=...
  )
  ```



  ```py
  import astrometry
  import logging

  logging.getLogger().setLevel(logging.INFO)

  solver = ...
  solution = ...
  ```



  Astrometry extracts metadata from the star index ("series"). See [Choosing series](#choosing-series) for a description of the available data.

  ```py
  import astrometry

  solver = ...
  solution = ...

  if solution.has_match():
      for star in solution.best_match().stars:
          print(f"{star.ra_deg}º, {star.dec_deg}º:", star.metadata)
  ```



  ```py
  import astrometry

  solver = ...
  solution = ...

  if solution.has_match():
      wcs = solution.best_match().astropy_wcs()
      pixels = wcs.all_world2pix(
          [[star.ra_deg, star.dec_deg] for star in solution.best_match().stars],
          0,
      )
      
  ```

  `astropy.wcs.WCS` provides many more functions to probe the transformation properties and convert from and to pixel coordinates. See https://docs.astropy.org/en/stable/api/astropy.wcs.WCS.html for details. Astropy (https://pypi.org/project/astropy/) must be installed to use this method.



  ```py
  import astrometry

  print(astrometry.series_5200_heavy.description)
  print(astrometry.series_5200_heavy.size_as_string({2, 3, 4}))
  ```

  See [Choosing Series](#choosing-series) for a list of available series.



  ```py
  import astrometry

  solver = ...
  solution = solver.solve(
      stars=...,
      size_hint=...,
      position_hint=...,
      solution_parameters=astrometry.SolutionParameters(
          sip_order=0,
          tune_up_logodds_threshold=None,
      ),
  )
  ```





  ```py
  import astrometry

  solver = ...
  solution = solver.solve(
      stars=...,
      size_hint=...,
      position_hint=...,
      solution_parameters=astrometry.SolutionParameters(
          logodds_callback=lambda logodds_list: astrometry.Action.STOP,
      ),
  )
  ```



  ```py
  import astrometry

  solver = ...
  solution = solver.solve(
      stars=...,
      size_hint=...,
      position_hint=...,
      solution_parameters=astrometry.SolutionParameters(
          logodds_callback=lambda logodds_list: (
              astrometry.Action.STOP
              if logodds_list[0] > 100.0
              else astrometry.Action.CONTINUE
          ),
      ),
  )
  ```



  ```py
  import astrometry

  solver = ...
  solution = solver.solve(
      stars=...,
      size_hint=...,
      position_hint=...,
      solution_parameters=astrometry.SolutionParameters(
          logodds_callback=lambda logodds_list: (
              astrometry.Action.STOP
              if len(logodds_list) >= 10.0
              else astrometry.Action.CONTINUE
          ),
      ),
  )
  ```



  ```py
  import astrometry

  def logodds_callback(logodds_list: list[float]) -> astrometry.Action:
      if len(logodds_list) < 3:
          return astrometry.Action.CONTINUE
      if logodds[1] > logodds[0] - 10 and logodds[2] > logodds[0] - 10:
          return astrometry.Action.STOP
      return astrometry.Action.CONTINUE


  solver = ...
  solution = solver.solve(
      stars=...,
      size_hint=...,
      position_hint=...,
      solution_parameters=astrometry.SolutionParameters(
          logodds_callback=logodds_callback,
      ),
  )
  ```



  This library downloads series from http://data.astrometry.net. A solver can be instantiated with multiple series and scales as follows:

  ```py
  import astrometry

  solver = astrometry.Solver(
      astrometry.series_5200.index_files(
          cache_directory="astrometry_cache",
          scales={4, 5, 6},
      )
      + astrometry.series_4200.index_files(
          cache_directory="astrometry_cache",
          scales={6, 7, 12},
      )
  )
  ```

  Astrometry.net gives the following recommendations to choose a scale:

  > Each index file contains a large number of “skymarks” (landmarks for the sky) that allow our solver to identify your images. The skymarks contained in each index file have sizes (diameters) within a narrow range. You probably want to download index files whose quads are, say, 10% to 100% of the sizes of the images you want to solve.
  >
  > For example, let’s say you have some 1-degree square images. You should grab index files that contain skymarks of size 0.1 to 1 degree, or 6 to 60 arcminutes. Referring to the table below, you should [try index files with scales 3 to 9]. You might find that the same number of fields solve, and faster, using just one or two of the index files in the middle of that range - in our example you might try [5, 6 and 7].
  >
  > -- _http://astrometry.net/doc/readme.html_

  | Scale                     | 0               | 1               | 2               | 3               | 4            | 5             | 6             | 7             | 8             | 9             | 10            | 11             | 12              | 13              | 14              | 15              | 16              | 17               | 18                | 19                |
  | ------------------------- | --------------- | --------------- | --------------- | --------------- | ------------ | ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | -------------- | --------------- | --------------- | --------------- | --------------- | --------------- | ---------------- | ----------------- | ----------------- |
  | Skymark diameter (arcmin) | [2.0,&nbsp;2.8] | [2.8,&nbsp;4.0] | [4.0,&nbsp;5.6] | [5.6,&nbsp;8.0] | [8,&nbsp;11] | [11,&nbsp;16] | [16,&nbsp;22] | [22,&nbsp;30] | [30,&nbsp;42] | [42,&nbsp;60] | [60,&nbsp;85] | [85,&nbsp;120] | [120,&nbsp;170] | [170,&nbsp;240] | [240,&nbsp;340] | [340,&nbsp;480] | [480,&nbsp;680] | [680,&nbsp;1000] | [1000,&nbsp;1400] | [1400,&nbsp;2000] |

  The table below lists series sizes and properties (we copied the descriptions from http://data.astrometry.net). You can access a series' object with `astrometry.series_{name}` (for example `astrometry.series_4200`).

  | Name       | Total&nbsp;size | Scales       | Description                                                                                                                                                                                                                                          | Metadata                                                                                                                                                                                                                                                                                                                                                                                  |
  | ---------- | --------------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | 4100       | 0.36&nbsp;GB    | [7,&nbsp;19] | built from the Tycho-2 catalog, good for images wider than 1 degree, recommended                                                                                                                                                                     | MAG_BT:&nbsp;float<br />MAG_VT:&nbsp;float<br />MAG_HP:&nbsp;float<br />MAG:&nbsp;float                                                                                                                                                                                                                                                                                                   |
  | 4200       | 33.78&nbsp;GB   | [0,&nbsp;19] | built from the near-infared 2MASS survey, runs out of stars at the low end, most users will probably prefer 4100 or 5200                                                                                                                             | j_mag:&nbsp;float                                                                                                                                                                                                                                                                                                                                                                         |
  | 5000       | 76.24&nbsp;GB   | [0,&nbsp;7]  | an older version from Gaia-DR2 but without Tycho-2 stars merged in, our belief is that series_5200 will work better than this one                                                                                                                    | source_id:&nbsp;int<br />phot_g_mean_mag:&nbsp;float<br />phot_bp_mean_mag:&nbsp;float<br />phot_rp_mean_mag:&nbsp;float<br />parallax:&nbsp;float<br />parallax_error:&nbsp;float<br />pmra:&nbsp;float<br />pmra_error:&nbsp;float<br />pmdec:&nbsp;float<br />pmdec_error:&nbsp;float<br />ra:&nbsp;float<br />dec:&nbsp;float<br />ref_epoch:&nbsp;float                              |
  | 5200       | 36.14&nbsp;GB   | [0,&nbsp;6]  | LIGHT version built from Tycho-2 + Gaia-DR2, good for images narrower than 1 degree, combine with 4100-series for broader scale coverage, the LIGHT version contains smaller files with no additional Gaia-DR2 information tagged along, recommended | -                                                                                                                                                                                                                                                                                                                                                                                         |
  | 5200_heavy | 79.67&nbsp;GB   | [0,&nbsp;6]  | HEAVY version same as 5200, but with additional Gaia-DR2 information (magnitude in G, BP, RP, proper motions and parallaxes), handy if you want that extra Gaia information for matched stars                                                        | ra:&nbsp;float<br />dec:&nbsp;float<br />mag:&nbsp;float<br />ref_cat:&nbsp;str<br />ref_id:&nbsp;int<br />pmra:&nbsp;float<br />pmdec:&nbsp;float<br />parallax:&nbsp;float<br />ra_ivar:&nbsp;float<br />dec_ivar:&nbsp;float<br />pmra_ivar:&nbsp;float<br />pmdec_ivar:&nbsp;float<br />parallax_ivar:&nbsp;float<br />phot_bp_mean_mag:&nbsp;float<br />phot_rp_mean_mag:&nbsp;float |
  | 6000       | 1.20&nbsp;GB    | [4,&nbsp;6]  | very specialized, uses GALEX Near-UV measurements, and only a narrow range of scales                                                                                                                                                                 | fuv_mag:&nbsp;float<br />nuv_mag:&nbsp;float                                                                                                                                                                                                                                                                                                                                              |
  | 6100       | 1.58&nbsp;GB    | [4,&nbsp;6]  | very specialized, uses GALEX Far-UV measurements, and only a narrow range of scales                                                                                                                                                                  | fuv_mag:&nbsp;float<br />nuv_mag:&nbsp;float                                                                                                                                                                                                                                                                                                                                              |

  The table below indicates the total file size for each scale (most series have multiple index files per scale).

  | Name       | 0             | 1             | 2             | 3            | 4              | 5              | 6              | 7              | 8             | 9             | 10            | 11            | 12           | 13           | 14           | 15             | 16             | 17             | 18             | 19             |
  | ---------- | ------------- | ------------- | ------------- | ------------ | -------------- | -------------- | -------------- | -------------- | ------------- | ------------- | ------------- | ------------- | ------------ | ------------ | ------------ | -------------- | -------------- | -------------- | -------------- | -------------- |
  | 4100       | -             | -             | -             | -            | -              | -              | -              | 165.00&nbsp;MB | 94.55&nbsp;MB | 49.77&nbsp;MB | 24.87&nbsp;MB | 10.21&nbsp;MB | 5.30&nbsp;MB | 2.73&nbsp;MB | 1.38&nbsp;MB | 740.16&nbsp;kB | 408.96&nbsp;kB | 247.68&nbsp;kB | 187.20&nbsp;kB | 144.00&nbsp;kB |
  | 4200       | 14.22&nbsp;GB | 9.25&nbsp;GB  | 5.06&nbsp;GB  | 2.63&nbsp;GB | 1.31&nbsp;GB   | 659.09&nbsp;MB | 328.25&nbsp;MB | 165.44&nbsp;MB | 81.84&nbsp;MB | 41.18&nbsp;MB | 20.52&nbsp;MB | 8.02&nbsp;MB  | 4.17&nbsp;MB | 2.16&nbsp;MB | 1.10&nbsp;MB | 596.16&nbsp;kB | 339.84&nbsp;kB | 213.12&nbsp;kB | 164.16&nbsp;kB | 132.48&nbsp;kB |
  | 5000       | 34.79&nbsp;GB | 20.19&nbsp;GB | 10.74&nbsp;GB | 5.44&nbsp;GB | 2.71&nbsp;GB   | 1.36&nbsp;GB   | 676.79&nbsp;MB | 340.73&nbsp;MB | -             | -             | -             | -             | -            | -            | -            | -              | -              | -              | -              | -              |
  | 5200       | 17.20&nbsp;GB | 9.49&nbsp;GB  | 4.86&nbsp;GB  | 2.45&nbsp;GB | 1.22&nbsp;GB   | 614.89&nbsp;MB | 307.72&nbsp;MB | -              | -             | -             | -             | -             | -            | -            | -            | -              | -              | -              | -              | -              |
  | 5200_heavy | 36.46&nbsp;GB | 21.20&nbsp;GB | 11.29&nbsp;GB | 5.72&nbsp;GB | 2.85&nbsp;GB   | 1.43&nbsp;GB   | 714.56&nbsp;MB | -              | -             | -             | -             | -             | -            | -            | -            | -              | -              | -              | -              | -              |
  | 6000       | -             | -             | -             | -            | 892.55&nbsp;MB | 457.66&nbsp;MB | 233.23&nbsp;MB | -              | -             | -             | -             | -             | -            | -            | -            | -              | -              | -              | -              | -              |
  | 6100       | -             | -             | -             | -            | 599.33&nbsp;MB | 384.09&nbsp;MB | 214.79&nbsp;MB | -              | -             | -             | -             | -             | -            | -            | -            | -              | -              | -              | -              | -              |





  ```py
  class Solver:
      def __init__(self, index_files: list[pathlib.Path]): ...

      def solve(
          self,
          stars: typing.Iterable[SupportsFloatMapping],
          size_hint: typing.Optional[SizeHint],
          position_hint: typing.Optional[PositionHint],
          solution_parameters: SolutionParameters,
      ) -> Solution: ...
  ```

  `solve` is thread-safe and can be called any number of times.

  -   `index_files`: List of index files to use for solving. The list need not come from a `Series` object. Series subsets and combinations are possible as well.
  -   `star`: iterator over a list of pixel coordinates for the input stars.
  -   `size_hint`: Optional angular pixel size range ([SizeHint](#sizehint)). Significantly speeds up `solve` when provided. If `size_hint` is `None`, the range `[0.1, 1000.0]` is used. This default range can be changed by setting `astrometry.DEFAULT_LOWER_ARCSEC_PER_PIXEL` and `astrometry.DEFAULT_UPPER_ARCSEC_PER_PIXEL` to other values.
  -   `position_hint`: Optional field center Ra/Dec coordinates and error radius ([PositionHint](#positionhint)). Significantly speeds up `solve` when provided. If `position_hint` is None, the entire sky is used (`radius_deg = 180.0`).
  -   `solution_parameters`: Advanced solver parameters ([SolutionParameters](#solutionparameters))



  ```py
  @dataclasses.dataclass
  class SizeHint:
      lower_arcsec_per_pixel: float
      upper_arcsec_per_pixel: float
  ```

  `lower_arcsec_per_pixel` and `upper_arcsec_per_pixel` must be larger than `0` and `upper_arcsec_per_pixel` must be smaller than or equal to `upper_arcsec_per_pixel`.



  ```py
  @dataclasses.dataclass
  class PositionHint:
      ra_deg: float
      dec_deg: float
      radius_deg: float
  ```

  -   `ra_deg` must be in the range `[0.0, 360.0[`.
  -   `dec_deg` must be in the range `[-90.0, 90.0]`.
  -   `radius` must be larger than or equal to zero.

  All values are in degrees and must use the same frame of reference as the index files. Astrometry.net index files use J2000 FK5 (https://docs.astropy.org/en/stable/api/astropy.coordinates.FK5.html). ICRS and FK5 differ by less than 0.1 arcsec (https://www.iers.org/IERS/EN/Science/ICRS/ICRS.html).



  ```py
  class Action(enum.Enum):
      STOP = 0
      CONTINUE = 1
  ```



  ```py
  class Parity(enum.IntEnum):
      NORMAL = 0
      FLIP = 1
      BOTH = 2
  ```



  ```py
  @dataclasses.dataclass
  class SolutionParameters:
      solve_id: typing.Optional[str] = None
      uniformize_index: bool = True
      deduplicate: bool = True
      sip_order: int = 3
      sip_inverse_order: int = 0
      distance_from_quad_bonus: bool = True
      positional_noise_pixels: float = 1.0
      distractor_ratio: float = 0.25
      code_tolerance_l2_distance: float = 0.01
      minimum_quad_size_pixels: typing.Optional[float] = None
      minimum_quad_size_fraction: float = 0.1
      maximum_quad_size_pixels: float = 0.0
      maximum_quads: int = 0
      maximum_matches: int = 0
      parity: Parity = Parity.BOTH
      tune_up_logodds_threshold: typing.Optional[float] = 14.0
      output_logodds_threshold: float = 21.0
      slices_generator: typing.Callable[[int], typing.Iterable[tuple[int, int]]] = astrometry.batches_generator(25)
      logodds_callback: typing.Callable[[list[float]], Action] = lambda _: Action.CONTINUE
  ```

  -   `solve_id`: Optional plate identifier used in logging messages. If `solve_id` is `None`, it is automatically assigned a unique integer. The value can be retrieved from the Solution object (`solution.solve_id`).
  -   `uniformize_index`: Uniformize field stars at the matched index scale before verifying a match.
  -   `deduplicate`: De-duplicate field stars before verifying a match.
  -   `sip_order`: Polynomial order of the Simple Imaging Polynomial distortion (see https://irsa.ipac.caltech.edu/data/SPITZER/docs/files/spitzer/shupeADASS.pdf). `0` disables SIP distortion. `tune_up_logodds_threshold` must be `None` if `sip_order` is `0`.
  -   `sip_inverse_order`: Polynomial order of the inversee Simple Polynomial distortion. Usually equal to `sip_order`. `0` means "equal to `sip_order`".
  -   `distance_from_quad_bonus`: Assume that stars far from the matched quad will have larger positional variance.
  -   `positional_noise_pixels`: Expected error on the positions of stars.
  -   `distractor_ratio`: Fraction of distractors in the range `]0, 1]`.
  -   `code_tolerance_l2_distance`: Code tolerance in 4D codespace L2 distance.
  -   `minimum_quad_size_pixels`: Minimum size of field quads to try, `None` calculates the size automatically as `minimum_quad_size_fraction * min(Δx, Δy)`, where `Δx` (resp. `Δy`) is the maximum `x` distance (resp. `y` distance) between stars in the field.
  -   `minimum_quad_size_fraction`: Only used if `minimum_quad_size_pixels` is `None` (see above).
  -   `maximum_quad_size_pixels`: Maximum size of field quads to try, `0.0` means no limit.
  -   `maximum_quads`: Number of field quads to try, `0` means no limit.
  -   `maximum_matches`: Number of quad matches to try, `0` means no limit.
  -   `parity`: Parity.NORMAL does not flip the axes, Parity.FLIP does, and Parity.BOTH tries flipped and non-flipped axes (at the cost of doubling computations).
  -   `tune_up_logodds_threshold`: Matches whose log-odds are larger than this value are tuned-up (SIP distortion estimation) and accepted if their post-tune-up log-odds are larger than `output_logodds_threshold`. `None` disables tune-up and distortion estimation (SIP). The default Astrometry.net value is `math.log(1e6)`.
  -   `output_logodds_threshold`: Matches whose log-odds are larger than this value are immediately accepted (added to the solution matches). The default Astrometry.net value is `math.log(1e9)`.
  -   `slices_generator`: User-provided function that takes a number of stars as parameter and returns an iterable (such as list) of two-elements tuples representing ranges. The first tuple item (start) is included while the second tuple item (end) is not. The returned ranges can have a variable size and/or overlap. The algorithm compares each range with the star catalogue sequentially. Small ranges significantly speed up the algorithm but increase the odds of missing matches. `astrometry.batches_generator(n)` generates non-overlapping batches of `n` stars.
  -   `logodds_callback`: User-provided function that takes a list of matches log-odds as parameter and returns an `astrometry.Action` object. `astrometry.Action.CONTINUE` tells the solver to keep searching for matches whereas `astrometry.Action.STOP` tells the solver to return the current matches immediately. The log-odds list is sorted from highest to lowest value and should not be modified by the callback function.

  Accepted matches are always tuned up, even if they hit `tune_up_logodds_threshold` and were already tuned-up. Since log-odds are compared with the thresholds before the tune-up, the final log-odds are often significantly larger than `output_logodds_threshold`. Set `tune_up_logodds_threshold` to a value larger than or equal to `output_logodds_threshold` to disable the first tune-up, and `None` to disable tune-up altogether. Tune-up logic is equivalent to the following Python snippet:

  ```py





  if tune_up_logodds_threshold is None:
      if log_odds >= output_logodds_threshold:
          add_to_solution(match)
  else:
      if log_odds >= output_logodds_threshold:
          tuned_up_match, tuned_up_loggods = tune_up(match)
          add_to_solution(tuned_up_match)
      elif log_odds >= tune_up_logodds_threshold:
          tuned_up_match, tuned_up_loggods = tune_up(match)
          if tuned_up_loggods >= output_logodds_threshold:
              tuned_up_twice_match, tuned_up_twice_loggods = tune_up(tuned_up_match)
              add_to_solution(tuned_up_twice_match)
  ```

  Astrometry.net gives the following description of the tune-up algorithm. See `tweak2` in _astrometry.net/solver/tweak2.c_ for the implementation.

  > Given an initial WCS solution, compute SIP polynomial distortions using an annealing-like strategy. That is, it finds matches between image and reference catalog by searching within a radius, and that radius is small near a region of confidence, and grows as you move away. That makes it possible to pick up more distant matches, but they are downweighted in the fit. The annealing process reduces the slope of the growth of the matching radius with respect to the distance from the region of confidence.
  >
  > -- _astrometry.net/include/astrometry/tweak2.h_



  ```py
  @dataclasses.dataclass
  class Solution:
      solve_id: str
      matches: list[Match]

      def has_match(self) -> bool: ...

      def best_match(self) -> Match: ...

      def to_json(self) -> str: ...

      @classmethod
      def from_json(cls, solution_as_json: str) -> Solution: ...

  ```

  `matches` are sorted in descending log-odds order. `best_match` returns the first match in the list. `to_json` and `from_json` may be used to save and load solutions.



  ```py
  @dataclasses.dataclass
  class Match:
      logodds: float
      center_ra_deg: float
      center_dec_deg: float
      scale_arcsec_per_pixel: float
      index_path: pathlib.Path
      stars: tuple[Star, ...]
      quad_stars: tuple[Star, ...]
      wcs_fields: dict[str, tuple[typing.Any, str]]

      def astropy_wcs(self) -> astropy.wcs.WCS: ...
  ```

  -   `logodds`: Log-odds (https://en.wikipedia.org/wiki/Logit) of the match.
  -   `center_ra_deg`: Right ascension of the stars bounding box's center, in degrees and in the frame of reference of the index (J200 FK5 for Astrometry.net series).
  -   `center_dec_deg`: Declination of the stars bounding box's center in degrees and in the frame of reference of the index (J200 FK5 for Astrometry.net series).
  -   `scale_arcsec_per_pixel`: Pixel scale in arcsec per pixel.
  -   `index_path`: File system path of the index file used for this match.
  -   `stars`: List of visible index stars. This list is almost certainly going to differ from the input stars list.
  -   `quad_stars`: The index stars subset (usually 4 but can be 3 or 5) used in the hash code search step (see https://arxiv.org/pdf/0910.2233.pdf, 2. Methods).
  -   `wcs_fields`: WCS fields describing the transformation between pixel coordinates and world coordinates. This dictionary can be passed directly to `astropy.wcs.WCS`.

  `astropy_wcs` generates an Astropy WCS object. Astropy (https://pypi.org/project/astropy/) must be installed to use this method. See [Calculate field stars pixel positions with astropy](#calculate-field-stars-pixel-positions-with-astropy) for details.



  ```py
  @dataclasses.dataclass
  class Star:
      ra_deg: float
      dec_deg: float
      metadata: dict[str, typing.Any]
  ```

  `ra_deg` and `dec_deg` are in degrees and use the same frame of reference as the index files. Astrometry.net index files use J2000 FK5 (https://docs.astropy.org/en/stable/api/astropy.coordinates.FK5.html). ICRS and FK5 differ by less than 0.1 arcsec (https://www.iers.org/IERS/EN/Science/ICRS/ICRS.html).

  The contents of `metadata` depend on the data available in index files. See [Series](#series) for details.



  ```py
  @dataclasses.dataclass
  class Series:
      name: str
      description: str
      scale_to_sizes: dict[int, tuple[int, ...]]
      url_pattern: str

      def size(self, scales: typing.Optional[set[int]] = None): ...

      def size_as_string(self, scales: typing.Optional[set[int]] = None): ...

      def index_files(
          self,
          cache_directory: typing.Union[bytes, str, os.PathLike],
          scales: typing.Optional[set[int]] = None,
      ) -> list[pathlib.Path]: ...
  ```

  -   `name` defines the cache subdirectory name.
  -   `description` is a copy of the text description in http://data.astrometry.net.
  -   `scale_to_sizes` maps each available HEALPix resolution to index files sizes in bytes. The smaller the scale, the larger the number of HEALPix subdivisions.
  -   `url_pattern` is the base pattern used to generate file download links.
  -   `size` returns the cumulative file sizes for the given scales in bytes. If `scales` is `None`, all the scales available for the series are used.
  -   `size_as_string` returns a human-readable string representation of `size`.
  -   `index_files` returns index files paths for the given scales (or all available scales if `scales` is `None`). This function downloads files that are not already in the cache directory. `cache_directory` is created if it does not exist. Download automatically resumes for partially downloaded files.

  Change the constants `astrometry.CHUNK_SIZE`, `astrometry.DOWNLOAD_SUFFIX` and `astrometry.TIMEOUT` to configure the downloader parameters.



  ```py
  def batches_generator(
      batch_size: int,
  ) -> typing.Callable[[int], typing.Iterable[tuple[int, int]]]:
      ...
  ```

  -   `batch_size` sets the size of the generated batches.

  `batches_generator` returns a slices generator compatible with `SolutionParameters.slices_generator`. The slices are non-overlapping and non-full slices are ignored. For instance, a batch size of `25` over `83` stars would generate the slices `(0, 25)`, `(25, 50)`, and `(50, 75)`.



  ```py
  class SupportsFloatMapping(typing.Protocol):
      def __getitem__(self, index: typing.SupportsIndex, /) -> typing.SupportsFloat:
          ...
  ```



  Clone this repository and pull its submodule:

  ```
  git clone --recursive https://github.com/neuromorphicsystems/astrometry.git
  cd astrometry
  ```

  or

  ```
  git clone https://github.com/neuromorphicsystems/astrometry.git
  cd astrometry
  git submodule update --recursive
  ```

  Format the code:

  ```sh
  clang-format -i astrometry_extension/astrometry_extension.c astrometry_extension/astrometry_extension_utilities.h
  ```

  Build a local version:

  ```sh
  python3 -m pip install -e .

  ```



  1. Bump the version number in _setup.py_.

  2. Create a new release on GitHub.



  -   _fitsbin.c_, _kdtree_internal.c_, _kdtree_internal_fits.c_, _solver.c_: replace Variable Length Arrays (VAL) with \_alloca (`type name[size]` -> `type* name = _alloca(size)`)
  -   _fitsbin.c_, _fitsioutils.c_, _fitstable.c_: cast `void*` to `char*` to enable pointer arithmetic
  -   _anqfits.c_, _verify.c_: `#define debug(args...)` -> `#define debug(...)`
  -   _qfits_time.c_: remove `#include <pwd.h>`
  -   _log.h_, _keywords.h_: remove `__attribute__` directives
  -   _bl.c_: remove redundant bl.inc and bl_nl.c includes
  -   replace all POSIX calls (file IO, network, select...). This requires significant effort when targeting the entire Astrometry.net library. It might be less complicated with Astrometry, which uses only a subset of Astrometry.net.


pkgId: 4444b07d52a9f0b3f7cafb857aa3a4b851c3c3382311fc8f5bb764c1c318a522
name: python-astroplan
arch: src
version: 0.8
epoch: 0
release: 1
summary: Observation planning package for astronomers
url: https://github.com/astropy/astroplan
rpm_license: BSD
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-574f5616-2ac5-4dfd-b29a-0bb6c51bef5e
location_href: 00003058-python-astroplan/python-astroplan-0.8-1.src.rpm
checksum_type: sha256
description:
  Observation planning package for astronomers
  * Code: https://github.com/astropy/astroplan
  * Docs: https://astroplan.readthedocs.io/
  * License: BSD-3
  Attribution
  +++++++++++
  If you use astroplan in your work, please cite `Morris et al. 2018 <https://ui.adsabs.harvard.edu/abs/2018AJ....155..128M/abstract>`_:
    @ARTICLE{2018AJ....155..128M,
           author = {{Morris}, Brett M. and {Tollerud}, Erik and {Sip{\H{o}}cz}, Brigitta and {Deil}, Christoph and {Douglas}, Stephanie T. and {Berlanga Medina}, Jazmin and {Vyhmeister}, Karl and {Smith}, Toby R. and {Littlefair}, Stuart and {Price-Whelan}, Adrian M. and {Gee}, Wilfred T. and {Jeschke}, Eric},
            title = "{astroplan: An Open Source Observation Planning Package in Python}",
          journal = {\aj},
         keywords = {methods: numerical, methods: observational, Astrophysics - Instrumentation and Methods for Astrophysics},
             year = 2018,
            month = mar,
           volume = {155},
           number = {3},
              eid = {128},
            pages = {128},
              doi = {10.3847/1538-3881/aaa47e},
    archivePrefix = {arXiv},
           eprint = {1712.09631},
     primaryClass = {astro-ph.IM},
           adsurl = {https://ui.adsabs.harvard.edu/abs/2018AJ....155..128M},
          adsnote = {Provided by the SAO/NASA Astrophysics Data System}
    }


pkgId: 009a264c2c9c5c275145fcc0daea04a37825159d25c728616658ec6de4d9fb5a
name: python-astropy-healpix
arch: src
version: 0.7
epoch: 0
release: 1
summary: BSD-licensed HEALPix for Astropy
url: https://github.com/astropy/astropy-healpix
rpm_license: BSD 3-Clause
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-3bd2a72f-e8d5-4e09-b7b0-5af898142076
location_href: 00003061-python-astropy-healpix/python-astropy-healpix-0.7-1.src.rpm
checksum_type: sha256
description:
  This is a BSD-licensed HEALPix package developed by the Astropy project
  and based on C code written by Dustin Lang in `astrometry.net <http://astrometry.net/>`__. See the
  `Documentation <http://astropy-healpix.readthedocs.io>`__ for
  information about installing and using this package.


pkgId: 8e216a1970554cadd1bf5037a73b2552c9664f7355acee179b4e9eaea0a2416f
name: python-astropy-helpers
arch: src
version: 4.0.1
epoch: 0
release: 1
summary: Utilities for building and installing packages in the Astropy ecosystem
url: https://github.com/astropy/astropy-helpers
rpm_license: BSD 3-Clause License
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-adeb529a-0080-4332-8775-e0da38e3610a
location_href: 00003062-python-astropy-helpers/python-astropy-helpers-4.0.1-1.src.rpm
checksum_type: sha256
description:
  The **astropy-helpers** package includes many build, installation, and
  documentation-related tools used by the Astropy project, but packaged separately
  for use by other projects that wish to leverage this work. The motivation behind
  this package and details of its implementation are in the accepted
  `Astropy Proposal for Enhancement (APE) 4 <https://github.com/astropy/astropy-APEs/blob/master/APE4.rst>`_.
  Astropy-helpers is not a traditional package in the sense that it is not
  intended to be installed directly by users or developers. Instead, it is meant
  to be accessed when the ``setup.py`` command is run - see the
  "`Using astropy-helpers in a package <https://astropy-helpers.readthedocs.io/en/stable/using.html>`_"
  section in the documentation for how to do this.
  For a real-life example of how to implement astropy-helpers in a
  project, see the ``setup.py`` and ``setup.cfg`` files of the
  `Affiliated package template <https://github.com/astropy/package-template>`_.
  For more information, see the documentation at http://astropy-helpers.readthedocs.io


pkgId: df2d60b028b33fa8fe75413b7d6f21dd663e8b058db0b86aa835719c28c60517
name: python-astroscrappy
arch: src
version: 1.1.0
epoch: 0
release: 1
summary: Speedy Cosmic Ray Annihilation Package in Python
url: https://github.com/astropy/astroscrappy
rpm_license: BSD 3-Clause
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-1b0d2d0d-5f05-47d4-a874-413f13249abb
location_href: 00003064-python-astroscrappy/python-astroscrappy-1.1.0-1.src.rpm
checksum_type: sha256
description:
  An optimized cosmic ray detector.
  Astro-SCRAPPY is designed to detect cosmic rays in images (numpy arrays),
  based on Pieter van Dokkum's L.A.Cosmic algorithm.
  Much of this was originally adapted from cosmics.py written by Malte Tewes.
  I have ported all of the slow functions to Cython/C, and optimized
  where I can. This is designed to be as fast as possible so some of the
  readability has been sacrificed, specifically in the C code.
  If you use this code, please cite the Zendo DOI: https://zenodo.org/record/1482019
  Please cite the original paper which can be found at:
  http://www.astro.yale.edu/dokkum/lacosmic/
  van Dokkum 2001, PASP, 113, 789, 1420
  (article : http://adsabs.harvard.edu/abs/2001PASP..113.1420V)
  This code requires Cython, preferably version >= 0.21.
  Parallelization is achieved using OpenMP. This code should compile (although
  the Cython files may have issues) using a compiler that does not support OMP,
  e.g. clang.


pkgId: d3a9243937760d75985d00119d172a55e20a2c9801edbda08b794d92c28953b3
name: python-asttokens
arch: src
version: 2.2.1
epoch: 0
release: 1
summary: Annotate AST trees with source code positions
url: https://github.com/gristlabs/asttokens
rpm_license: Apache 2.0
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-34237cf6-c807-4ee7-9e58-f69225ce9768
location_href: 00003065-python-asttokens/python-asttokens-2.2.1-1.src.rpm
checksum_type: sha256
description:
  The ``asttokens`` module annotates Python abstract syntax trees (ASTs) with the positions of tokens
  and text in the source code that generated them.
  It makes it possible for tools that work with logical AST nodes to find the particular text that
  resulted in those nodes, for example for automated refactoring or highlighting.


pkgId: b78b75e7af0c3267c423f8d2cf3882bc3d695f7ecc5481faf25bee3143307de3
name: python-async-upnp-client
arch: src
version: 0.33.1
epoch: 0
release: 1
summary: Async UPnP Client
url: https://github.com/StevenLooman/async_upnp_client
rpm_license: Apache 2
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-fb0bb65f-9e49-4c36-8b29-47619b9c8d5d
location_href: 00003068-python-async-upnp-client/python-async-upnp-client-0.33.1-1.src.rpm
checksum_type: sha256
description:
  Asyncio UPnP Client library for Python/asyncio.
  Written initially for use in `Home Assistant <https://github.com/home-assistant/home-assistant>`_ to drive `DLNA DMR`-capable devices, but useful for other projects as well.


pkgId: 89723e980192a50aea5ad013d9df41522deaed97bce7309d23caf4e2ad1fc06d
name: python-async_generator
arch: src
version: 1.10
epoch: 0
release: 1
summary: Async generators and context managers for Python 3.5+
url: https://github.com/python-trio/async_generator
rpm_license: MIT -or- Apache License 2.0
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-a5c3201e-e371-4feb-a168-81d80476bbc6
location_href: 00003066-python-async-generator/python-async_generator-1.10-1.src.rpm
checksum_type: sha256
description:
  Python 3.6 added `async generators
  <https://www.python.org/dev/peps/pep-0525/>`__. (What's an async
  generator? `Check out my 5-minute lightning talk demo from PyCon 2016
  <https://youtu.be/PulzIT8KYLk?t=24m30s>`__.) Python 3.7 adds some more
  tools to make them usable, like ``contextlib.asynccontextmanager``.
  This library gives you all that back to Python 3.5.
  For example, this code only works in Python 3.6+:
     async def load_json_lines(stream_reader):
         async for line in stream_reader:
             yield json.loads(line)
  But this code does the same thing, and works on Python 3.5+:
     from async_generator import async_generator, yield_
     @async_generator
     async def load_json_lines(stream_reader):
         async for line in stream_reader:
             await yield_(json.loads(line))
  Or in Python 3.7, you can write:
     from contextlib import asynccontextmanager
     @asynccontextmanager
     async def background_server():
         async with trio.open_nursery() as nursery:
             value = await nursery.start(my_server)
             try:
                 yield value
             finally:
                 
                 nursery.cancel_scope.cancel()
  This is the same, but back to 3.5:
     from async_generator import async_generator, yield_, asynccontextmanager
     @asynccontextmanager
     @async_generator
     async def background_server():
         async with trio.open_nursery() as nursery:
             value = await nursery.start(my_server)
             try:
                 await yield_(value)
             finally:
                 
                 nursery.cancel_scope.cancel()
  (And if you're on 3.6, you can use ``@asynccontextmanager`` with
  native generators.)


pkgId: 5c7d4d399141347c5e4d58932103f736c2b5bad9a6280a0a6bc3687d3cd7c648
name: python-asyncinit
arch: src
version: 0.2.4
epoch: 0
release: 1
summary: Class decorator to enable async __init__
url: https://github.com/kchmck/pyasyncinit
rpm_license: MIT
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-9c78c86d-90c6-4ef2-965b-f7fc741f4553
location_href: 00013535-python-asyncinit/python-asyncinit-0.2.4-1.src.rpm
checksum_type: sha256
description:
  [Documentation](http://kchmck.github.io/pdoc/asyncinit/)

  This package provides the `asyncinit` decorator, which enables an asynchronous constructor
  to be called like any other asynchronous function.



  ```python
  from asyncinit import asyncinit

  @asyncinit
  class MyClass:
      async def __init__(self, param):
          self.val = await self.deferredFn(param)

      async def deferredFn(self, x):
          
          return x + 2

  obj = await MyClass(42)
  assert obj.val == 44
  ```



  This package requires Python >= 3.5.0 and can be installed with `pip`:
  ```
  pip install asyncinit
  ```


pkgId: d923908716bef17e9a5dcb96ead79a20f2ec4f60d048d2c7842c4ac4be2b39a6
name: python-asyncio-dgram
arch: src
version: 2.1.2
epoch: 0
release: 1
summary: Higher level Datagram support for Asyncio
url: https://github.com/jsbronder/asyncio-dgram
rpm_license: MIT
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-d139f17c-82a0-4f21-ad23-affd436b06b1
location_href: 00003069-python-asyncio-dgram/python-asyncio-dgram-2.1.2-1.src.rpm
checksum_type: sha256
description:
  [![Build Status](https://github.com/jsbronder/asyncio-dgram/workflows/ci/badge.svg)](https://github.com/jsbronder/asyncio-dgram/actions)


  Simple wrappers that allow you to `await read()` from datagrams as suggested
  by Guido van Rossum
  [here](https://github.com/python/asyncio/pull/321#issuecomment-187022351).  I
  frequently found myself having to inherit from `asyncio.DatagramProtocol` and
  implement this over and over.


  The goal of this package is to make implementing common patterns that use datagrams
  simple and straight-forward while still supporting more esoteric options.  This is done
  by taking an opinionated stance on the API that differs from parts of asyncio.  For instance,
  rather than exposing a function like
  [create\_datagram\_endpoint](https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.create_datagram_endpoint)
  which supports many use-cases and has conflicting parameters, `asyncio_dgram`
  only provides three functions for creating a stream:

  - `connect((host, port))`: Creates a datagram endpoint which can only
    communicate with the endpoint it connected to.
  - `bind((host, port))`: Creates a datagram endpoint that can communicate
    with anyone, but must specified the destination address every time it
    sends.
  - `from_socket(sock)`: If the above two functions are not sufficient, then
    `asyncio_dgram` simply lets the caller setup the socket as they see fit.



  Following the example of asyncio documentation, here's what a UDP echo client
  and server would look like.
  ```python
  import asyncio

  import asyncio_dgram


  async def udp_echo_client():
      stream = await asyncio_dgram.connect(("127.0.0.1", 8888))

      await stream.send(b"Hello World!")
      data, remote_addr = await stream.recv()
      print(f"Client received: {data.decode()!r}")

      stream.close()


  async def udp_echo_server():
      stream = await asyncio_dgram.bind(("127.0.0.1", 8888))

      print(f"Serving on {stream.sockname}")

      data, remote_addr = await stream.recv()
      print(f"Echoing {data.decode()!r}")
      await stream.send(data, remote_addr)

      await asyncio.sleep(0.5)
      print(f"Shutting down server")


  def main():
      loop = asyncio.get_event_loop()
      loop.run_until_complete(asyncio.gather(udp_echo_server(), udp_echo_client()))


  if __name__ == "__main__":
      main()
  ```


pkgId: 95441ddae64a9e7aef6e1e83a74be89533c01208c7f6b061ea01cfd044c5b632
name: python-asyncio-throttle
arch: src
version: 1.0.2
epoch: 0
release: 1
summary: Simple, easy-to-use throttler for asyncio
url: https://github.com/hallazzang/asyncio-throttle
rpm_license: MIT
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-d0966621-bb69-434f-ab07-bd7d74ed6298
location_href: 00012715-python-asyncio-throttle/python-asyncio-throttle-1.0.2-1.src.rpm
checksum_type: sha256
description:
  [![travis-ci](https://travis-ci.org/hallazzang/asyncio-throttle.svg?branch=master)](https://travis-ci.org/hallazzang/asyncio-throttle)
  [![pypi-version](https://badge.fury.io/py/asyncio-throttle.svg)](https://badge.fury.io/py/asyncio-throttle)

  Simple, easy-to-use throttler for asyncio.



  ```python
  import time
  import random
  import asyncio

  from asyncio_throttle import Throttler

  async def worker(no, throttler, n):
      for _ in range(n):
          await asyncio.sleep(random.random() * 2)

          async with throttler:
              print(time.time(), 'Worker #%d: Bang!' % no)

  async def main():
      throttler = Throttler(rate_limit=5)

      tasks = [
          loop.create_task(worker(no, throttler, 10))
              for no in range(5)
      ]
      await asyncio.wait(tasks)

  loop = asyncio.get_event_loop()
  loop.run_until_complete(main())
  loop.close()
  ```

  Here I limited work rate to 5/sec while there are 5 workers.
  And the result:

  ```plain
  1508273760.3462772 Worker #2: Bang!
  1508273760.590009 Worker #3: Bang!
  1508273760.856431 Worker #0: Bang!
  1508273761.0110679 Worker #2: Bang!
  1508273761.086856 Worker #4: Bang!
  1508273761.350699 Worker #3: Bang!
  1508273761.5906 Worker #1: Bang!
  1508273761.8655958 Worker #4: Bang!
  1508273762.224158 Worker #0: Bang!
  1508273762.600234 Worker #2: Bang!
  1508273762.694332 Worker #2: Bang!
  1508273762.726774 Worker #0: Bang!
  1508273762.944273 Worker #4: Bang!
  ```



  ```bash
  $ pip install asyncio-throttle
  ```

  It requires Python 3.6 or later.



  `asyncio_throttle.Throttler` introduces simple APIs: `flush()` and
  `acquire()`. But you will not be interested in those because you can
  just use it within `with` statement and it looks nicer.

  First, create a throttler given desired rate limit. For example if you
  want to limit rate to 500/min, you can make it as:

  ```python
  from asyncio_throttle import Throttler

  throttler = Throttler(rate_limit=500, period=60)
  ```

  Then whenever you want to do some jobs which should have limited
  rate(e.g. sending request to server), Put it in `async with` statement:

  ```python
  async with throttler:
      send_a_request()
  ```

  It's that easy. `asyncio_throttler` can be easily integrated with
  `aiohttp` too:

  ```python
  async def worker(throttler, session):
      while True:
          async with throttler:
              async with session.get('http://example.com') as resp:
                  do_some_job_with(await resp.text())

          await asyncio.sleep(0.05)
  ```


pkgId: 0ff4f59014971e5d0a278bf699710c543a05ff6c57e57a02396f453d66eab5ea
name: python-asyncio_extras
arch: src
version: 1.3.2
epoch: 0
release: 1
summary: Asynchronous generators, context managers and more for asyncio
url: https://github.com/agronholm/asyncio_extras
rpm_license: MIT
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-5d77f281-9582-4a8f-b129-afa6848ccc69
location_href: 00011728-python-asyncio-extras/python-asyncio_extras-1.3.2-1.src.rpm
checksum_type: sha256
description:
  .. image:: https://travis-ci.org/agronholm/asyncio_extras.svg?branch=master
    :target: https://travis-ci.org/agronholm/asyncio_extras
    :alt: Build Status
  .. image:: https://coveralls.io/repos/agronholm/asyncio_extras/badge.svg?branch=master&service=github
    :target: https://coveralls.io/github/agronholm/asyncio_extras?branch=master
    :alt: Code Coverage
  .. image:: https://readthedocs.org/projects/asyncio-extras/badge/?version=latest
    :target: https://asyncio-extras.readthedocs.io/en/latest/?badge=latest
    :alt: Documentation Status

  This library provides several conveniences to users of asyncio_:

  * decorator for making asynchronous context managers (like ``contextlib.contextmanager``)
  * decorator and context manager for running a function or parts of a function in a thread pool
  * helpers for calling functions in the event loop from worker threads and vice versa
  * helpers for doing non-blocking file i/o

  .. _asyncio: https://docs.python.org/3/library/asyncio.html


pkgId: 8d1bb6bcb48b584a47b2015c5c57013b05265122acb864882939d16be496a0c9
name: python-asyncore-wsgi
arch: src
version: 0.0.10
epoch: 0
release: 1
summary: Asynchronous WSGI and WebSocket server based on asyncore module
url: https://github.com/romanvm/asyncore-wsgi
rpm_license: MIT
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-b2998515-6b9a-4812-a566-4aca0e41063f
location_href: 00010756-python-asyncore-wsgi/python-asyncore-wsgi-0.0.10-1.src.rpm
checksum_type: sha256
description:
  This is a single-threaded asynchronous WSGI server with WebSockets support
  based on `asyncore <https://docs.python.org/3.6/library/asyncore.html>`_ module.
  It should be compatible with Python 2.7 and 3.
  Example:
      from from wsgiref.simple_server import demo_app
      from asyncore_wsgi import AsyncWebSocketHandler, make_server
      class SimpleEchoHandler(AsyncWebSocketHandler):
          def handleMessage(self):
              print('Received WebSocket message: {}'.format(self.data))
              self.sendMessage(self.data)
          def handleConnected(self):
              print('WebSocket connected')
          def handleClose(self):
              print('WebSocket closed')
      httpd = make_server('', 8000, demo_app, ws_handler_class=SimpleEchoHandler)
      httpd.serve_forever()
  The server in the preceding example serves a demo WSGI app from
  the Standard Library and the echo WebSocket handler on ``'/ws'`` path.
  WebSocket part was borrowed from
  `this project <https://github.com/dpallot/simple-websocket-server>`_.


pkgId: b0118fe5d7955a652ae55a18c09c35c7fa6246ee007ac3dc8844e3d0ec124bef
name: python-asyncpg
arch: src
version: 0.27.0
epoch: 0
release: 1
summary: An asyncio PostgreSQL driver
url: https://github.com/MagicStack/asyncpg
rpm_license: Apache License, Version 2.0
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-a4e13de3-5eee-47ff-a5c2-d854ee3c3e43
location_href: 00009704-python-asyncpg/python-asyncpg-0.27.0-1.src.rpm
checksum_type: sha256
description:
  **asyncpg** is a database interface library designed specifically for
  PostgreSQL and Python/asyncio.  asyncpg is an efficient, clean implementation
  of PostgreSQL server binary protocol for use with Python's ``asyncio``
  framework.  You can read more about asyncpg in an introductory
  `blog post <http://magic.io/blog/asyncpg-1m-rows-from-postgres-to-python/>`_.
  asyncpg requires Python 3.7 or later and is supported for PostgreSQL
  versions 9.5 to 15.  Older PostgreSQL versions or other databases implementing
  the PostgreSQL protocol *may* work, but are not being actively tested.


pkgId: 1909efd0155a433ef4bcc336748c9b9c61f2f2cb4b81a406ca53ababb0fc8736
name: python-asyncpg-debuginfo
arch: aarch64
version: 0.27.0
epoch: 0
release: 1
summary: Debug information for package python-asyncpg
url: https://github.com/MagicStack/asyncpg
rpm_license: Apache License, Version 2.0
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Development/Debug
rpm_buildhost: resalloc-a4e13de3-5eee-47ff-a5c2-d854ee3c3e43
rpm_sourcerpm: python-asyncpg-0.27.0-1.src.rpm
location_href: 00009704-python-asyncpg/python-asyncpg-debuginfo-0.27.0-1.aarch64.rpm
checksum_type: sha256
description:
  This package provides debug information for package python-asyncpg.
  Debug information is useful when developing applications that use this
  package or when debugging this package.


pkgId: 99c6270ddbeadad2f53120a4448affe50aa44b61c626331e7482b5d4f8e87042
name: python-asyncpg-debugsource
arch: aarch64
version: 0.27.0
epoch: 0
release: 1
summary: Debug sources for package python-asyncpg
url: https://github.com/MagicStack/asyncpg
rpm_license: Apache License, Version 2.0
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Development/Debug
rpm_buildhost: resalloc-a4e13de3-5eee-47ff-a5c2-d854ee3c3e43
rpm_sourcerpm: python-asyncpg-0.27.0-1.src.rpm
location_href: 00009704-python-asyncpg/python-asyncpg-debugsource-0.27.0-1.aarch64.rpm
checksum_type: sha256
description:
  This package provides debug sources for package python-asyncpg.
  Debug sources are useful when developing applications that use this
  package or when debugging this package.


pkgId: 40a1837cb493509d793e81f2d2f8f840ddef25717b8088d2baf522842729388a
name: python-asyncssh
arch: src
version: 2.13.1
epoch: 0
release: 1
summary: AsyncSSH: Asynchronous SSHv2 client and server library
url: http://asyncssh.timeheart.net
rpm_license: Eclipse Public License v2.0
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-8852877e-2fd6-4b1b-8a95-7ee31018373a
location_href: 00003070-python-asyncssh/python-asyncssh-2.13.1-1.src.rpm
checksum_type: sha256
description:
  AsyncSSH is a Python package which provides an asynchronous client and
  server implementation of the SSHv2 protocol on top of the Python 3.6+
  asyncio framework.
    import asyncio, asyncssh, sys
    async def run_client():
        async with asyncssh.connect('localhost') as conn:
            result = await conn.run('echo "Hello!"', check=True)
            print(result.stdout, end='')
    try:
        asyncio.get_event_loop().run_until_complete(run_client())
    except (OSError, asyncssh.Error) as exc:
        sys.exit('SSH connection failed: ' + str(exc))
  Check out the `examples`__ to get started!
  __ http://asyncssh.readthedocs.io/en/stable/#client-examples


pkgId: 3de10c68e372815110b6ccf9666efa4935b918acbe49f9166fe196dfe766e805
name: python-attr
arch: src
version: 0.3.2
epoch: 0
release: 1
summary: Simple decorator to set attributes of target function or class in a DRY way.
url: https://github.com/denis-ryzhkov/attr
rpm_license: MIT
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-e8aadd87-5855-4252-8af3-7b058ea04d84
location_href: 00010985-python-attr/python-attr-0.3.2-1.src.rpm
checksum_type: sha256
description:
  Usage example::

      
      def my_calculated_field(...
      my_calculated_field.short_description = 'Field'
      my_calculated_field.admin_order_field = 'real_field'

      
      @attr(short_description='Field', admin_order_field='real_field')
      def my_calculated_field(...

  Get it::

      sudo pip install attr
      from attr import attr

  New popular `attrs.org <http://attrs.org>`_ used by `pytest.org <https://pytest.org>`_ defines another "attr" package that shadows this "attr" module.

  Please use "dry_attr" alias to unshadow it::

      from dry_attr import attr
      from dry_attr import dry_attr


pkgId: 36cea262c9b7c6b6cd7732c2624d82423072a4201ceb1424a2fc356389b31ba5
name: python-attrify
arch: src
version: 3.0
epoch: 0
release: 1
summary: Convert dict to access dict keys as attributes.
url: https://github.com/DragSama/attrify
rpm_license: MIT
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-39b8fcf6-e69b-4d41-a2df-f408f3fbf4bc
location_href: 00012865-python-attrify/python-attrify-3.0-1.src.rpm
checksum_type: sha256
description:
  [![Codacy Badge](https://app.codacy.com/project/badge/Grade/1daae9072d214d199f95c53c8fe16d05)](https://www.codacy.com/gh/DragSama/Attrify/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=DragSama/Attrify&amp;utm_campaign=Badge_Grade)
  [![PyPI Download Stats](https://img.shields.io/pypi/dd/attrify)](https://pypi.org/project/attrify/)
  [![PyPI Version](https://img.shields.io/pypi/v/attrify?color=brightgreen)](https://pypi.org/project/attrify/)
  [![Code style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

  **Access python dict keys as attributes**



  - Install using pip: `pip install attrify`




  -  Convert normal dict
  ```python
  from attrify import Attrify

  normal_dict = {'name': 'Cool'}
  attrified_dict = Attrify(normal_dict)

  attrified_dict = Attrify(**normal_dict)

  assert attrified_dict['name'] == attrified_dict.name
  ```
  -  Convert complex nested dict
  ```python
  complex_nested_normal_dict = {"data": {"results": [{"name": "something"}, {"name": "anything"}]}}
  complex_nested_attrified_dict = Attrify(complex_nested_normal_dict)

  complex_nested_attrified_dict = Attrify(**complex_nested_normal_dict)

  assert complex_nested_attrified_dict.data.results[0].name == complex_nested_normal_dict['data']['results'][0]['name']
  ```
  -  Convert back to dict
  ```python
  normal_dict = {'name': 'Cool'}
  attrified_dict = Attrify(normal_dict)
  assert type(attrified_dict.to_dict()) == type(normal_dict)
  ```
  -  Keys inside dir: **Will only contain with alphabetic keys, To see which keys are considered alphabetic see `help(str.isalpha)`**
  ```python
  attrified_dict = Attrify({'name': 'Cool'})
  print(dir(attrified_dict)) # List return will contain the key 'name'.
  ```
  -  There is also a shortcut method to prettify dict, Just calls json.dumps with some args set.
  ```python
  print(complex_nested_attrified_dict.prettify())
  ```


pkgId: 30125d01007bd445af3a4f685ac33c4300ff3452e74dc1e9f000fbd130ace3d3
name: python-audioread
arch: src
version: 3.0.0
epoch: 0
release: 1
summary: multi-library, cross-platform audio decoding
url: https://github.com/sampsyo/audioread
rpm_license: MIT
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-c745580d-455e-4fe7-a06c-641b810e9600
location_href: 00003077-python-audioread/python-audioread-3.0.0-1.src.rpm
checksum_type: sha256
description:
  Decode audio files using whichever backend is available. The library
  currently supports:
  - `Gstreamer`_ via `PyGObject`_.
  - `Core Audio`_ on Mac OS X via `ctypes`_. (PyObjC not required.)
  - `MAD`_ via the `pymad`_ bindings.
  - `FFmpeg`_ or `Libav`_ via its command-line interface.
  - The standard library `wave`_, `aifc`_, and `sunau`_ modules (for
    uncompressed audio formats).
  Use the library like so::
      with audioread.audio_open(filename) as f:
          print(f.channels, f.samplerate, f.duration)
          for buf in f:
              do_something(buf)
  Buffers in the file can be accessed by iterating over the object returned from
  ``audio_open``. Each buffer is a bytes-like object (``buffer``, ``bytes``, or
  ``bytearray``) containing raw **16-bit little-endian signed integer PCM
  data**. (Currently, these PCM format parameters are not configurable, but this
  could be added to most of the backends.)
  Additional values are available as fields on the audio file object:
  - ``channels`` is the number of audio channels (an integer).
  - ``samplerate`` is given in Hz (an integer).
  - ``duration`` is the length of the audio in seconds (a float).
  The ``audio_open`` function transparently selects a backend that can read the
  file. (Each backend is implemented in a module inside the ``audioread``
  package.) If no backends succeed in opening the file, a ``DecodeError``
  exception is raised. This exception is only used when the file type is
  unsupported by the backends; if the file doesn't exist, a standard ``IOError``
  will be raised.
  A second optional parameter to ``audio_open`` specifies which backends to try
  (instead of trying them all, which is the default). You can use the
  ``available_backends`` function to get a list backends that are usable on the
  current system.
  Audioread supports Python 3 (3.6+).


pkgId: 318bab403df652c819f9aa52ffa2cae12a1d41ed5206914ba2018a2266f16285
name: python-auditwheel
arch: src
version: 5.3.0
epoch: 0
release: 1
summary: Cross-distribution Linux wheels
url: https://github.com/pypa/auditwheel
rpm_license: MIT
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-0a0ae64f-8083-4f78-8229-d813390c5637
location_href: 00011837-python-auditwheel/python-auditwheel-5.3.0-1.src.rpm
checksum_type: sha256
description:
  Auditing and relabeling of `PEP 600 manylinux_x_y
  <https://www.python.org/dev/peps/pep-0600/>`_, `PEP 513 manylinux1
  <https://www.python.org/dev/peps/pep-0513/>`_, `PEP 571 manylinux2010
  <https://www.python.org/dev/peps/pep-0571/>`_ and `PEP 599 manylinux2014
  <https://www.python.org/dev/peps/pep-0599/>`_ Linux wheels.


pkgId: 38ffe4c96504fbe58332f3b6715af2f5090f45d572c1057ada84eee7e696e2f0
name: python-august
arch: src
version: 2.4.0
epoch: 0
release: 1
summary: A library for converting HTML to plain text.
url: https://gitlab.com/alantrick/august/
rpm_license: LGPL-3.0-or-later
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-2f830f2d-26cd-4f95-9853-22e72cf5c84b
location_href: 00003078-python-august/python-august-2.4.0-1.src.rpm
checksum_type: sha256
description:
  August is an html to text converter specifically intended for producing
  text versions of HTML emails. The main code is all written in Rust,
  this packages is includes python bindings.




  Install using PIP

  ```shell
  $ pip3 install august
  ```

  Then, import it and run convert

  ```python
  import august

  html = '<p>I\'m <em>so</em> excited to try this</p>'
  print(august.convert(html, width=20))
  ```

  which prints

  ```text
  I'm /so/ excited to
  try this
  ```




  * [html2text](https://pypi.org/project/html2text/):
    Coverts HTML into markdown, and supports a bazillion options.
    It's a great project if you want to produce markdown; but markdown, because
    it's designed to be turned into HTML, has a little more noise than is
    strictly necessary, and the header formatting is pretty unclear.
  * [html-to-text](https://www.npmjs.com/package/html-to-text):
    Converts HTML to text. Javascript/node project.


pkgId: 27bf61af6506ced0ce8ca5e5296c120f91df936a5020a9ee3422211e8644ddb2
name: python-auth0-python
arch: src
version: 4.1.0
epoch: 0
release: 1
summary: Auth0 Python SDK
url: https://github.com/auth0/auth0-python
rpm_license: MIT
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-5701f1af-bdf6-4d5b-9997-952ffe8f2cd9
location_href: 00010181-python-auth0-python/python-auth0-python-4.1.0-1.src.rpm
checksum_type: sha256
description:
  <p align="center">
    <picture>
      <source media="(prefers-color-scheme: light)" srcset="https://cdn.auth0.com/website/sdks/logos/auth0_light_mode.png"   width="150">
      <source media="(prefers-color-scheme: dark)" srcset="https://cdn.auth0.com/website/sdks/logos/auth0_dark_mode.png" width="150">
      <img alt="Auth0 Logo" src="https://cdn.auth0.com/website/sdks/logos/auth0_light_mode.png" width="150">
    </picture>
  </p>
  <p align="center">Auth0 is an easy to implement, adaptable authentication and authorization platform. To learn more checkout <a href="https://auth0.com/why-auth0">Why Auth0?</a></p>
  <p align="center">
  This project is licensed under the MIT license. See the <a href="https://github.com/auth0/auth0-python/blob/master/LICENSE"> LICENSE</a> file for more info.</p>


pkgId: 38c386b710b21813f4d0c8f4985dca43222da7c082daacdceb6bf1a493ae7ba8
name: python-authy
arch: src
version: 2.2.6
epoch: 0
release: 1
summary: Authy API Client
url: http://github.com/authy/authy-python
rpm_license: MIT License
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-2a9f083a-8ffc-429f-ad10-e4bad2148ee3
location_href: 00012414-python-authy/python-authy-2.2.6-1.src.rpm
checksum_type: sha256
description:
  [![PyPI version](https://badge.fury.io/py/authy.svg)](https://pypi.org/project/authy/) [![Build Status](https://travis-ci.org/twilio/authy-python.svg?branch=master)](https://travis-ci.org/authy/authy-python)



  Documentation for Python usage of the Authy API lives in the [official Twilio documentation](https://www.twilio.com/docs/authy/api/).

  The Authy API supports multiple channels of 2FA:
  * One-time passwords via SMS and voice.
  * Soft token ([TOTP](https://www.twilio.com/docs/glossary/totp) via the Authy App)
  * Push authentication via the Authy App

  If you only need SMS and Voice support for one-time passwords, we recommend using the [Twilio Verify API](https://www.twilio.com/docs/verify/api) instead.

  [More on how to choose between Authy and Verify here.](https://www.twilio.com/docs/verify/authy-vs-verify)



  For a full tutorial, check out either of the Python Authy Quickstarts in our docs:
  * [Python/Django Authy Quickstart](https://www.twilio.com/docs/authy/quickstart/two-factor-authentication-python-django)
  * [Python/Flask Authy Quickstart](https://www.twilio.com/docs/authy/quickstart/two-factor-authentication-python-flask)



  Install with [pip](https://www.twilio.com/docs/usage/quickstart/devenvironment-python#how-to-install-pip):

      $ pip install authy

  **OR**

  Download the [source code](https://github.com/twilio/authy-python/archive/master.zip) and run the following command from your terminal:

      $ python setup.py install

  _Note that you may need admin permissions to run the above commands._



  To use the Authy client, import AuthyApiClient and initialize it with your production API Key found in the [Twilio Console](https://www.twilio.com/console/authy/applications/):

  ```python
  from authy.api import AuthyApiClient
  authy_api = AuthyApiClient('your_api_key')
  ```

  ![authy api key in console](https://s3.amazonaws.com/com.twilio.prod.twilio-docs/images/account-security-api-key.width-800.png)



  1. [Create a user](https://www.twilio.com/docs/authy/api/users#enabling-new-user)
  2. [Send a one-time password](https://www.twilio.com/docs/authy/api/one-time-passwords)
  3. [Verify a one-time password](https://www.twilio.com/docs/authy/api/one-time-passwords#verify-a-one-time-password)

  **OR**

  1. [Create a user](https://www.twilio.com/docs/authy/api/users#enabling-new-user)
  2. [Send a push authentication](https://www.twilio.com/docs/authy/api/push-authentications)
  3. [Check a push authentication status](https://www.twilio.com/docs/authy/api/push-authentications#check-approval-request-status)




  [Phone verification now lives in the Twilio API](https://www.twilio.com/docs/verify/api) and has [Python support through the official Twilio helper libraries](https://www.twilio.com/docs/libraries/python).

  [Legacy (V1) documentation here.](verify-legacy-v1.md) **Verify V1 is not recommended for new development. Please consider using [Verify V2](https://www.twilio.com/docs/verify/api)**.



  Install development dependencies with pip:

      sudo pip install -r requirements.txt

  To run tests:

      make test
  or

      make testfile tests/<test_case_file>



  Copyright (c) 2011-2020 Authy Inc. See [LICENSE](https://github.com/twilio/authy-python/blob/master/LICENSE) for further details.


pkgId: 89bbfe5e1da12bd00dc6b914858eca7972d3febdbbbcdba1e0abb917492c71f6
name: python-autocfg
arch: src
version: 0.0.8
epoch: 0
release: 1
summary: Deep learning configuration
url: https://github.com/zhreshold/autocfg
rpm_license: MIT License
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-d9214faa-f573-498b-bd09-8010bcd129f0
location_href: 00010192-python-autocfg/python-autocfg-0.0.8-1.src.rpm
checksum_type: sha256
description:
  [![PyPI](https://img.shields.io/pypi/v/autocfg.svg)](https://pypi.python.org/pypi/autocfg)

  All you need is a minimal config system for automl.





  See [basic usage](examples/basics.ipynb)



  See [version control](examples/versioning.ipynb)


pkgId: 8e1998fa77c3dbd9eef69383da5fb83bb04510c9b89dada4a458f2317c7f40b8
name: python-autograd-gamma
arch: src
version: 0.5.0
epoch: 0
release: 1
summary: Autograd compatible approximations to the gamma family of functions
url: https://github.com/CamDavidsonPilon/autograd-gamma
rpm_license: MIT License
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-6874bc63-71d0-4bcc-bde3-df295b34e387
location_href: 00010426-python-autograd-gamma/python-autograd-gamma-0.5.0-1.src.rpm
checksum_type: sha256
description:
  [![PyPI version](https://badge.fury.io/py/autograd-gamma.svg)](https://badge.fury.io/py/autograd-gamma)


  [autograd](https://github.com/HIPS/autograd) compatible approximations to the derivatives of the Gamma-family of functions.




  ```python
  from autograd import grad
  from autograd_gamma import gammainc, gammaincc, gammaincln, gammainccln


  grad(gammainc, argnum=0)(1., 2.)
  grad(gammaincc, argnum=0)(1., 2.)


  grad(gammaincln, argnum=0)(1., 2.)
  grad(gammainccln, argnum=0)(1., 2.)



  from autograd_gamma import betainc, betaincln

  grad(betainc, argnum=0)(1., 2., 0.5)
  grad(betainc, argnum=1)(1., 2., 0.5)


  grad(betaincln, argnum=0)(1., 2., 0.5)
  grad(betaincln, argnum=1)(1., 2., 0.5)

  ```




  Build and improve upon the derivative of the upper and lower incomplete gamma functions. Eventually, if we have a fast analytical solution, we will merge into the autograd library.


pkgId: 5167f3a0ac2eebd4b61b8bb8c6d4b8477b3b58cce27d4aa5e83d48b2329d51a9
name: python-autokeras
arch: src
version: 1.1.0
epoch: 0
release: 1
summary: AutoML for deep learning
url: http://autokeras.com
rpm_license: Apache License 2.0
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-f8ac9f1a-8c03-4749-8d1d-dd1963dfa022
location_href: 00014284-python-autokeras/python-autokeras-1.1.0-1.src.rpm
checksum_type: sha256
description:
  <p align="center">
    <img width="500" alt="logo" src="https://autokeras.com/img/row_red.svg"/>
  </p>

  [![](https://github.com/keras-team/autokeras/workflows/Tests/badge.svg?branch=master)](https://github.com/keras-team/autokeras/actions?query=workflow%3ATests+branch%3Amaster)
  [![codecov](https://codecov.io/gh/keras-team/autokeras/branch/master/graph/badge.svg)](https://codecov.io/gh/keras-team/autokeras)
  [![PyPI version](https://badge.fury.io/py/autokeras.svg)](https://badge.fury.io/py/autokeras)
  [![Python](https://img.shields.io/badge/python-v3.8.0+-success.svg)](https://www.python.org/downloads/)
  [![Tensorflow](https://img.shields.io/badge/tensorflow-v2.8.0+-success.svg)](https://www.tensorflow.org/versions)
  [![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/keras-team/autokeras/issues)

  Official Website: [autokeras.com](https://autokeras.com)


  AutoKeras: An AutoML system based on Keras.
  It is developed by <a href="http://faculty.cs.tamu.edu/xiahu/index.html" target="_blank" rel="nofollow">DATA Lab</a> at Texas A&M University.
  The goal of AutoKeras is to make machine learning accessible to everyone.



  * A short example.

  ```python
  import autokeras as ak

  clf = ak.ImageClassifier()
  clf.fit(x_train, y_train)
  results = clf.predict(x_test)
  ```

  * [Official website tutorials](https://autokeras.com/tutorial/overview/).
  * The book of [*Automated Machine Learning in Action*](https://www.manning.com/books/automated-machine-learning-in-action?query=automated&utm_source=jin&utm_medium=affiliate&utm_campaign=affiliate&a_aid=jin).
  * The LiveProjects of [*Image Classification with AutoKeras*](https://www.manning.com/liveprojectseries/autokeras-ser).
  <p align="center">
  <a href="https://www.manning.com/books/automated-machine-learning-in-action?query=automated&utm_source=jin&utm_medium=affiliate&utm_campaign=affiliate&a_aid=jin"><img src="https://images.manning.com/360/480/resize/book/0/fc56aaf-b2ba-4ef4-85b3-4a31edbe8ecc/Song-AML-HI.png" alt="drawing" width="266"/></a>
  &nbsp
  &nbsp
  <a href="https://www.manning.com/liveprojectseries/autokeras-ser"><img src="https://images.manning.com/360/480/resize/liveProjectSeries/9/38c715a-0c8c-4f66-b440-83d29993877a/ImageClassificationwithAutoKeras.jpg" alt="drawing" width="250"/></a>
  </p>




  To install the package, please use the `pip` installation as follows:

  ```shell
  pip3 install autokeras
  ```

  Please follow the [installation guide](https://autokeras.com/install) for more details.

  **Note:** Currently, AutoKeras is only compatible with **Python >= 3.7** and **TensorFlow >= 2.8.0**.



  Ask your questions on our [GitHub Discussions](https://github.com/keras-team/autokeras/discussions).



  Here is how we manage our project.

  We pick the critical issues to work on from [GitHub issues](https://github.com/keras-team/autokeras/issues).
  They will be added to this [Project](https://github.com/keras-team/autokeras/projects/3).
  Some of the issues will then be added to the [milestones](https://github.com/keras-team/autokeras/milestones),
  which are used to plan for the releases.

  Refer to our [Contributing Guide](https://autokeras.com/contributing/) to learn the best practices.

  Thank all the contributors!

  [![The contributors](https://autokeras.com/img/contributors.svg)](https://github.com/keras-team/autokeras/graphs/contributor)



  Haifeng Jin, François Chollet, Qingquan Song, and Xia Hu. "AutoKeras: An AutoML Library for Deep Learning." *the Journal of machine Learning research* 6 (2023): 1-6. ([Download](http://jmlr.org/papers/v24/20-1355.html))

  Biblatex entry:

  ```bibtex
  @article{JMLR:v24:20-1355,
    author  = {Haifeng Jin and François Chollet and Qingquan Song and Xia Hu},
    title   = {AutoKeras: An AutoML Library for Deep Learning},
    journal = {Journal of Machine Learning Research},
    year    = {2023},
    volume  = {24},
    number  = {6},
    pages   = {1--6},
    url     = {http://jmlr.org/papers/v24/20-1355.html}
  }
  ```



  The authors gratefully acknowledge the D3M program of the Defense Advanced Research Projects Agency (DARPA) administered through AFRL contract FA8750-17-2-0116; the Texas A&M College of Engineering, and Texas A&M University.


pkgId: 74e35c9f9a9986fa6f3c9a4df0ac57e28a236028d92c78eeecdbb553273cf3f0
name: python-autowrap
arch: src
version: 0.22.11
epoch: 0
release: 1
summary: Generates Python Extension modules from commented Cython PXD files
url: https://pypi.org/project/autowrap/
rpm_license: http://opensource.org/licenses/BSD-3-Clause
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-d081d4b4-b4b2-4e06-a043-724d8b6feba1
location_href: 00003085-python-autowrap/python-autowrap-0.22.11-1.src.rpm
checksum_type: sha256
description:
  autowrap automatically generates python extension modules for wrapping
  C++ libraries based on annotated (commented) cython pxd files.


pkgId: 18f6c4a52560939425834edcaf4214dd652e91335ee6f25cc9dd0e0e2bf3bd66
name: python-avionix
arch: src
version: 0.4.5
epoch: 0
release: 1
description: Coming soon...
url: https://avionix.readthedocs.io/en/latest/index.html
rpm_license: BSD License
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-f05e1497-42f3-4cd1-9510-dd234cd71b6d
location_href: 00014357-python-avionix/python-avionix-0.4.5-1.src.rpm
checksum_type: sha256
summary:
  A package for soldifying kubernetes structure and development by using objects and code rather than yaml


pkgId: 722d482fbaad3a648d89f43c4dd5707d5738f55439ec56618cad876bb05d73a5
name: python-avro
arch: src
version: 1.11.1
epoch: 0
release: 1
summary: Avro is a serialization and RPC framework.
url: https://avro.apache.org/
rpm_license: Apache License 2.0
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-d4673cc2-bcde-47ac-a5f5-3de8dae583a2
location_href: 00009372-python-avro/python-avro-1.11.1-1.src.rpm
checksum_type: sha256
description:
  Apache Avro™ is a data serialization system. To learn more, please visit our [website](https://avro.apache.org/).




  Apache Avro documentation is maintained on our [wiki](https://cwiki.apache.org/confluence/display/AVRO/Index).




  To contribute to Avro, please read [How to Contribute](https://cwiki.apache.org/confluence/display/AVRO/How+To+Contribute) on the wiki.




  License, credits and acknowledgements are maintained in the [LICENSE.txt](https://github.com/apache/avro/blob/master/LICENSE.txt) and [NOTICE.txt](https://github.com/apache/avro/blob/master/NOTICE.txt) in the source code repository. Those files are also included with the installed package.


pkgId: b67393e210817a6d9c567f8e12dbfc3267c736b42cdf6b72dedd7bad93e60301
name: python-avro-gen
arch: src
version: 0.3.0
epoch: 0
release: 1
summary: Avro record class and specific record reader generator
url: https://github.com/rbystrit/avro_gen
rpm_license: License :: OSI Approved :: Apache Software License
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-5d61d74e-e171-464e-a819-65db563ff974
location_href: 00009628-python-avro-gen/python-avro-gen-0.3.0-1.src.rpm
checksum_type: sha256
description:
  [![Build Status](https://travis-ci.org/rbystrit/avro_gen.svg?branch=master)](https://travis-ci.org/rbystrit/avro_gen)
  [![codecov](https://codecov.io/gh/rbystrit/avro_gen/branch/master/graph/badge.svg)](https://codecov.io/gh/rbystrit/avro_gen)

  Current Avro implementation in Python is completely typelss and operates on dicts.
  While in many cases this is convenient and pythonic, not being able to discover the schema
  by looking at the code, not enforcing schema during record constructions, and not having any
  context help from the IDE could hamper developer performance and introduce bugs.
  This project aims to rectify this situation by providing a generator for constructing concrete
  record classes and constructing a reader which wraps Avro DatumReader and returns concrete classes
  instead of dicts. In order not to violate Avro internals, this functionality is built strictly
  on top of the DatumReader and all the specific record classes dict wrappers which define accessor
  properties with proper type hints for each field in the schema. For this exact reason the
  generator does not provide an overloaded DictWriter; each specific record appears just to be a
  regular dictionary.

      schema_json = "....."
      output_directory = "....."
      from avrogen import write_schema_files
      write_schema_files(schema_json, output_directory)
  The generator will create output directory if it does not exist and put generated files there.
  The generated files will be:
  >  OUTPUT_DIR
  >  + \_\_init\_\_.py
  >  + schema_classes.py
  >  + submodules*
  In order to deal with Avro namespaces, since python doesn't support circular imports, the generator
   will emit all records into schema_classes.py as nested classes. The top level class there will be
   SchemaClasses, whose children will be classes representing namespaces. Each namespace class will
   in turn contain classes for records belonging to that namespace.
   Consider following schema:
       {"type": "record", "name": "tweet", "namespace": "com.twitter.avro", "fields": [{"name": "ID", "type": "long" }
   Then schema_classes.py would contain:
      class SchemaClasses(object):
          class com(object):
              class twitter(object):
                  class acro(object):
                      class tweetClass(DictWrapper):
                          def __init__(self, inner_dict=None):
                          @property
                          def ID(self):
                              """
                              """
                              return self._inner_dict.get('ID', None)
                          @ID.setter
                          def ID(self, value):
                              
                              
                              
                              self._inner_dict['ID'] = value
   In order to map specific record types and namespaces to modules, so that proper importing can
   be supported, there generator will create a sub-module under the output directory for each namespace
   which will export names of all types contained in that namespace. Types declared with empty
   namespace will be exported from the root module.
   So for the example above, output directory will look as follows:
   >  OUTPUT_DIR
   >  + \_\_init\_\_.py
   >  + schema_classes.py
   >  + com
   >   + twitter
   >     + avro
   >       + \_\_init\_\_.py
  The contents of OUTPUT_DIR/com/twitter/avro/\_\_init\_\_.py will be:
      from ....schema_classes import SchemaClasses
      tweet = SchemaClasses.com.twitter.avro.tweet
  So in your code you will be able to say:
      from OUTPUT_DIR.com.twitter.avro import tweet
      from OUTPUT_DIR import SpecificDatumReader as TweetReader, SCHEMA as your_schema
      from avro import datafile, io
      my_tweet = tweet()
      my_tweet.ID = 1
      with open('somefile', 'w+b') as f:
          writer = datafile.DataFileWriter(f,io.DatumWriter(), your_schema)
          writer.append(my_tweet)
          writer.close()
      with open('somefile', 'rb') as f:
          reader = datafile.DataFileReader(f,TweetReader(readers_schema=your_schema))
          my_tweet1 = reader.next()
          reader.close()

  Avro protocol support is implemented the same way as schema support. To generate classes
  for a protocol:
      protocol_json = "....."
      output_directory = "....."
      from avrogen import write_protocol_files
      write_protocol_files(protocol_json, output_directory)
  The structure of the generated code will be exactly same as for schema, but in addition to
  regular types, *Request types will be generated in the root namespace of the protocol for each
  each message defined.

  Avrogen implements logical types on top of standard avro package and supports generation of
  classes thus typed. To enable logical types support, pass **use_logical_types=True** to schema
  and protocol generators. If custom logical types are implemented and such types map to types
  other than simple types or datetime.* or decimal.* then pass **custom_imports** parameter to
  generator functions so that your types are imported. Types implemented out of the box are:
  - decimal (using string representation only)
  - date
  - time-millis
  - time-micros
  - timestamp-millis
  - timestamp-micros
  To register your custom logical type, inherit from avrogen.logical.LogicalTypeProcessor, implement
  abstract methods, and add an instance to avrogen.logical.DEFAULT_LOGICAL_TYPES dictionary under the
  name of your logical type. A sample implementation looks as follows:
      class DateLogicalTypeProcessor(LogicalTypeProcessor):
          _matching_types = {'int', 'long', 'float', 'double'}
          def can_convert(self, writers_schema):
              return isinstance(writers_schema, schema.PrimitiveSchema) and writers_schema.type == 'int'
          def validate(self, expected_schema, datum):
              return isinstance(datum, datetime.date)
          def convert(self, writers_schema, value):
              if not isinstance(value, datetime.date):
                  raise Exception("Wrong type for date conversion")
              return (value - EPOCH_DATE).total_seconds() // SECONDS_IN_DAY
          def convert_back(self, writers_schema, readers_schema, value):
              return EPOCH_DATE + datetime.timedelta(days=int(value))
          def does_match(self, writers_schema, readers_schema):
              if isinstance(writers_schema, schema.PrimitiveSchema):
                  if writers_schema.type in DateLogicalTypeProcessor._matching_types:
                      return True
              return False
          def typename(self):
              return 'datetime.date'
          def initializer(self, value=None):
              return ((
                          'logical.DateLogicalTypeProcessor().convert_back(None, None, %s)' % value) if value is not None
                      else 'datetime.datetime.today().date()')
  To read/write data with logical type support, use generated SpecificDatumReader
  and a LogicalDatumWriter from avro.logical.


pkgId: 7e2cd97e94a31c7ac389c70b448587e08818d7edb49aa1d3faa2d94b9b634330
name: python-avro-gen3
arch: src
version: 0.7.10
epoch: 0
release: 1
summary: Avro record class and specific record reader generator
url: https://github.com/acryldata/avro_gen
rpm_license: License :: OSI Approved :: Apache Software License
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-a17ba74b-e212-403c-ab27-8241277987a1
location_href: 00010173-python-avro-gen3/python-avro-gen3-0.7.10-1.src.rpm
checksum_type: sha256
description:
  [![Build Status](https://travis-ci.org/rbystrit/avro_gen.svg?branch=master)](https://travis-ci.org/rbystrit/avro_gen)
  [![codecov](https://codecov.io/gh/rbystrit/avro_gen/branch/master/graph/badge.svg)](https://codecov.io/gh/rbystrit/avro_gen)

  Current Avro implementation in Python is completely typelss and operates on dicts.
  While in many cases this is convenient and pythonic, not being able to discover the schema
  by looking at the code, not enforcing schema during record constructions, and not having any
  context help from the IDE could hamper developer performance and introduce bugs.
  This project aims to rectify this situation by providing a generator for constructing concrete
  record classes and constructing a reader which wraps Avro DatumReader and returns concrete classes
  instead of dicts. In order not to violate Avro internals, this functionality is built strictly
  on top of the DatumReader and all the specific record classes dict wrappers which define accessor
  properties with proper type hints for each field in the schema. For this exact reason the
  generator does not provide an overloaded DictWriter; each specific record appears just to be a
  regular dictionary.
  This is a fork of [https://github.com/rbystrit/avro_gen](https://github.com/rbystrit/avro_gen).
  It adds better Python 3 support, including types, better namespace handling, support for
  documentation generation, and JSON (de-)serialization.
  ```sh
  pip install avro-gen3
  ```

      schema_json = "....."
      output_directory = "....."
      from avrogen import write_schema_files
      write_schema_files(schema_json, output_directory)
  The generator will create output directory if it does not exist and put generated files there.
  The generated files will be:
  >  OUTPUT_DIR
  >  + \_\_init\_\_.py
  >  + schema_classes.py
  >  + submodules*
  In order to deal with Avro namespaces, since python doesn't support circular imports, the generator
   will emit all records into schema_classes.py as nested classes. The top level class there will be
   SchemaClasses, whose children will be classes representing namespaces. Each namespace class will
   in turn contain classes for records belonging to that namespace.
   Consider following schema:
       {"type": "record", "name": "tweet", "namespace": "com.twitter.avro", "fields": [{"name": "ID", "type": "long" }
   Then schema_classes.py would contain:
      class SchemaClasses(object):
          class com(object):
              class twitter(object):
                  class acro(object):
                      class tweetClass(DictWrapper):
                          def __init__(self, inner_dict=None):
                          @property
                          def ID(self):
                              """
                              """
                              return self._inner_dict.get('ID', None)
                          @ID.setter
                          def ID(self, value):
                              
                              
                              
                              self._inner_dict['ID'] = value
   In order to map specific record types and namespaces to modules, so that proper importing can
   be supported, there generator will create a sub-module under the output directory for each namespace
   which will export names of all types contained in that namespace. Types declared with empty
   namespace will be exported from the root module.
   So for the example above, output directory will look as follows:
   >  OUTPUT_DIR
   >  + \_\_init\_\_.py
   >  + schema_classes.py
   >  + com
   >   + twitter
   >     + avro
   >       + \_\_init\_\_.py
  The contents of OUTPUT_DIR/com/twitter/avro/\_\_init\_\_.py will be:
      from ....schema_classes import SchemaClasses
      tweet = SchemaClasses.com.twitter.avro.tweet
  So in your code you will be able to say:
      from OUTPUT_DIR.com.twitter.avro import tweet
      from OUTPUT_DIR import SpecificDatumReader as TweetReader, SCHEMA as your_schema
      from avro import datafile, io
      my_tweet = tweet()
      my_tweet.ID = 1
      with open('somefile', 'w+b') as f:
          writer = datafile.DataFileWriter(f,io.DatumWriter(), your_schema)
          writer.append(my_tweet)
          writer.close()
      with open('somefile', 'rb') as f:
          reader = datafile.DataFileReader(f,TweetReader(readers_schema=your_schema))
          my_tweet1 = next(reader)
          reader.close()

  Avro protocol support is implemented the same way as schema support. To generate classes
  for a protocol:
      protocol_json = "....."
      output_directory = "....."
      from avrogen import write_protocol_files
      write_protocol_files(protocol_json, output_directory)
  The structure of the generated code will be exactly same as for schema, but in addition to
  regular types, *Request types will be generated in the root namespace of the protocol for each
  each message defined.

  Avrogen implements logical types on top of standard avro package and supports generation of
  classes thus typed. To enable logical types support, pass **use_logical_types=True** to schema
  and protocol generators. If custom logical types are implemented and such types map to types
  other than simple types or datetime.* or decimal.* then pass **custom_imports** parameter to
  generator functions so that your types are imported. Types implemented out of the box are:
  - decimal (using string representation only)
  - date
  - time-millis
  - time-micros
  - timestamp-millis
  - timestamp-micros
  To register your custom logical type, inherit from avrogen.logical.LogicalTypeProcessor, implement
  abstract methods, and add an instance to avrogen.logical.DEFAULT_LOGICAL_TYPES dictionary under the
  name of your logical type. A sample implementation looks as follows:
      class DateLogicalTypeProcessor(LogicalTypeProcessor):
          _matching_types = {'int', 'long', 'float', 'double'}
          def can_convert(self, writers_schema):
              return isinstance(writers_schema, schema.PrimitiveSchema) and writers_schema.type == 'int'
          def validate(self, expected_schema, datum):
              return isinstance(datum, datetime.date)
          def convert(self, writers_schema, value):
              if not isinstance(value, datetime.date):
                  raise Exception("Wrong type for date conversion")
              return (value - EPOCH_DATE).total_seconds() // SECONDS_IN_DAY
          def convert_back(self, writers_schema, readers_schema, value):
              return EPOCH_DATE + datetime.timedelta(days=int(value))
          def does_match(self, writers_schema, readers_schema):
              if isinstance(writers_schema, schema.PrimitiveSchema):
                  if writers_schema.type in DateLogicalTypeProcessor._matching_types:
                      return True
              return False
          def typename(self):
              return 'datetime.date'
          def initializer(self, value=None):
              return ((
                          'logical.DateLogicalTypeProcessor().convert_back(None, None, %s)' % value) if value is not None
                      else 'datetime.datetime.today().date()')
  To read/write data with logical type support, use generated SpecificDatumReader
  and a LogicalDatumWriter from avro.logical.


pkgId: 49ab7482f90d6491f3b4643ff781a297578af107da5c952ae5320dfb88dcc676
name: python-avro-python3
arch: src
version: 1.10.2
epoch: 0
release: 1
summary: Avro is a serialization and RPC framework.
url: https://avro.apache.org/
rpm_license: Apache License 2.0
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-94d4f9d2-f057-4324-bf0e-2cc2a297c7fc
location_href: 00009207-python-avro-python3/python-avro-python3-1.10.2-1.src.rpm
checksum_type: sha256
description:
  [avro-python3](https://pypi.org/project/avro-python3/) is no longer maintained and is deprecated in favor of [avro](https://pypi.org/project/avro/). Avro is maintained and has full support for recent versions of Python.



  Apache Avro™ is a data serialization system. To learn more, please visit our [website](https://avro.apache.org/).




  Apache Avro documentation is maintained on our [wiki](https://cwiki.apache.org/confluence/display/AVRO/Index).




  To contribute to Avro, please read [How to Contribute](https://cwiki.apache.org/confluence/display/AVRO/How+To+Contribute) on the wiki.




  License, credits and acknowledgements are maintained in the [LICENSE.txt](https://github.com/apache/avro/blob/master/LICENSE.txt) and [NOTICE.txt](https://github.com/apache/avro/blob/master/NOTICE.txt) in the source code repository. Those files are also included with the installed package.


pkgId: 290b040abc105a812277da59cb521fd1fda1e844f911e6f22b517ae3bbd8c144
name: python-awesomeversion
arch: src
version: 22.9.0
epoch: 0
release: 1
url: https://github.com/ludeeus/awesomeversion
rpm_license: MIT
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-fdcbb2a6-32bb-4b5e-acf2-fe42fcd1f857
location_href: 00011700-python-awesomeversion/python-awesomeversion-22.9.0-1.src.rpm
checksum_type: sha256
summary:
  One version package to rule them all, One version package to find them, One version package to bring them all, and in the darkness bind them.

description:
  `version` | The version string to parse.
  `ensure_strategy` | Match the `AwesomeVersion` object against spesific strategies when creating if. If it does not match `AwesomeVersionStrategyException` will be raised
  `find_first_match` | If True, the version given will be scanned for the first match of the given `ensure_strategy`. Raises `AwesomeVersionStrategyException` If it is not found for any of the given strategies.

  These are some examples of what you can do, more examples can be found in the `tests` directory.
  ```python
  from awesomeversion import AwesomeVersion
  current = AwesomeVersion("1.2.2")
  upstream = AwesomeVersion("1.2.3")
  print(upstream > current)
  > True
  ```
  ```python
  from awesomeversion import AwesomeVersion
  version = AwesomeVersion("1.2.3b0")
  print(version.beta)
  > True
  ```
  ```python
  from awesomeversion import AwesomeVersion
  current = AwesomeVersion("2021.1.0")
  upstream = AwesomeVersion("2021.1.0b2")
  print(upstream > current)
  > False
  ```
  ```python
  from awesomeversion import AwesomeVersion
  current = AwesomeVersion("latest")
  upstream = AwesomeVersion("2021.1.0")
  print(upstream > current)
  > False
  ```
  ```python
  from awesomeversion import AwesomeVersion
  current = AwesomeVersion("latest")
  upstream = AwesomeVersion("dev")
  print(upstream > current)
  > True
  ```
  ```python
  from awesomeversion import AwesomeVersion
  with AwesomeVersion("20.12.0") as current:
      with AwesomeVersion("20.12.1") as upstream:
          print(upstream > current)
  > True
  ```
  ```python
  from awesomeversion import AwesomeVersion
  with AwesomeVersion("20.12.0") as current:
      print("2020.12.1" > current)
  > True
  ```
  ```python
  from awesomeversion import AwesomeVersion
  version = AwesomeVersion("2.12.0")
  print(version.major)
  > 2
  print(version.minor)
  > 12
  print(version.patch)
  > 0
  ```

  **All** contributions are welcome!
  1. Fork the repository
  2. Clone the repository locally and open the devcontainer or use GitHub codespaces
  3. Do your changes
  4. Lint the files with `make lint`
  5. Ensure all tests passes with `make test`
  6. Ensure 100% coverage with `make coverage`
  7. Commit your work, and push it to GitHub
  8. Create a PR against the `main` branch


pkgId: 1e9d28843068454f1bd289728f7c19ffc8acb407476af61a883c8851fc5e5071
name: python-aws-assume-role-lib
arch: src
version: 2.10.0
epoch: 0
release: 1
summary: Assumed role session chaining (with credential refreshing) for boto3
url: https://github.com/benkehoe/aws-assume-role-lib
rpm_license: Apache-2.0
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-d2845dc2-fc5d-49c1-9511-1fde66e949c7
location_href: 00012327-python-aws-assume-role-lib/python-aws-assume-role-lib-2.10.0-1.src.rpm
checksum_type: sha256
description:
  **Assumed role session chaining (with credential refreshing) for boto3**

  The typical way to use boto3 when programmatically assuming a role is to explicitly call [`sts.AssumeRole`](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/sts.html#STS.Client.assume_role) and use the returned credentials to create a new [`boto3.Session`](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/core/session.html) or client.
  It looks like this mess of code:

  ```python
  role_arn = "arn:aws:iam::123456789012:role/MyRole"
  session = boto3.Session()

  sts = session.client("sts")
  response = sts.assume_role(
      RoleArn=role_arn,
      RoleSessionName="something_you_have_to_think_about"
  )

  credentials = response["Credentials"]

  assumed_role_session = boto3.Session(
      aws_access_key_id=credentials["AccessKeyId"],
      aws_secret_access_key=credentials["SecretAccessKey"],
      aws_session_token=credentials["SessionToken"]
  )


  print(assumed_role_session.client("sts").get_caller_identity())
  ```

  This code is verbose, requires specifying a role session name even if you don't care what it is, and must explicitly handle credential expiration and refreshing if needed (in a Lambda function, this is typically handled by calling `AssumeRole` in every invocation).

  With `aws-assume-role-lib`, all that collapses down to a single line. The assumed role session automatically refreshes expired credentials and generates a role session name if one is not provided.

  ```python
  role_arn = "arn:aws:iam::123456789012:role/MyRole"
  session = boto3.Session()

  assumed_role_session = aws_assume_role_lib.assume_role(session, role_arn)


  print(assumed_role_session.client("sts").get_caller_identity())
  ```

  In a Lambda function that needs to assume a role, you can create the assumed role session during initialization and use it for the lifetime of the execution environment, with `AssumeRole` calls only being made when necessary, not on every invocation.

  Note that in `~/.aws/config`, [you have the option to have profiles that assume a role based on another profile](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-role.html), and this automatically handles refreshing expired credentials as well.

  If you've only used `boto3.client()` and are not familiar with boto3 sessions, [here's an explainer](https://ben11kehoe.medium.com/boto3-sessions-and-why-you-should-use-them-9b094eb5ca8e).



  ```bash
  pip install --user aws-assume-role-lib
  ```

  Or just add [`aws_assume_role_lib.py`](https://raw.githubusercontent.com/benkehoe/aws-assume-role-lib/stable/aws_assume_role_lib/aws_assume_role_lib.py) to your project.

  View the release history [here](CHANGELOG.md).



  ```python
  import boto3
  from aws_assume_role_lib import assume_role


  session = boto3.Session()




  assumed_role_session = assume_role(session, "arn:aws:iam::123456789012:role/MyRole")


  print(session.client("sts").get_caller_identity()["Arn"])


  print(assumed_role_session.client("sts").get_caller_identity()["Arn"])
  ```

  In Lambda, initialize the sessions outside the handler, and `AssumeRole` will only get called when necessary, rather than on every invocation:
  ```python
  import os
  import boto3
  from aws_assume_role_lib import assume_role, generate_lambda_session_name


  SESSION = boto3.Session()


  ROLE_ARN = os.environ["ROLE_ARN"]
  ROLE_SESSION_NAME = generate_lambda_session_name() # see below for details


  ASSUMED_ROLE_SESSION = assume_role(SESSION, ROLE_ARN, RoleSessionName=ROLE_SESSION_NAME)

  def handler(event, context):
      
      print(SESSION.client("sts").get_caller_identity()["Arn"])

      
      print(ASSUMED_ROLE_SESSION.client("sts").get_caller_identity()["Arn"])
  ```
  Learn more about the benefits of `aws-assume-role-lib` in Lambda functions in the [demo](lambda-demo/README.md).



  ```
  assume_role(
      
      session:           boto3.Session,
      RoleArn:           str,

      *,
      
      RoleSessionName:   str                                    = None,
      PolicyArns:        Union[list[dict[str, str]], list[str]] = None,
      Policy:            Union[str, dict]                       = None,
      DurationSeconds:   Union[int, datetime.timedelta]         = None,
      Tags:              list[dict[str, str]]                   = None,
      TransitiveTagKeys: list[str]                              = None,
      ExternalId:        str                                    = None,
      SerialNumber:      str                                    = None,
      TokenCode:         str                                    = None,
      SourceIdentity:    str                                    = None,
      additional_kwargs: dict                                   = None,

      
      region_name:       Union[str, bool]                       = None,

      
      validate:          bool                                   = True,
      cache:             dict                                   = None,
  )
  ```

  `assume_role()` takes a session and a role ARN, and optionally [other keyword arguments for `sts.AssumeRole`](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/sts.html#STS.Client.assume_role).

  Unlike the `AssumeRole` API call itself, `RoleArn` is required, but `RoleSessionName` is not.
  The `RoleSessionName` is set for you if it is not provided; it will use the [`SourceIdentity`](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html) if that is provided, otherwise it will generated.
  If you want this generated value for `RoleSessionName` when `SourceIdentity` is provided (the behavior in v2.8 and before), set `RoleSessionName` to the special value `aws_assume_role_lib.AUTOMATIC_ROLE_SESSION_NAME`.

  Note that unlike the boto3 sts client method, you can provide the `Policy` parameter (the [inline session policy](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)) as a `dict` instead of as a serialized JSON string, `PolicyArns` as a list of ARNs, and `DurationSeconds` as a `datetime.timedelta` instead of as an integer.

  By default, the session returned by `assume_role()` links its region configuration to the input session.
  If you would like to set the region explicitly, pass it in the `region_name` parameter.

  Note that if the parent session was created without a region passed in to the `Session` constructor, it has an implicit region, based on searching potential configuration locations.
  This means that the region used by the session can change (for example, if you set or change `os.environ["AWS_DEFAULT_REGION"]`).
  By default, the child session region is linked to the parent session, so if the parent session has an implicit region, or if the parent session's region is changed directly, they would both change.
  If you would like to fix the child session region to be explicitly the current value, pass `region_name=True`.
  If, for some reason, you have an explicit region set on the parent, and want the child to have implicit region config, pass `region_name=False`.

  By default, `assume_role()` checks if the parameters are invalid.
  Without this validation, errors for these issues are more confusingly raised when the child session is first used to make an API call (boto3 doesn't make the call to retrieve credentials until they are needed).
  However, this incurs a small time penalty, so parameter validation can be disabled by passing `validate=False`.

  If any new arguments are added to `AssumeRole` in the future and this library is not updated to allow them directly, they can be passed in as a dict via the `additional_kwargs` argument.

  The parent session is available on the child session in the `assume_role_parent_session` property.
  Note this property is added by this library; ordinary boto3 sessions do not have it.



  You can make the `assume_role()` function available directly in boto3 by calling `patch_boto3()`.
  This creates a `boto3.assume_role(RoleArn, ...)` function (note that it does not take a session, it uses the same default session as `boto3.client()`), and adds a `boto3.Session.assume_role()` method.
  So usage for that looks like:

  ```python
  import boto3
  import aws_assume_role_lib
  aws_assume_role_lib.patch_boto3()

  assumed_role_session = boto3.assume_role("arn:aws:iam::123456789012:role/MyRole")



  session = boto3.Session(profile_name="my-profile")
  assumed_role_session = session.assume_role("arn:aws:iam::123456789012:role/MyRole")
  ```


  Learn more about the benefits of `aws-assume-role-lib` in Lambda functions in the [demo](lambda-demo/README.md).

  If you don't provide a role session name, but you provide a [`SourceIdentity`](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html), this value is used for the role session name as well.
  If `SourceIdentity` is not provided either, the underlying `botocore` library [generates one using a timestamp](https://github.com/boto/botocore/blob/c53072ec257ef47e2fc749c384a9488fd3f3e626/botocore/credentials.py#L730).
  That's the best it can do, because it doesn't have any other context.

  But in a Lambda function, we do have additional context, the Lambda function itself.
  If you call `generate_lambda_session_name()` inside an instance of a Lambda function, it returns a session name that corresponds to the function instance, which you can use when assuming a role in the Lambda function (either with this library's `assume_role()` or any other method).
  The purpose of this is to simplify tracing usage of the session back to the function instance.

  The returned value is in one of the following forms, depending on the length of the values, to keep the session name within the maximum of 64 characters:
  * `{function_name}`
  * `{function_name}.{identifier}`
  * `{function_name}.{function_version}.{identifier}`

  The function version is never included if it is `$LATEST`.

  The maximum role session name length is 64 characters. To ensure this, and
  to provide at least 4 characters of the identifier when it is used, the
  following rules apply, in order:
  1. If the function name is longer than 59 characters, the session name is the truncated function name.
  2. If the function name plus the function version is longer than 59 characters, the session name is the function name plus the identifier, truncated.
  3. Otherwise, the session name is the function name plus the version (if one is found and not $LATEST) plus the identifier, truncated.

  The identifier is the function instance's unique ID taken from the CloudWatch log stream name; if this cannot be found, it's a timestamp if the identifier can be at least 14 characters long (to provide for second-level precision), otherwise it is a random string.
  The identifier will not be included unless at least 4 characters

  The values are automatically extracted from [the relevant environment variables](https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-runtime); you can override any of them by providing them as arguments to the function.


  `assume_role()` requires a role ARN, and if you know the role name and account id but have trouble remembering the [exact format of role ARNs](https://docs.aws.amazon.com/service-authorization/latest/reference/list_identityandaccessmanagement.html#identityandaccessmanagement-resources-for-iam-policies), there's `get_role_arn()` for you.
  There's additionally a `get_assumed_role_session_arn()` for formatting assumed role session ARNs.

  ```
  get_role_arn(
      account_id: Union[str, int],
      role_name:  str,
      path:       str             = "",
      partition:  str             = "aws",
  )

  get_assumed_role_session_arn(
      account_id:        Union[str, int],
      role_name:         str,
      role_session_name: str,
      partition:         str             = "aws",
  )
  ```

  For `get_role_arn()`, if the role name has a path, it can be provided as part of the name or as the separate `path` argument (but not both).
  Assumed role session ARNs do not include the role path; if it is used in the role name it is removed.



  If you would like to cache the credentials on the file system, you can use the `JSONFileCache` class, which will create files under the directory you provide in the constructor (which it will create if it doesn't exist).
  Use it like:
  ```python
  assumed_role_session = assume_role(session, "arn:aws:iam::123456789012:role/MyRole", cache=JSONFileCache("path/to/dir"))
  ```
  You can also use any `dict`-like object for the cache (supporting `__getitem__`/`__setitem__`/`__contains__`).


  `aws-assume-role-lib` has basic support for retrieving assumed role credentials from the command line.
  In general, it's better to make profiles in `~/.aws/config` for role assumption, like this:

  ```ini

  [profile profile-to-call-assume-role-with]




  [profile my-assumed-role]
  role_arn = arn:aws:iam::123456789012:role/MyRole


  source_profile = profile-to-call-assume-role-with





  ```

  You can use `my-assumed-role` like any other profile.
  It uses the AWS SDKs' built-in support for role assumption, rather than relying on this third party library.
  It also gets you credential refreshing from the SDKs, where getting the credentials in the manner below cannot refresh them when they expire.

  But if you absolutely must have ad hoc role assumption on the command line, use the module invocation syntax `python -m aws_assume_role_lib ROLE_ARN [OPTIONS]`.

  The options are:
  * `--profile`: use a specific configuration profile.
  * `--env`: print the credentials as environment variables (the default), suitable for `export $(python -m aws_assume_role_lib ...)`.
  * `--json`: print the credentials in [`credential_process`-formatted JSON format](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sourcing-external.html). Note that you don't normally need to use this as a `credential_process` in a profile, because you can just directly make the profile do role assumption as shown above.
  * The remaining options are the arguments to `assume_role()`:
    * `--RoleSessionName`
    * `--PolicyArns`: must be a comma-separated list of ARNs, a JSON list of ARNs, or a JSON object per the API
    * `--Policy`: must be a JSON object
    * `--DurationSeconds`
    * `--Tags`: must be formatted as `Key1=Value1,Key2=Value2`, or a JSON object.
    * `--TransitiveTagKeys`: must be a comma-separated list or a JSON list.
    * `--ExternalId`
    * `--SerialNumber`
    * `--TokenCode`
    * `--SourceIdentity`
    * `--additional-kwargs`: must be a JSON object.


pkgId: 0b4beba620949ac904abc34c303dc6e9dffad265cbbb525dbeee8e54b382ae2d
name: python-aws-configure
arch: src
version: 2.1.8
epoch: 0
release: 1
summary: A CLI to configure AWS named profiles in ~/.aws/config and ~/.aws/credentials files
url: https://github.com/qoomon/aws-configure
rpm_license: MIT License
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-87c21b75-53f0-49f6-b4cb-66357d94a647
location_href: 00013396-python-aws-configure/python-aws-configure-2.1.8-1.src.rpm
checksum_type: sha256
description:
  [![PyPI](https://img.shields.io/pypi/v/aws-configure?)](https://pypi.org/project/aws-configure/)

  A CLI to configure AWS named profiles in `~/.aws/config` and `~/.aws/credentials files`


  ```
  list profiles:

        aws-configure list


    set profile options:

        aws-configure set [--profile/-p <profile_name>] [--clean/-c] [<config_options...>]

            --profile/-p <profile_name> : select profile ['default']
            <config_options>            : key=value pairs e.g. 'region=eu-central-1' 'source_profile=default'
            --empty/-e                  : empty all profile options before setting new options
            --empty-config              : empty profile config options before setting
            --empty-credentials         : empty profile credentials options before setting

    get profile options:

        aws-configure get [--profile/-p <profile_name>] [<config_options...>]

            --profile/-p <profile_name> : select profile ['default']
            <config_options>            : option key e.g. 'region' 'source_profile'

    delete profile:

        aws-configure delete [--profile/-p <profile_name>] [--config] [--credentials]

            --profile/-p <profile_name> : select profile ['default']
            --config                    : delete only profile config in '~/.aws/config'
            --credentials               : delete only profile credentials in '~/.aws/credentials'

    print help

        aws-configure help
  ```




  `pip3 install -r requirements.txt`

  `pip3 install -r requirements-dev.txt`


  `python3 setup.py sdist bdist_wheel`


  `pip3 install --force-reinstall --no-deps dist/aws_configure-*-py3-none-any.whl`


  `twine upload dist/*`


pkgId: 051855e0ad3f5f66c82ad33ef664ae38d68eb418d86d0f0cea00445f7a60a7d9
name: python-aws-embedded-metrics
arch: src
version: 3.1.0
epoch: 0
release: 1
summary: AWS Embedded Metrics Package
url: https://github.com/awslabs/aws-embedded-metrics-python
rpm_license: Apache Software License
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-3f1ef4e8-42dc-4cff-80ad-709f9269c748
location_href: 00012460-python-aws-embedded-metrics/python-aws-embedded-metrics-3.1.0-1.src.rpm
checksum_type: sha256
description:
  ![](https://codebuild.us-west-2.amazonaws.com/badges?uuid=eyJlbmNyeXB0ZWREYXRhIjoidjNkYXpXTzMxdUY2dEdab2RaZTgvTXhUSGh2bjNmUlhmUEorejM0UytyOWNqeFptcUpBT2wzNkJ1MkExQXI3UFdNaGQzNlVmSzBPWkRhdmhkb2lqL05NPSIsIml2UGFyYW1ldGVyU3BlYyI6IkhKZS9rd2UwYzVud1VucVgiLCJtYXRlcmlhbFNldFNlcmlhbCI6MX0%3D&branch=master)
  [![](https://img.shields.io/pypi/v/aws-embedded-metrics)](https://pypi.org/project/aws-embedded-metrics/)

  Generate CloudWatch Metrics embedded within structured log events. The embedded metrics will be extracted so you can visualize and alarm on them for real-time incident detection. This allows you to monitor aggregated values while preserving the detailed event context that generated them.

  - [Use Cases](#use-cases)
  - [Installation](#installation)
  - [Usage](#usage)
  - [API](#api)
  - [Examples](#examples)
  - [Development](#development)



  - **Generate custom metrics across compute environments**

    - Easily generate custom metrics from Lambda functions without requiring custom batching code, making blocking network requests or relying on 3rd party software.
    - Other compute environments (EC2, On-prem, ECS, EKS, and other container environments) are supported by installing the [CloudWatch Agent](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Embedded_Metric_Format_Generation_CloudWatch_Agent.html).

  - **Linking metrics to high cardinality context**

    Using the Embedded Metric Format, you will be able to visualize and alarm on custom metrics, but also retain the original, detailed and high-cardinality context which is queryable using [CloudWatch Logs Insights](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AnalyzingLogData.html). For example, the library automatically injects environment metadata such as Lambda Function version, EC2 instance and image ids into the structured log event data.



  ```
  pip3 install aws-embedded-metrics
  ```



  To get a metric logger, you can decorate your function with a `metric_scope`:

  ```py
  from aws_embedded_metrics import metric_scope

  @metric_scope
  def my_handler(metrics):
      metrics.put_dimensions({"Foo": "Bar"})
      metrics.put_metric("ProcessingLatency", 100, "Milliseconds", StorageResolution.STANDARD)
      metrics.put_metric("Memory.HeapUsed", 1600424.0, "Bytes", StorageResolution.HIGH)
      metrics.set_property("AccountId", "123456789012")
      metrics.set_property("RequestId", "422b1569-16f6-4a03")
      metrics.set_property("DeviceId", "61270781-c6ac-46f1")

      return {"message": "Hello!"}
  ```





  The `MetricsLogger` is the interface you will use to publish embedded metrics.

  - **put_metric**(key: str, value: float, unit: str = "None", storage_resolution: int = 60) -> MetricsLogger

  Adds a new metric to the current logger context. Multiple metrics using the same key will be appended to an array of values. Multiple metrics cannot have same key and different storage resolution. The Embedded Metric Format supports a maximum of 100 values per key. If more metric values are added than are supported by the format, the logger will be flushed to allow for new metric values to be captured.

  Requirements:

  - Name Length 1-255 characters
  - Name must be ASCII characters only
  - Values must be in the range of 8.515920e-109 to 1.174271e+108. In addition, special values (for example, NaN, +Infinity, -Infinity) are not supported.
  - Metrics must meet CloudWatch Metrics requirements, otherwise a `InvalidMetricError` will be thrown. See [MetricDatum](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_MetricDatum.html) for valid values.

  - ##### Storage Resolution
  An OPTIONAL value representing the storage resolution for the corresponding metric. Setting this to `High` specifies this metric as a high-resolution metric, so that CloudWatch stores the metric with sub-minute resolution down to one second. Setting this to `Standard` specifies this metric as a standard-resolution metric, which CloudWatch stores at 1-minute resolution. If a value is not provided, then a default value of `Standard` is assumed. See [Cloud Watch High-Resolution metrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/publishingMetrics.html#high-resolution-metrics)

  Examples:

  ```py

  put_metric("Latency", 200, "Milliseconds")
  put_metric("Latency", 201, "Milliseconds", StorageResolution.STANDARD)


  put_metric("Memory.HeapUsed", 1600424.0, "Bytes", StorageResolution.HIGH)
  ```

  - **set_property**(key: str, value: Any) -> MetricsLogger

  Adds or updates the value for a given property on this context. This value is not submitted to CloudWatch Metrics but is searchable by CloudWatch Logs Insights. This is useful for contextual and potentially high-cardinality data that is not appropriate for CloudWatch Metrics dimensions.

  Requirements:

  - Length 1-255 characters

  Examples:

  ```py
  set_property("RequestId", "422b1569-16f6-4a03-b8f0-fe3fd9b100f8")
  set_property("InstanceId", "i-1234567890")
  set_property("Device", {
    "Id": "61270781-c6ac-46f1-baf7-22c808af8162",
    "Name": "Transducer",
    "Model": "PT-1234"
  })
  ```

  - **put_dimensions**(dimensions: Dict[str, str]) -> MetricsLogger

  Adds a new set of dimensions that will be associated to all metric values.

  **WARNING**: Every distinct value will result in a new CloudWatch Metric.
  If the cardinality of a particular value is expected to be high, you should consider
  using `setProperty` instead.

  Requirements:

  - Length 1-255 characters
  - ASCII characters only
  - Dimensions must meet CloudWatch Dimensions requirements, otherwise a `InvalidDimensionError` or `DimensionSetExceededError` will be thrown. See [Dimensions](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_Dimension.html) for valid values.

  Examples:

  ```py
  put_dimensions({ "Operation": "Aggregator" })
  put_dimensions({ "Operation": "Aggregator", "DeviceType": "Actuator" })
  ```

  - **set_dimensions**(\*dimensions: Dict[str, str], use_default: bool = False) -> MetricsLogger

  Explicitly override all dimensions. By default, this will disable the default dimensions, but can be configured using the *keyword-only* parameter `use_default`.

  **WARNING**: Every distinct value will result in a new CloudWatch Metric.
  If the cardinality of a particular value is expected to be high, you should consider
  using `setProperty` instead.

  Requirements:

  - Length 1-255 characters
  - ASCII characters only
  - Dimensions must meet CloudWatch Dimensions requirements, otherwise a `InvalidDimensionError` or `DimensionSetExceededError` will be thrown. See [Dimensions](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_Dimension.html) for valid values.

  Examples:

  ```py
  set_dimensions(
    { "Operation": "Aggregator" },
    { "Operation": "Aggregator", "DeviceType": "Actuator" }
  )
  ```

  ```py
  set_dimensions(
    { "Operation": "Aggregator" },
    use_default=True  # default dimensions would be enabled
  )
  ```

  - **reset_dimensions**(use_default: bool) -> MetricsLogger

  Explicitly clear all custom dimensions. The behavior of whether default dimensions should be used can be configured with the `use_default` parameter.

  Examples:

  ```py
  reset_dimensions(False)  # this will clear all custom dimensions as well as disable default dimensions
  ```

  - **set_namespace**(value: str) -> MetricsLogger

  Sets the CloudWatch [namespace](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#Namespace) that extracted metrics should be published to. If not set, a default value of aws-embedded-metrics will be used.

  Requirements:

  - Name Length 1-255 characters
  - Name must be ASCII characters only
  - Namespace must meet CloudWatch Namespace requirements, otherwise a `InvalidNamespaceError` will be thrown. See [Namespaces](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#Namespace) for valid values.

  Examples:

  ```py
  set_namespace("MyApplication")
  ```

  - **flush**()

  Flushes the current MetricsContext to the configured sink and resets all properties and metric values. The namespace and default dimensions will be preserved across flushes.
  Custom dimensions are **not** preserved by default, but this behavior can be changed by setting `logger.flush_preserve_dimensions = True`, so that custom dimensions would be preserved after each flushing thereafter.

  Example:

  ```py
  logger.flush()  # only default dimensions will be preserved after each flush()
  ```

  ```py
  logger.flush_preserve_dimensions = True
  logger.flush()  # custom dimensions and default dimensions will be preserved after each flush()
  ```

  ```py
  logger.reset_dimensions(False)
  logger.flush()  # default dimensions are disabled; no dimensions will be preserved after each flush()
  ```



  All configuration values can be set using environment variables with the prefix (`AWS_EMF_`). Configuration should be performed as close to application start up as possible.

  **ServiceName**: Overrides the name of the service. For services where the name cannot be inferred (e.g. Java process running on EC2), a default value of Unknown will be used if not explicitly set.

  Requirements:

  - Name Length 1-255 characters
  - Name must be ASCII characters only

  Example:

  ```py

  from aws_embedded_metrics.config import get_config
  Config = get_config()
  Config.service_name = "MyApp"


  AWS_EMF_SERVICE_NAME = MyApp
  ```

  **ServiceType**: Overrides the type of the service. For services where the type cannot be inferred (e.g. Java process running on EC2), a default value of Unknown will be used if not explicitly set.

  Requirements:

  - Name Length 1-255 characters
  - Name must be ASCII characters only

  Example:

  ```py

  from aws_embedded_metrics.config import get_config
  Config = get_config()
  Config.service_type = "NodeJSWebApp"


  AWS_EMF_SERVICE_TYPE = NodeJSWebApp
  ```

  **LogGroupName**: For agent-based platforms, you may optionally configure the destination log group that metrics should be delivered to. This value will be passed from the library to the agent in the Embedded Metric payload. If a LogGroup is not provided, the default value will be derived from the service name: <service-name>-metrics

  Requirements:

  - Name Length 1-512 characters
  - Log group names consist of the following characters: a-z, A-Z, 0-9, '\_' (underscore), '-' (hyphen), '/' (forward slash), and '.' (period). Pattern: [\.\-_/#A-Za-z0-9]+

  Example:

  ```py

  from aws_embedded_metrics.config import get_config
  Config = get_config()
  Config.log_group_name = "LogGroupName"


  AWS_EMF_LOG_GROUP_NAME = LogGroupName
  ```

  **LogStreamName**: For agent-based platforms, you may optionally configure the destination log stream that metrics should be delivered to. This value will be passed from the library to the agent in the Embedded Metric payload. If a LogGroup is not provided, the default value will be derived by the agent (this will likely be the hostname).

  Requirements:

  - Name Length 1-512 characters
  - The ':' (colon) and '\*' (asterisk) characters are not allowed. Pattern: [^:]\*

  Example:

  ```py

  from aws_embedded_metrics.config import get_config
  Config = get_config()
  Config.log_stream_name = "LogStreamName"


  AWS_EMF_LOG_STREAM_NAME = LogStreamName
  ```

  **NameSpace**: Overrides the CloudWatch [namespace](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#Namespace). If not set, a default value of aws-embedded-metrics will be used.

  Requirements:

  - Name Length 1-512 characters
  - Name must be ASCII characters only

  Example:

  ```py

  from aws_embedded_metrics.config import get_config
  Config = get_config()
  Config.namespace = "MyApplication"


  AWS_EMF_NAMESPACE = MyApplication
  ```

  **DISABLE_METRIC_EXTRACTION**: Disables extraction of metrics by CloudWatch, by omitting EMF
  metadata from serialized log records.

  Example:

  ```py

  from aws_embedded_metrics.config import get_config
  Config = get_config()
  Config.disable_metric_extraction = True


  AWS_EMF_DISABLE_METRIC_EXTRACTION = true
  ```



  Check out the [examples](https://github.com/awslabs/aws-embedded-metrics-python/tree/master/examples) directory to get started.



  1. Install Test Dependencies

  ```
  pip install tox
  ```

  2. Run tests

  ```
  tox
  ```

  3. Integration tests. These tests require Docker to run the CloudWatch Agent and valid AWS credentials. Tests can be run by:

  ```sh
  export AWS_ACCESS_KEY_ID=
  export AWS_SECRET_ACCESS_KEY=
  export AWS_REGION=us-west-2
  ./bin/run-integ-tests.sh
  ```



  This project is licensed under the Apache-2.0 License.


pkgId: 1bae9e80846ef12da6ef9f1048efb81ba3e01553cbfbc985052609f05f8f9ab1
name: python-aws-logging-handlers
arch: src
version: 2.0.5
epoch: 0
release: 1
url: https://github.com/omrikiei/aws_logging_handlers/
rpm_license: MIT License
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-80bb6ca5-3925-4ee5-9b7d-bce56f2fa97c
location_href: 00010892-python-aws-logging-handlers/python-aws-logging-handlers-2.0.5-1.src.rpm
checksum_type: sha256
summary:
  Logging aws_logging_handlers to AWS services that support S3 and Kinesis stream logging with multiple threads

description:
  A python multithreaded logging handler package that streams records to
  AWS services objects with support for the following AWS services: \* S3
  \* Kinesis
  Supports gzip compression(in S3)


pkgId: 611c22888318f1352fc3f484e8babf71313f930022db5630eef0e8da5c20f919
name: python-aws-xray-sdk
arch: src
version: 2.12.0
epoch: 0
release: 1
url: https://github.com/aws/aws-xray-sdk-python
rpm_license: Apache License 2.0
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-a1b39a06-fd13-4819-8af2-6f1fd1187b97
location_href: 00009316-python-aws-xray-sdk/python-aws-xray-sdk-2.12.0-1.src.rpm
checksum_type: sha256
summary:
  The AWS X-Ray SDK for Python (the SDK) enables Python developers to record and emit information from within their applications to the AWS X-Ray service.

description:
  ![Build Status](https://github.com/aws/aws-xray-sdk-python/actions/workflows/IntegrationTesting.yaml/badge.svg)
  [![codecov](https://codecov.io/gh/aws/aws-xray-sdk-python/branch/master/graph/badge.svg)](https://codecov.io/gh/aws/aws-xray-sdk-python)



  AWS X-Ray supports using OpenTelemetry Python and the AWS Distro for OpenTelemetry (ADOT) Collector to instrument your application and send trace data to X-Ray. The OpenTelemetry SDKs are an industry-wide standard for tracing instrumentation. They provide more instrumentations and have a larger community for support, but may not have complete feature parity with the X-Ray SDKs. See [choosing between the ADOT and X-Ray SDKs](https://docs.aws.amazon.com/xray/latest/devguide/xray-instrumenting-your-app.html#xray-instrumenting-choosing) for more help with choosing between the two.

  If you want additional features when tracing your Python applications, please [open an issue on the OpenTelemetry Python Instrumentation repository](https://github.com/open-telemetry/opentelemetry-python-contrib/issues/new?labels=feature-request&template=feature_request.md&title=X-Ray%20Compatible%20Feature%20Request).



  AWS X-Ray SDK for Python versions `>2.11.0` has dropped support for Python 2.7, 3.4, 3.5, and 3.6.



  ![Screenshot of the AWS X-Ray console](/images/example_servicemap.png?raw=true)



  The AWS X-Ray SDK for Python is compatible with Python 3.7, 3.8, 3.9, 3.10, and 3.11.

  Install the SDK using the following command (the SDK's non-testing dependencies will be installed).

  ```
  pip install aws-xray-sdk
  ```

  To install the SDK's testing dependencies, use the following command.

  ```
  pip install tox
  ```



  Use the following community resources for getting help with the SDK. We use the GitHub
  issues for tracking bugs and feature requests.

  * Ask a question in the [AWS X-Ray Forum](https://forums.aws.amazon.com/forum.jspa?forumID=241&start=0).
  * Open a support ticket with [AWS Support](http://docs.aws.amazon.com/awssupport/latest/user/getting-started.html).
  * If you think you may have found a bug, open an [issue](https://github.com/aws/aws-xray-sdk-python/issues/new).



  If you encounter a bug with the AWS X-Ray SDK for Python, we want to hear about
  it. Before opening a new issue, search the [existing issues](https://github.com/aws/aws-xray-sdk-python/issues)
  to see if others are also experiencing the issue. Include the version of the AWS X-Ray
  SDK for Python, Python language, and botocore/boto3 if applicable. In addition,
  include the repro case when appropriate.

  The GitHub issues are intended for bug reports and feature requests. For help and
  questions about using the AWS SDK for Python, use the resources listed
  in the [Getting Help](https://github.com/aws/aws-xray-sdk-python#getting-help) section. Keeping the list of open issues lean helps us respond in a timely manner.



  The [developer guide](https://docs.aws.amazon.com/xray/latest/devguide) provides in-depth
  guidance about using the AWS X-Ray service.
  The [API Reference](http://docs.aws.amazon.com/xray-sdk-for-python/latest/reference/)
  provides guidance for using the SDK and module-level documentation.





  ```python
  from aws_xray_sdk.core import xray_recorder

  xray_recorder.configure(
      sampling=False,
      context_missing='LOG_ERROR',
      plugins=('EC2Plugin', 'ECSPlugin', 'ElasticBeanstalkPlugin'),
      daemon_address='127.0.0.1:3000',
      dynamic_naming='*mysite.com*'
  )
  ```



  Using context managers for implicit exceptions recording:

  ```python
  from aws_xray_sdk.core import xray_recorder

  with xray_recorder.in_segment('segment_name') as segment:
      
      segment.put_metadata('key', dict, 'namespace')
      with xray_recorder.in_subsegment('subsegment_name') as subsegment:
          subsegment.put_annotation('key', 'value')
          
      with xray_recorder.in_subsegment('subsegment2') as subsegment:
          subsegment.put_annotation('key2', 'value2')
          
  ```

  async versions of context managers:

  ```python
  from aws_xray_sdk.core import xray_recorder

  async with xray_recorder.in_segment_async('segment_name') as segment:
      
      segment.put_metadata('key', dict, 'namespace')
      async with xray_recorder.in_subsegment_async('subsegment_name') as subsegment:
          subsegment.put_annotation('key', 'value')
          
      async with xray_recorder.in_subsegment_async('subsegment2') as subsegment:
          subsegment.put_annotation('key2', 'value2')
          
  ```

  Default begin/end functions:

  ```python
  from aws_xray_sdk.core import xray_recorder


  segment = xray_recorder.begin_segment('segment_name')

  subsegment = xray_recorder.begin_subsegment('subsegment_name')


  segment.put_metadata('key', dict, 'namespace')
  subsegment.put_annotation('key', 'value')
  xray_recorder.end_subsegment()


  xray_recorder.end_segment()
  ```


  To modify the sampling decision at the subsegment level, subsegments that inherit the decision of their direct parent (segment or subsegment) can be created using `xray_recorder.begin_subsegment()` and unsampled subsegments can be created using
  `xray_recorder.begin_subsegment_without_sampling()`.

  The code snippet below demonstrates creating a sampled or unsampled subsegment based on the sampling decision of each SQS message processed by Lambda.

  ```python
  from aws_xray_sdk.core import xray_recorder
  from aws_xray_sdk.core.models.subsegment import Subsegment
  from aws_xray_sdk.core.utils.sqs_message_helper import SqsMessageHelper

  def lambda_handler(event, context):

      for message in event['Records']:
          if SqsMessageHelper.isSampled(message):
              subsegment = xray_recorder.begin_subsegment('sampled_subsegment')
              print('sampled - processing SQS message')

          else:
              subsegment = xray_recorder.begin_subsegment_without_sampling('unsampled_subsegment')
              print('unsampled - processing SQS message')

      xray_recorder.end_subsegment()
  ```

  The code snippet below demonstrates wrapping a downstream AWS SDK request with an unsampled subsegment.
  ```python
  from aws_xray_sdk.core import xray_recorder, patch_all
  import boto3

  patch_all()

  def lambda_handler(event, context):
      subsegment = xray_recorder.begin_subsegment_without_sampling('unsampled_subsegment')
      client = boto3.client('sqs')
      print(client.list_queues())

      xray_recorder.end_subsegment()
  ```



  As a decorator:

  ```python
  from aws_xray_sdk.core import xray_recorder

  @xray_recorder.capture('subsegment_name')
  def myfunc():
      

  myfunc()
  ```

  or as a context manager:

  ```python
  from aws_xray_sdk.core import xray_recorder

  with xray_recorder.capture('subsegment_name') as subsegment:
      
      subsegment.put_annotation('mykey', val)
      
  ```

  Async capture as decorator:

  ```python
  from aws_xray_sdk.core import xray_recorder

  @xray_recorder.capture_async('subsegment_name')
  async def myfunc():
      

  async def main():
      await myfunc()
  ```

  or as context manager:

  ```python
  from aws_xray_sdk.core import xray_recorder

  async with xray_recorder.capture_async('subsegment_name') as subsegment:
      
      subsegment.put_annotation('mykey', val)
      
  ```



  ```python
  from aws_xray_sdk.core import xray_recorder


  segment1 = xray_recorder.begin_segment('segment_name')


  xray_recorder.put_annotation('key', 'value')


  subsegment1 = xray_recorder.begin_subsegment('subsegment_name')


  xray_recorder.put_metadata('key', 'value')

  if xray_recorder.is_sampled():
      
      val = compute_annotation_val()
      metadata = compute_metadata_body()
      xray_recorder.put_annotation('mykey', val)
      xray_recorder.put_metadata('mykey', metadata)
  ```


  X-Ray Python SDK will by default generate no-op trace and entity id for unsampled requests and secure random trace and entity id for sampled requests. If customer wants to enable generating secure random trace and entity id for all the (sampled/unsampled) requests (this is applicable for trace id injection into logs use case) then they should set the `AWS_XRAY_NOOP_ID` environment variable as False.


  Often times, it may be useful to be able to disable X-Ray for specific use cases, whether to stop X-Ray from sending traces at any moment, or to test code functionality that originally depended on X-Ray instrumented packages to begin segments prior to the code call. For example, if your application relied on an XRayMiddleware to instrument incoming web requests, and you have a method which begins subsegments based on the segment generated by that middleware, it would be useful to be able to disable X-Ray for your unit tests so that `SegmentNotFound` exceptions are not thrown when you need to test your method.

  There are two ways to disable X-Ray, one is through environment variables, and the other is through the SDKConfig module.

  **Disabling through the environment variable:**

  Prior to running your application, make sure to have the environment variable `AWS_XRAY_SDK_ENABLED` set to `false`.

  **Disabling through the SDKConfig module:**
  ```
  from aws_xray_sdk import global_sdk_config

  global_sdk_config.set_sdk_enabled(False)
  ```

  **Important Notes:**
  * Environment Variables always take precedence over the SDKConfig module when disabling/enabling. If your environment variable is set to `false` while your code calls `global_sdk_config.set_sdk_enabled(True)`, X-Ray will still be disabled.

  * If you need to re-enable X-Ray again during runtime and acknowledge disabling/enabling through the SDKConfig module, you may run the following in your application:
  ```
  import os
  from aws_xray_sdk import global_sdk_config

  del os.environ['AWS_XRAY_SDK_ENABLED']
  global_sdk_config.set_sdk_enabled(True)
  ```



  ```python
  from aws_xray_sdk.core import xray_recorder

  def lambda_handler(event, context):
      

      subsegment = xray_recorder.begin_subsegment('subsegment_name')
      
      
      subsegment.put_metadata('key', dict, 'namespace')
      subsegment.put_annotation('key', 'value')

      xray_recorder.end_subsegment()

      
  ```



  ```python
  import concurrent.futures

  import requests

  from aws_xray_sdk.core import xray_recorder
  from aws_xray_sdk.core import patch

  patch(('requests',))

  URLS = ['http://www.amazon.com/',
          'http://aws.amazon.com/',
          'http://example.com/',
          'http://www.bilibili.com/',
          'http://invalid-domain.com/']

  def load_url(url, trace_entity):
      
      xray_recorder.set_trace_entity(trace_entity)
      
      
      resp = requests.get(url)
      
      xray_recorder.clear_trace_entities()
      return resp


  current_entity = xray_recorder.get_trace_entity()
  with concurrent.futures.ThreadPoolExecutor(max_workers=5) as executor:
      
      future_to_url = {executor.submit(load_url, url, current_entity): url for url in URLS}
      for future in concurrent.futures.as_completed(future_to_url):
          url = future_to_url[future]
          try:
              data = future.result()
          except Exception:
              pass
  ```


  By default, if no other value is provided to `.configure()`, SQL trace streaming is enabled
  for all the supported DB engines. Those currently are:
  - Any engine attached to the Django ORM.
  - Any engine attached to SQLAlchemy.

  The behaviour can be toggled by sending the appropriate `stream_sql` value, for example:
  ```python
  from aws_xray_sdk.core import xray_recorder

  xray_recorder.configure(service='fallback_name', stream_sql=True)
  ```



  ```python
  from aws_xray_sdk.core import patch

  libs_to_patch = ('boto3', 'mysql', 'requests')
  patch(libs_to_patch)
  ```



  Full modules in the local codebase can be recursively patched by providing the module references
  to the patch function.
  ```python
  from aws_xray_sdk.core import patch

  libs_to_patch = ('boto3', 'requests', 'local.module.ref', 'other_module')
  patch(libs_to_patch)
  ```
  An `xray_recorder.capture()` decorator will be applied to all functions and class methods in the
  given module and all the modules inside them recursively. Some files/modules can be excluded by
  providing to the `patch` function a regex that matches them.
  ```python
  from aws_xray_sdk.core import patch

  libs_to_patch = ('boto3', 'requests', 'local.module.ref', 'other_module')
  ignore = ('local.module.ref.some_file', 'other_module.some_module\.*')
  patch(libs_to_patch, ignore_module_patterns=ignore)
  ```




  In django settings.py, use the following.

  ```python
  INSTALLED_APPS = [
      
      'aws_xray_sdk.ext.django',
  ]

  MIDDLEWARE = [
      'aws_xray_sdk.ext.django.middleware.XRayMiddleware',
      
  ]
  ```

  You can configure the X-Ray recorder in a Django app under the ‘XRAY_RECORDER’ namespace. For a minimal configuration, the 'AWS_XRAY_TRACING_NAME' is required unless it is specified in an environment variable.
  ```
  XRAY_RECORDER = {
      'AWS_XRAY_TRACING_NAME': 'My application', # Required - the segment name for segments generated from incoming requests
  }
  ```
  For more information about configuring Django with X-Ray read more about it in the [API reference](https://docs.aws.amazon.com/xray-sdk-for-python/latest/reference/frameworks.html)


  If Django's ORM is patched - either using the `AUTO_INSTRUMENT = True` in your settings file
  or explicitly calling `patch_db()` - the SQL query trace streaming can then be enabled or
  disabled updating the `STREAM_SQL` variable in your settings file. It is enabled by default.


  The automatic module patching can also be configured through Django settings.
  ```python
  XRAY_RECORDER = {
      'PATCH_MODULES': [
          'boto3',
          'requests',
          'local.module.ref',
          'other_module',
      ],
      'IGNORE_MODULE_PATTERNS': [
          'local.module.ref.some_file',
          'other_module.some_module\.*',
      ],
      ...
  }
  ```
  If `AUTO_PATCH_PARENT_SEGMENT_NAME` is also specified, then a segment parent will be created
  with the supplied name, wrapping the automatic patching so that it captures any dangling
  subsegments created on the import patching.


  X-Ray can't search on http annotations in subsegments.   To enable searching the middleware adds the http values as annotations
  This allows searching in the X-Ray console like so

  This is configurable in settings with `URLS_AS_ANNOTATION` that has 3 valid values
  `LAMBDA` - the default, which uses URLs as annotations by default if running in a lambda context
  `ALL` - do this for every request (useful if running in a mixed lambda/other deployment)
  `NONE` - don't do this for any (avoiding hitting the 50 annotation limit)

  ```
  annotation.url BEGINSWITH "https://your.url.com/here"
  ```



  ```python
  from aws_xray_sdk.core import xray_recorder
  from aws_xray_sdk.ext.flask.middleware import XRayMiddleware

  app = Flask(__name__)

  xray_recorder.configure(service='fallback_name', dynamic_naming='*mysite.com*')
  XRayMiddleware(app, xray_recorder)
  ```



  ```python
  from aws_xray_sdk.core import xray_recorder
  from aws_xray_sdk.ext.bottle.middleware import XRayMiddleware

  app = Bottle()

  xray_recorder.configure(service='fallback_name', dynamic_naming='*mysite.com*')
  app.install(XRayMiddleware(xray_recorder))
  ```


  Serverless is an application model that enables you to shift more of your operational responsibilities to AWS. As a result, you can focus only on your applications and services, instead of the infrastructure management tasks such as server provisioning, patching, operating system maintenance, and capacity provisioning. With serverless, you can deploy your web application to [AWS Lambda](https://aws.amazon.com/lambda/) and have customers interact with it through a Lambda-invoking endpoint, such as [Amazon API Gateway](https://aws.amazon.com/api-gateway/).

  X-Ray supports the Serverless model out of the box and requires no extra configuration. The middlewares in Lambda generate `Subsegments` instead of `Segments` when an endpoint is reached. This is because `Segments` cannot be generated inside the Lambda function, but it is generated automatically by the Lambda container. Therefore, when using the middlewares with this model, it is important to make sure that your methods only generate `Subsegments`.

  The following guide shows an example of setting up a Serverless application that utilizes API Gateway and Lambda:

  [Instrumenting Web Frameworks in a Serverless Environment](https://docs.aws.amazon.com/xray/latest/devguide/xray-sdk-python-serverless.html)



  Adding aiohttp middleware. Support aiohttp >= 2.3.

  ```python
  from aiohttp import web

  from aws_xray_sdk.ext.aiohttp.middleware import middleware
  from aws_xray_sdk.core import xray_recorder
  from aws_xray_sdk.core.async_context import AsyncContext

  xray_recorder.configure(service='fallback_name', context=AsyncContext())

  app = web.Application(middlewares=[middleware])
  app.router.add_get("/", handler)

  web.run_app(app)
  ```

  Tracing aiohttp client. Support aiohttp >=3.

  ```python
  from aws_xray_sdk.ext.aiohttp.client import aws_xray_trace_config

  async def foo():
      trace_config = aws_xray_trace_config()
      async with ClientSession(loop=loop, trace_configs=[trace_config]) as session:
          async with session.get(url) as resp
              await resp.read()
  ```


  The SQLAlchemy integration requires you to override the Session and Query Classes for SQL Alchemy

  SQLAlchemy integration uses subsegments so you need to have a segment started before you make a query.

  ```python
  from aws_xray_sdk.core import xray_recorder
  from aws_xray_sdk.ext.sqlalchemy.query import XRaySessionMaker

  xray_recorder.begin_segment('SQLAlchemyTest')

  Session = XRaySessionMaker(bind=engine)
  session = Session()

  xray_recorder.end_segment()
  app = Flask(__name__)

  xray_recorder.configure(service='fallback_name', dynamic_naming='*mysite.com*')
  XRayMiddleware(app, xray_recorder)
  ```



  ```python
  from aws_xray_sdk.core import xray_recorder
  from aws_xray_sdk.ext.flask.middleware import XRayMiddleware
  from aws_xray_sdk.ext.flask_sqlalchemy.query import XRayFlaskSqlAlchemy

  app = Flask(__name__)
  app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///:memory:"

  XRayMiddleware(app, xray_recorder)
  db = XRayFlaskSqlAlchemy(app)

  ```



  If you want to ignore certain httplib requests you can do so based on the hostname or URL that is being requsted. The hostname is matched using the Python [fnmatch library](https://docs.python.org/3/library/fnmatch.html) which does Unix glob style matching.

  ```python
  from aws_xray_sdk.ext.httplib import add_ignored as xray_add_ignored


  xray_add_ignored(hostname='test.myapp.com')


  xray_add_ignored(hostname='*.myapp.com')


  xray_add_ignored(urls=['/test-path', '/other-test-path'])


  xray_add_ignored(hostname='myapp.com', urls=['/test-url'])
  ```

  If you use a subclass of httplib to make your requests, you can also filter on the class name that initiates the request. This must use the complete package name to do the match.

  ```python
  from aws_xray_sdk.ext.httplib import add_ignored as xray_add_ignored


  xray_add_ignored(subclass='botocore.awsrequest.AWSHTTPConnection')
  ```



  The AWS X-Ray SDK for Python is licensed under the Apache 2.0 License. See LICENSE and NOTICE.txt for more information.


pkgId: e703efee1b461b3661570d2af32485a7665b1027e743be839e662c0ed0f1a889
name: python-awscli
arch: src
version: 1.27.109
epoch: 0
release: 1
summary: Universal Command Line Environment for AWS.
url: http://aws.amazon.com/cli/
rpm_license: Apache License 2.0
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-dbee13d4-a586-4fb5-8076-1f3b97cc18cf
location_href: 00008887-python-awscli/python-awscli-1.27.109-1.src.rpm
checksum_type: sha256
description:
  This package provides a unified command line interface to Amazon Web
  Services.
  Jump to:
  -  `Getting Started <#getting-started>`__
  -  `Getting Help <#getting-help>`__
  -  `More Resources <#more-resources>`__


pkgId: da1e5f9d55c0430e42e0e5f6d79e4b2c2b2cc4b00a71d9404a44703f133a81d1
name: python-awscli-local
arch: src
version: 0.20
epoch: 0
release: 1
summary: Thin wrapper around the "aws" command line interface for use with LocalStack
url: https://github.com/localstack/awscli-local
rpm_license: Apache License 2.0
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-a4842a99-7f9c-4888-a1c5-d6d65acd3996
location_href: 00013089-python-awscli-local/python-awscli-local-0.20-1.src.rpm
checksum_type: sha256
description:
  [![PyPI version][pypi-version]][pypi]

  This package provides the `awslocal` command, which is a thin wrapper around the `aws`
  command line interface for use with [LocalStack](https://github.com/localstack/localstack).



  You can install the `awslocal` command via `pip`:

  ```console
  pip install awscli-local[ver1]
  ```

  Note that the command above also installs the latest version of the underlying AWS CLI version 1 (`awscli`) package. Use this command if you prefer to manage your own version of `awscli` (e.g., `v1`/`v2`) and install the wrapper script only:
  ```console
  pip install awscli-local
  ```

  **Note:** Automatic installation of AWS CLI version 2 is currently not supported yet (at the time of writing there is no official pypi package for `v2` available), but the `awslocal` technically also works with AWS CLI v2 (see [this section](#Limitations) for more details).



  The `awslocal` command has the same usage as the `aws` command. For detailed usage,
  please refer to the man pages of `aws help`.



  Instead of the following command ...

  ```console
  aws --endpoint-url=http://localhost:4566 kinesis list-streams
  ```

  ... you can simply use this:

  ```console
  awslocal kinesis list-streams
  ```



  You can use the following environment variables for configuration:

  * `LOCALSTACK_HOST`: Set the hostname for the localstack instance. Useful when you have
  localstack is bound to another interface (i.e. docker-machine).
  * `USE_SSL`: Whether to use `https` endpoint URLs (required if LocalStack has been started
  with `USE_SSL=true` enabled). Defaults to `false`.
  * `DEFAULT_REGION`: Set the default region. Overrides `AWS_DEFAULT_REGION` environment variable.



  * Please note that there is a known limitation for using the `cloudformation package ...` command with the AWS CLI v2. The problem is that the AWS CLI v2 is [not available as a package on pypi.org](https://github.com/aws/aws-cli/issues/4947), but is instead shipped as a binary package that cannot be easily patched from `awslocal`. To work around this issue, you have 2 options:

     - Downgrade to the v1 AWS CLI (this is the recommended approach)
     - There is an inofficial way to install AWS CLI v2 from sources. We do not recommend this, but it is technically possible. Also, you should install these libraries in a Python virtualenv, to avoid version clashes with other libraries on your system:
  ```console
  virtualenv .venv
  . .venv/bin/activate
  pip install https://github.com/boto/botocore/archive/v2.zip https://github.com/aws/aws-cli/archive/v2.zip
  ```



  * v0.19: Patch botocore to skip adding `data-` host prefixes to endpoint URLs
  * v0.18: Pass `SYSTEMROOT` env variable to fix "_Py_HashRandomization_Init" error on Windows
  * v0.17: Remove obsolete/erroneous FORCE_V2 flag
  * v0.16: Minor fix reading addressing_style in profile config
  * v0.15: Fix lookup of v1/v2 AWS CLI version, apply --s3-endpoint-url only for v1
  * v0.14: Quote file name for windows to allow folder names with spaces
  * v0.13: Fix extra requires for newer pip versions
  * v0.12: Support v1 and v2 of underlying `awscli` installation
  * v0.9: Add `--s3-endpoint-url` by default to fix "cloudformation package" command
  * v0.9: Support for `DEFAULT_REGION` environment variable
  * v0.8: Switch to using edge port for all service endpoints by default
  * v0.7: Apply runtime patch to aws-cli to enable `--s3-endpoint-url` CloudFormation parameter
  * v0.6: Start `aws` CLI command in-memory instead of calling external process
  * v0.5: Support piping binary files to stdout; add .bat file for Windows
  * v0.4: Minor fix for Python 3 compatibility
  * v0.3: Add support for additional service endpoints
  * v0.2: Enable SSL connections; refactor code
  * v0.1: Initial release



  This package can be replaced by a single bash alias, except for `cloudformation package ...` as this command requires an additional `--s3-endpoint-url` parameter:
  ```console
  alias awslocal="AWS_ACCESS_KEY_ID=test AWS_SECRET_ACCESS_KEY=test AWS_DEFAULT_REGION=${DEFAULT_REGION:-$AWS_DEFAULT_REGION} aws --endpoint-url=http://${LOCALSTACK_HOST:-localhost}:4566"
  ```



  This software library is released under the Apache License, Version 2.0 (see `LICENSE`).

  [pypi-version]: https://img.shields.io/pypi/v/awscli-local.svg
  [pypi]: https://pypi.org/project/awscli-local/


pkgId: 69f438ca4e84ea45943acb94802d2337dd9161da835896e31fdb3b059f26f2ab
name: python-awsiotsdk
arch: src
version: 1.12.6
epoch: 0
release: 1
summary: AWS IoT SDK based on the AWS Common Runtime
url: https://github.com/aws/aws-iot-device-sdk-python-v2
rpm_license: License :: OSI Approved :: Apache Software License
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-30183da8-812f-4bb9-9b6c-891e04019f83
location_href: 00013343-python-awsiotsdk/python-awsiotsdk-1.12.6-1.src.rpm
checksum_type: sha256
description:
  [![Version](https://img.shields.io/pypi/v/awsiotsdk.svg?style=flat)](https://pypi.org/project/awsiotsdk/)

  This document provides information about the AWS IoT Device SDK v2 for Python.

  If you have any issues or feature requests, please file an issue or pull request.

  API documentation: https://aws.github.io/aws-iot-device-sdk-python-v2/

  This SDK is built on the AWS Common Runtime, a collection of libraries
  ([aws-c-common](https://github.com/awslabs/aws-c-common),
  [aws-c-io](https://github.com/awslabs/aws-c-io),
  [aws-c-mqtt](https://github.com/awslabs/aws-c-mqtt),
  [aws-c-compression](https://github.com/awslabs/aws-c-compression),
  [aws-c-http](https://github.com/awslabs/aws-c-http),
  [aws-c-cal](https://github.com/awslabs/aws-c-cal),
  [aws-c-auth](https://github.com/awslabs/aws-c-auth),
  [s2n](https://github.com/awslabs/s2n) ...) written in C to be
  cross-platform, high-performance, secure, and reliable. The libraries are bound
  to Python by the `awscrt` package ([PyPI](https://pypi.org/project/awscrt/)) ([Github](https://github.com/awslabs/aws-crt-python)).

  *__Jump To:__*
  * [Installation](#Installation)
  * [Samples](samples)
  * [Getting Help](#Getting-Help)
  * [FAQ](./documents/FAQ.md)
  * [Giving Feedback and Contributions](#Giving-Feedback-and-Contributions)
  * [MQTT5 User Guide](./documents/MQTT5_Userguide.md)





  * Python 3.7+

  [Step-by-step instructions](./documents/PREREQUISITES.md)





  ```
  python3 -m pip install awsiotsdk
  ```



  ```
  python -m pip install awsiotsdk
  ```



  ```

  mkdir sdk-workspace
  cd sdk-workspace

  git clone https://github.com/aws/aws-iot-device-sdk-python-v2.git

  python3 -m pip install ./aws-iot-device-sdk-python-v2
  ```



  `awsiotsdk` depends on [awscrt](https://github.com/awslabs/aws-crt-python), which makes use of C extensions. Precompiled wheels are downloaded when installing on major platforms (Mac, Windows, Linux, Raspberry Pi OS). If wheels are unavailable for your platform, your machine must compile some C libraries.

  If you encounter issues, see [Installation Issues](./documents/PREREQUISITES.md#installation-issues) and try again.



  [Samples README](samples)



  The best way to interact with our team is through GitHub. You can [open an issue](https://github.com/aws/aws-iot-device-sdk-python-v2/issues) and choose from one of our templates for guidance, bug reports, or feature requests. You may also find help on community resources such as [StackOverFlow](https://stackoverflow.com/questions/tagged/aws-iot) with the tag #aws-iot or If you have a support plan with [AWS Support](https://aws.amazon.com/premiumsupport/), you can also create a new support case.

  Please make sure to check out our resources too before opening an issue:

  * Our [FAQ](./documents/FAQ.md)
  * [API documentation](https://aws.github.io/aws-iot-device-sdk-python-v2/)
  * Our [Developer Guide](https://docs.aws.amazon.com/iot/latest/developerguide/what-is-aws-iot.html) ([source](https://github.com/awsdocs/aws-iot-docs))
  * Check for similar [Issues](https://github.com/aws/aws-iot-device-sdk-python-v2/issues)
  * [AWS IoT Core Documentation](https://docs.aws.amazon.com/iot/)
  * [Dev Blog](https://aws.amazon.com/blogs/?awsf.blog-master-iot=category-internet-of-things%23amazon-freertos%7Ccategory-internet-of-things%23aws-greengrass%7Ccategory-internet-of-things%23aws-iot-analytics%7Ccategory-internet-of-things%23aws-iot-button%7Ccategory-internet-of-things%23aws-iot-device-defender%7Ccategory-internet-of-things%23aws-iot-device-management%7Ccategory-internet-of-things%23aws-iot-platform)
  * Integration with AWS IoT Services such as
  [Device Shadow](https://docs.aws.amazon.com/iot/latest/developerguide/iot-device-shadows.html)
  and [Jobs](https://docs.aws.amazon.com/iot/latest/developerguide/iot-jobs.html)
  is provided by code that been generated from a model of the service.



  We need your help in making this SDK great. Please participate in the community and contribute to this effort by submitting issues, participating in discussion forums and submitting pull requests through the following channels.

  * [Contributions Guidelines](./documents/CONTRIBUTING.md)
  * Articulate your feature request or upvote existing ones on our [Issues](https://github.com/aws/aws-iot-device-sdk-python-v2/issues?q=is%3Aissue+is%3Aopen+label%3Afeature-request) page.
  * Create discussion questions [here](https://github.com/aws/aws-iot-device-sdk-python-v2/discussions)
  * Find a bug open an [issue](https://github.com/aws/aws-iot-device-sdk-python-v2/issues)



  This library is licensed under the [Apache 2.0 License](./documents/LICENSE).

  Latest released version: v1.12.3


pkgId: 0c27baf1dde2bf4e1f6e5f0a3f778ce25a8458c6492d816e15fb7bca092a8bc5
name: python-awspolicy
arch: src
version: 0.0.3.1
epoch: 0
release: 1
summary: A package that helps modifying AWS policies as an object
url: https://github.com/totoleon/AwsPolicy
rpm_license: MIT License
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-007483a3-47a6-4901-8403-86ad6cdf9694
location_href: 00011386-python-awspolicy/python-awspolicy-0.0.3.1-1.src.rpm
checksum_type: sha256
description:
  AWS SDKs provides a wide availbility allowing automation and codifying your infrastructure. However, minipulating policies are not in a good control, because they are treated as a whole block of String.

  Scenario 1. You have an S3 bucket in a centralized account, which grants write permission of CloudTrail logs from all other accounts. At onboarding of a new account, you need to modify the bucket policy to insert another trusted principal. Doing it manually is ugly and unsafe.

  Scenario 2. In your billing account, there is an IAM Role that allows certain IAM Users to assume from the landing account. When a new IAM User is created and needed to be added to the trusted policy, you will need to update the policy manually.

  The diffuculty of automating this process is that, you have to keep the integrity of your policy document and only change the part that you want to. That's what this package can help you do.

  Borrowing the idea of selecting an element from HTML document, you can select a particular Statement from a policy document giving the Sid.


  This package only provides classes that you can use in your own code. It depends on boto3 but does not install it for you.

  To install the package:
  `pip install awspolicy`


  Talk is cheap and lets code. I have an S3 bucket, which has the following policy that controls permissions from IAM users. At the moment, it only grants IAM User 'bob' and 'jack' permission of to get contents from directory 'admin_folder'. When a new admin user 'daniel' onboards, I need to add his IAM User ARN to be granted in the policy, while not interferring the other functions of the policy document. Here is an example code to achieve that. Before, by bucket policy in JSON is like this:

  ```
  {
      "Id": "MyBucketPolicy",
      "Version": "2012-10-17",
      "Statement": [
          {
              "Sid": "AutomatedRestrictiveAccess",
              "Action": [
                  "s3:GetObject"
              ],
              "Effect": "Allow",
              "Resource": "arn:aws:s3:::hailong-python/admin_folder/*",
              "Principal": {
                  "AWS": [
                      "arn:aws:iam::888888888888:user/bob",
                      "arn:aws:iam::888888888888:user/jack"
                  ]
              }
          },
          {
              "Sid": "GenerallyGrantingAccess",
              "Action": [
                  "s3:GetObject"
              ],
              "Effect": "Allow",
              "Resource": "arn:aws:s3:::hailong-python/shared_files/*",
              "Principal": {
                  "AWS": [
                      "888888888888"
                  ]
              }
          },
          {
              "Sid": "DenyNonHTTPSTrafic",
              "Action": [
                  "s3:*"
              ],
              "Effect": "Deny",
              "Resource": "arn:aws:s3:::hailong-python/*",
              "Principal": "*",
              "Condition": {
                  "Bool": {
                      "aws:SecureTransport": "false"
                  }
              }
          }
      ]
  }
  ```

  Example code to modify the policy in Python

  ```
  import boto3
  from awspolicy import BucketPolicy

  s3_client = boto3.client('s3')
  bucket_name = 'hailong-python'


  bucket_policy = BucketPolicy(serviceModule=s3_client, resourceIdentifer=bucket_name)


  statement_to_modify = bucket_policy.select_statement('AutomatedRestrictiveAccess')


  new_user_arn = 'arn:aws:iam::888888888888:user/daniel'
  statement_to_modify.Principal['AWS'].append(new_user_arn)


  statement_to_modify.save()


  statement_to_modify.source_policy.save() # Or bucket_policy.save()

  ```

  After running the code, the new user is added to the statement:

  ```
  {
      "Version": "2012-10-17",
      "Id": "MyBucketPolicy",
      "Statement": [
          {
              "Sid": "AutomatedRestrictiveAccess",
              "Effect": "Allow",
              "Principal": {
                  "AWS": [
                      "arn:aws:iam::888888888888:user/daniel",
                      "arn:aws:iam::888888888888:user/jack",
                      "arn:aws:iam::888888888888:user/bob"
                  ]
              },
              "Action": "s3:GetObject",
              "Resource": "arn:aws:s3:::hailong-python/admin_folder/*"
          },
          {
              "Sid": "GenerallyGrantingAccess",
              "Effect": "Allow",
              "Principal": {
                  "AWS": "arn:aws:iam::888888888888:root"
              },
              "Action": "s3:GetObject",
              "Resource": "arn:aws:s3:::hailong-python/shared_files/*"
          },
          {
              "Sid": "DenyNonHTTPSTrafic",
              "Effect": "Deny",
              "Principal": "*",
              "Action": "s3:*",
              "Resource": "arn:aws:s3:::hailong-python/*",
              "Condition": {
                  "Bool": {
                      "aws:SecureTransport": "false"
                  }
              }
          }
      ]
  }
  ```



  ```

  policy.fill_up_sids()           # Generate Sids to the statements that don't have one. This updates the policy documents
  policy.select_statement(sid)    # Selecting a statement giving Sid. It returns None if didn't find one
  policy.reload()                 # Reload the policy document. This triggers getting the policy from AWS
  policy.save()                   # Upload the current policy document to AWS
  policy.sids                     # A list of statement Ids of the policy
  policy.content                  # Policy content in dict


  statement.reload()              # Reconstruct the statement content from the loaded Policy
  statement.save()                # Save changes of the statement
  statement.content               # Statement content in dict
  statement.source_policy         # Referring to the policy object which this statement belongs to

  statement.Sid
  statement.Effect
  statement.Principal
  statement.Action
  statement.Resource
  statement.Condition
  ```


  ```



  import json, boto3
  from awspolicy import BucketPolicy, KmsPolicy, IamRoleTrustPolicy

  kms = boto3.client('kms')
  cmk_policy = KmsPolicy(serviceModule=kms, resourceIdentifer='xxxxe011-a1ff-4460-8942-02da951xxxx')
  statement = cmk_policy.select_statement('AllowCloudTrailEncryptCrossAccountLogs')
  statement.Condition['StringLike']['kms:EncryptionContext:aws:cloudtrail:arn'] += [u'arn:aws:cloudtrail:*:888888888888:trail/*']
  statement.save()
  statement.source_policy.save()


  s3 = session.client('s3')
  bucket_policy = BucketPolicy(serviceModule=s3, resourceIdentifer='hailong-cloudtrail')
  statement = bucket_policy.select_statement('CloudTrailCrossAccountPermission')
  to_add_resource = 'arn:aws:s3:::hailong-cloudtrail/AWSLogs/888888888888/*'
  if to_add_resource not in statement.Resource:
      statement.Resource += ['arn:aws:s3:::hailong-cloudtrail/AWSLogs/888888888888/*']
      statement.save()
      statement.source_policy.save()


  iam = boto3.client('iam')
  role_trust_policy = IamRoleTrustPolicy(serviceModule=iam, resourceIdentifer='EC2ReadOnly')
  s = role_trust_policy.select_statement('CrossAccount')
  s.Conditon = None
  s.save()
  s.source_policy.save()
  ```


  This is a very simple package which I hope could help someone. If needed, we can wrap it up in a tool that allows more interactions with AWS policies. At this time, it only works with three kinds of Resource based policies S3, KMS, and IAM Role. With a bit of restructuring, it can be expanded to others like IAM principal-based policies etc. Please let me know if you found any bug or want to contribute.


pkgId: 430225169a4298c6720a337b402266188806437f3c0d2b98f2dba8cd16b52c45
name: python-awswrangler
arch: src
version: 2.20.1
epoch: 0
release: 1
summary: Pandas on AWS.
url: https://aws-sdk-pandas.readthedocs.io/
rpm_license: Apache-2.0
rpm_vendor: openEuler Copr - user mywaaagh_admin
rpm_group: Unspecified
rpm_buildhost: resalloc-7e01dbed-198e-4827-970d-08cc98633b68
location_href: 00009218-python-awswrangler/python-awswrangler-2.20.1-1.src.rpm
checksum_type: sha256
description:
  AWS Data Wrangler is now **AWS SDK for pandas (awswrangler)**.  We’re changing the name we use when we talk about the library, but everything else will stay the same.  You’ll still be able to install using `pip install awswrangler` and you won’t need to change any of your code.  As part of this change, we’ve moved the library from AWS Labs to the main AWS GitHub organisation but, thanks to the GitHub’s redirect feature, you’ll still be able to access the project by its old URLs until you update your bookmarks.  Our documentation has also moved to [aws-sdk-pandas.readthedocs.io](https://aws-sdk-pandas.readthedocs.io), but old bookmarks will redirect to the new site.

  *Pandas on AWS*

  Easy integration with Athena, Glue, Redshift, Timestream, OpenSearch, Neptune, QuickSight, Chime, CloudWatchLogs, DynamoDB, EMR, SecretManager, PostgreSQL, MySQL, SQLServer and S3 (Parquet, CSV, JSON and EXCEL).

  ![AWS SDK for pandas](docs/source/_static/logo2.png?raw=true "AWS SDK for pandas")
  ![tracker](https://d3tiqpr4kkkomd.cloudfront.net/img/pixel.png?asset=GVOYN2BOOQ573LTVIHEW)

  > An [AWS Professional Service](https://aws.amazon.com/professional-services/) open source initiative | aws-proserve-opensource@amazon.com

  [![Release](https://img.shields.io/badge/release-2.20.1-brightgreen.svg)](https://pypi.org/project/awswrangler/)
  [![Python Version](https://img.shields.io/badge/python-3.7%20%7C%203.8%20%7C%203.9%20%7C%203.10-brightgreen.svg)](https://anaconda.org/conda-forge/awswrangler)
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
  [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

  [![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)
  [![Coverage](https://img.shields.io/badge/coverage-91%25-brightgreen.svg)](https://pypi.org/project/awswrangler/)
  ![Static Checking](https://github.com/aws/aws-sdk-pandas/workflows/Static%20Checking/badge.svg?branch=main)
  [![Documentation Status](https://readthedocs.org/projects/aws-sdk-pandas/badge/?version=latest)](https://aws-sdk-pandas.readthedocs.io/?badge=latest)

  | Source | Downloads | Installation Command |
  |--------|-----------|----------------------|
  | **[PyPi](https://pypi.org/project/awswrangler/)**  | [![PyPI Downloads](https://pepy.tech/badge/awswrangler)](https://pypi.org/project/awswrangler/) | `pip install awswrangler` |
  | **[Conda](https://anaconda.org/conda-forge/awswrangler)** | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/awswrangler.svg)](https://anaconda.org/conda-forge/awswrangler) | `conda install -c conda-forge awswrangler` |

  > ⚠️ **For platforms without PyArrow 3 support (e.g. [EMR](https://aws-sdk-pandas.readthedocs.io/en/2.20.1/install.html#emr-cluster), [Glue PySpark Job](https://aws-sdk-pandas.readthedocs.io/en/2.20.1/install.html#aws-glue-pyspark-jobs), MWAA):**<br>
  ➡️ `pip install pyarrow==2 awswrangler`

  Powered By [<img src="https://arrow.apache.org/img/arrow.png" width="200">](https://arrow.apache.org/powered_by/)



  - [Quick Start](#quick-start)
  - [Read The Docs](#read-the-docs)
  - [Getting Help](#getting-help)
  - [Community Resources](#community-resources)
  - [Logging](#logging)
  - [Who uses AWS SDK for pandas?](#who-uses-aws-sdk-pandas)



  Installation command: `pip install awswrangler`

  > ⚠️ **For platforms without PyArrow 3 support (e.g. [EMR](https://aws-sdk-pandas.readthedocs.io/en/2.20.1/install.html#emr-cluster), [Glue PySpark Job](https://aws-sdk-pandas.readthedocs.io/en/2.20.1/install.html#aws-glue-pyspark-jobs), MWAA):**<br>
  ➡️`pip install pyarrow==2 awswrangler`

  ```py3
  import awswrangler as wr
  import pandas as pd
  from datetime import datetime

  df = pd.DataFrame({"id": [1, 2], "value": ["foo", "boo"]})


  wr.s3.to_parquet(
      df=df,
      path="s3://bucket/dataset/",
      dataset=True,
      database="my_db",
      table="my_table"
  )


  df = wr.s3.read_parquet("s3://bucket/dataset/", dataset=True)


  df = wr.athena.read_sql_query("SELECT * FROM my_table", database="my_db")


  con = wr.redshift.connect("my-glue-connection")
  df = wr.redshift.read_sql_query("SELECT * FROM external_schema.my_table", con=con)
  con.close()


  df = pd.DataFrame({
      "time": [datetime.now(), datetime.now()],
      "my_dimension": ["foo", "boo"],
      "measure": [1.0, 1.1],
  })
  rejected_records = wr.timestream.write(df,
      database="sampleDB",
      table="sampleTable",
      time_col="time",
      measure_col="measure",
      dimensions_cols=["my_dimension"],
  )


  wr.timestream.query("""
  SELECT time, measure_value::double, my_dimension
  FROM "sampleDB"."sampleTable" ORDER BY time DESC LIMIT 3
  """)

  ```



  - [**What is AWS SDK for pandas?**](https://aws-sdk-pandas.readthedocs.io/en/2.20.1/about.html)
  - [**Install**](https://aws-sdk-pandas.readthedocs.io/en/2.20.1/install.html)
    - [PyPi (pip)](https://aws-sdk-pandas.readthedocs.io/en/2.20.1/install.html#pypi-pip)
    - [Conda](https://aws-sdk-pandas.readthedocs.io/en/2.20.1/install.html#conda)
    - [AWS Lambda Layer](https://aws-sdk-pandas.readthedocs.io/en/2.20.1/install.html#aws-lambda-layer)
    - [AWS Glue Python Shell Jobs](https://aws-sdk-pandas.readthedocs.io/en/2.20.1/install.html#aws-glue-python-shell-jobs)
    - [AWS Glue PySpark Jobs](https://aws-sdk-pandas.readthedocs.io/en/2.20.1/install.html#aws-glue-pyspark-jobs)
    - [Amazon SageMaker Notebook](https://aws-sdk-pandas.readthedocs.io/en/2.20.1/install.html#amazon-sagemaker-notebook)
    - [Amazon SageMaker Notebook Lifecycle](https://aws-sdk-pandas.readthedocs.io/en/2.20.1/install.html#amazon-sagemaker-notebook-lifecycle)
    - [EMR](https://aws-sdk-pandas.readthedocs.io/en/2.20.1/install.html#emr)
    - [From source](https://aws-sdk-pandas.readthedocs.io/en/2.20.1/install.html#from-source)
  - [**Tutorials**](https://github.com/aws/aws-sdk-pandas/tree/main/tutorials)
    - [001 - Introduction](https://github.com/aws/aws-sdk-pandas/blob/main/tutorials/001%20-%20Introduction.ipynb)
    - [002 - Sessions](https://github.com/aws/aws-sdk-pandas/blob/main/tutorials/002%20-%20Sessions.ipynb)
    - [003 - Amazon S3](https://github.com/aws/aws-sdk-pandas/blob/main/tutorials/003%20-%20Amazon%20S3.ipynb)
    - [004 - Parquet Datasets](https://github.com/aws/aws-sdk-pandas/blob/main/tutorials/004%20-%20Parquet%20Datasets.ipynb)
    - [005 - Glue Catalog](https://github.com/aws/aws-sdk-pandas/blob/main/tutorials/005%20-%20Glue%20Catalog.ipynb)
    - [006 - Amazon Athena](https://github.com/aws/aws-sdk-pandas/blob/main/tutorials/006%20-%20Amazon%20Athena.ipynb)
    - [007 - Databases (Redshift, MySQL, PostgreSQL, SQL Server and Oracle)](https://github.com/aws/aws-sdk-pandas/blob/main/tutorials/007%20-%20Redshift%2C%20MySQL%2C%20PostgreSQL%2C%20SQL%20Server%2C%20Oracle.ipynb)
    - [008 - Redshift - Copy & Unload.ipynb](https://github.com/aws/aws-sdk-pandas/blob/main/tutorials/008%20-%20Redshift%20-%20Copy%20%26%20Unload.ipynb)
    - [009 - Redshift - Append, Overwrite and Upsert](https://github.com/aws/aws-sdk-pandas/blob/main/tutorials/009%20-%20Redshift%20-%20Append%2C%20Overwrite%2C%20Upsert.ipynb)
    - [010 - Parquet Crawler](https://github.com/aws/aws-sdk-pandas/blob/main/tutorials/010%20-%20Parquet%20Crawler.ipynb)
    - [011 - CSV Datasets](https://github.com/aws/aws-sdk-pandas/blob/main/tutorials/011%20-%20CSV%20Datasets.ipynb)
    - [012 - CSV Crawler](https://github.com/aws/aws-sdk-pandas/blob/main/tutorials/012%20-%20CSV%20Crawler.ipynb)
    - [013 - Merging Datasets on S3](https://github.com/aws/aws-sdk-pandas/blob/main/tutorials/013%20-%20Merging%20Datasets%20on%20S3.ipynb)
    - [014 - Schema Evolution](https://github.com/aws/aws-sdk-pandas/blob/main/tutorials/014%20-%20Schema%20Evolution.ipynb)
    - [015 - EMR](https://github.com/aws/aws-sdk-pandas/blob/main/tutorials/015%20-%20EMR.ipynb)
    - [016 - EMR & Docker](https://github.com/aws/aws-sdk-pandas/blob/main/tutorials/016%20-%20EMR%20%26%20Docker.ipynb)
    - [017 - Partition Projection](https://github.com/aws/aws-sdk-pandas/blob/main/tutorials/017%20-%20Partition%20Projection.ipynb)
    - [018 - QuickSight](https://github.com/aws/aws-sdk-pandas/blob/main/tutorials/018%20-%20QuickSight.ipynb)
    - [019 - Athena Cache](https://github.com/aws/aws-sdk-pandas/blob/main/tutorials/019%20-%20Athena%20Cache.ipynb)
    - [020 - Spark Table Interoperability](https://github.com/aws/aws-sdk-pandas/blob/main/tutorials/020%20-%20Spark%20Table%20Interoperability.ipynb)
    - [021 - Global Configurations](https://github.com/aws/aws-sdk-pandas/blob/main/tutorials/021%20-%20Global%20Configurations.ipynb)
    - [022 - Writing Partitions Concurrently](https://github.com/aws/aws-sdk-pandas/blob/main/tutorials/022%20-%20Writing%20Partitions%20Concurrently.ipynb)
    - [023 - Flexible Partitions Filter](https://github.com/aws/aws-sdk-pandas/blob/main/tutorials/023%20-%20Flexible%20Partitions%20Filter.ipynb)
    - [024 - Athena Query Metadata](https://github.com/aws/aws-sdk-pandas/blob/main/tutorials/024%20-%20Athena%20Query%20Metadata.ipynb)
    - [025 - Redshift - Loading Parquet files with Spectrum](https://github.com/aws/aws-sdk-pandas/blob/main/tutorials/025%20-%20Redshift%20-%20Loading%20Parquet%20files%20with%20Spectrum.ipynb)
    - [026 - Amazon Timestream](https://github.com/aws/aws-sdk-pandas/blob/main/tutorials/026%20-%20Amazon%20Timestream.ipynb)
    - [027 - Amazon Timestream 2](https://github.com/aws/aws-sdk-pandas/blob/main/tutorials/027%20-%20Amazon%20Timestream%202.ipynb)
    - [028 - Amazon DynamoDB](https://github.com/aws/aws-sdk-pandas/blob/main/tutorials/028%20-%20DynamoDB.ipynb)
    - [029 - S3 Select](https://github.com/aws/aws-sdk-pandas/blob/main/tutorials/029%20-%20S3%20Select.ipynb)
    - [030 - Data Api](https://github.com/aws/aws-sdk-pandas/blob/main/tutorials/030%20-%20Data%20Api.ipynb)
    - [031 - OpenSearch](https://github.com/aws/aws-sdk-pandas/blob/main/tutorials/031%20-%20OpenSearch.ipynb)
    - [032 - Lake Formation Governed Tables](https://github.com/aws/aws-sdk-pandas/blob/main/tutorials/032%20-%20Lake%20Formation%20Governed%20Tables.ipynb)
    - [033 - Amazon Neptune](https://github.com/aws/aws-sdk-pandas/blob/main/tutorials/033%20-%20Amazon%20Neptune.ipynb)
    - [034 - Glue Data Quality](https://github.com/aws/aws-sdk-pandas/blob/main/tutorials/034%20-Glue%20%20Data%20Quality.ipynb)
  - [**API Reference**](https://aws-sdk-pandas.readthedocs.io/en/2.20.1/api.html)
    - [Amazon S3](https://aws-sdk-pandas.readthedocs.io/en/2.20.1/api.html#amazon-s3)
    - [AWS Glue Catalog](https://aws-sdk-pandas.readthedocs.io/en/2.20.1/api.html#aws-glue-catalog)
    - [Amazon Athena](https://aws-sdk-pandas.readthedocs.io/en/2.20.1/api.html#amazon-athena)
    - [AWS Lake Formation](https://aws-sdk-pandas.readthedocs.io/en/2.20.1/api.html#aws-lake-formation)
    - [Amazon Redshift](https://aws-sdk-pandas.readthedocs.io/en/2.20.1/api.html#amazon-redshift)
    - [PostgreSQL](https://aws-sdk-pandas.readthedocs.io/en/2.20.1/api.html#postgresql)
    - [MySQL](https://aws-sdk-pandas.readthedocs.io/en/2.20.1/api.html#mysql)
    - [SQL Server](https://aws-sdk-pandas.readthedocs.io/en/2.20.1/api.html#sqlserver)
    - [Oracle](https://aws-sdk-pandas.readthedocs.io/en/2.20.1/api.html#oracle)
    - [Data API Redshift](https://aws-sdk-pandas.readthedocs.io/en/2.20.1/api.html#data-api-redshift)
    - [Data API RDS](https://aws-sdk-pandas.readthedocs.io/en/2.20.1/api.html#data-api-rds)
    - [OpenSearch](https://aws-sdk-pandas.readthedocs.io/en/2.20.1/api.html#opensearch)
    - [Amazon Neptune](https://aws-sdk-pandas.readthedocs.io/en/2.20.1/api.html#amazon-neptune)
    - [DynamoDB](https://aws-sdk-pandas.readthedocs.io/en/2.20.1/api.html#dynamodb)
    - [Amazon Timestream](https://aws-sdk-pandas.readthedocs.io/en/2.20.1/api.html#amazon-timestream)
    - [Amazon EMR](https://aws-sdk-pandas.readthedocs.io/en/2.20.1/api.html#amazon-emr)
    - [Amazon CloudWatch Logs](https://aws-sdk-pandas.readthedocs.io/en/2.20.1/api.html#amazon-cloudwatch-logs)
    - [Amazon Chime](https://aws-sdk-pandas.readthedocs.io/en/2.20.1/api.html#amazon-chime)
    - [Amazon QuickSight](https://aws-sdk-pandas.readthedocs.io/en/2.20.1/api.html#amazon-quicksight)
    - [AWS STS](https://aws-sdk-pandas.readthedocs.io/en/2.20.1/api.html#aws-sts)
    - [AWS Secrets Manager](https://aws-sdk-pandas.readthedocs.io/en/2.20.1/api.html#aws-secrets-manager)
    - [Global Configurations](https://aws-sdk-pandas.readthedocs.io/en/2.20.1/api.html#global-configurations)
  - [**License**](https://github.com/aws/aws-sdk-pandas/blob/main/LICENSE.txt)
  - [**Contributing**](https://github.com/aws/aws-sdk-pandas/blob/main/CONTRIBUTING.md)



  The best way to interact with our team is through GitHub. You can open an [issue](https://github.com/aws/aws-sdk-pandas/issues/new/choose) and choose from one of our templates for bug reports, feature requests...
  You may also find help on these community resources:
  * The #aws-sdk-pandas Slack [channel](https://join.slack.com/t/aws-sdk-pandas/shared_invite/zt-sxdx38sl-E0coRfAds8WdpxXD2Nzfrg)
  * Ask a question on [Stack Overflow](https://stackoverflow.com/questions/tagged/awswrangler)
    and tag it with `awswrangler`



  Please [send a Pull Request](https://github.com/aws/aws-sdk-pandas/edit/main/README.md) with your resource reference and @githubhandle.

  - [Optimize Python ETL by extending Pandas with AWS SDK for pandas](https://aws.amazon.com/blogs/big-data/optimize-python-etl-by-extending-pandas-with-aws-data-wrangler/) [[@igorborgest](https://github.com/igorborgest)]
  - [Reading Parquet Files With AWS Lambda](https://aprakash.wordpress.com/2020/04/14/reading-parquet-files-with-aws-lambda/) [[@anand086](https://github.com/anand086)]
  - [Transform AWS CloudTrail data using AWS SDK for pandas](https://aprakash.wordpress.com/2020/09/17/transform-aws-cloudtrail-data-using-aws-data-wrangler/) [[@anand086](https://github.com/anand086)]
  - [Rename Glue Tables using AWS SDK for pandas](https://ananddatastories.com/rename-glue-tables-using-aws-sdk-pandas/) [[@anand086](https://github.com/anand086)]
  - [Getting started on AWS SDK for pandas and Athena](https://medium.com/@dheerajsharmainampudi/getting-started-on-aws-sdk-pandas-and-athena-7b446c834076) [[@dheerajsharma21](https://github.com/dheerajsharma21)]
  - [Simplifying Pandas integration with AWS data related services](https://medium.com/@bv_subhash/aws-sdk-pandas-simplifying-pandas-integration-with-aws-data-related-services-2b3325c12188) [[@bvsubhash](https://github.com/bvsubhash)]
  - [Build an ETL pipeline using AWS S3, Glue and Athena](https://www.linkedin.com/pulse/build-etl-pipeline-using-aws-s3-glue-athena-data-wrangler-tom-reid/) [[@taupirho](https://github.com/taupirho)]



  Enabling internal logging examples:

  ```py3
  import logging
  logging.basicConfig(level=logging.INFO, format="[s][s] s")
  logging.getLogger("awswrangler").setLevel(logging.DEBUG)
  logging.getLogger("botocore.credentials").setLevel(logging.CRITICAL)
  ```

  Into AWS lambda:

  ```py3
  import logging
  logging.getLogger("awswrangler").setLevel(logging.DEBUG)
  ```



  Knowing which companies are using this library is important to help prioritize the project internally.
  If you would like us to include your company’s name and/or logo in the README file to indicate that your company is using the AWS SDK for pandas, please raise a "Support Us" issue. If you would like us to display your company’s logo, please raise a linked pull request to provide an image file for the logo. Note that by raising a Support Us issue (and related pull request), you are granting AWS permission to use your company’s name (and logo) for the limited purpose described here and you are confirming that you have authority to grant such permission.

  - [Amazon](https://www.amazon.com/)
  - [AWS](https://aws.amazon.com/)
  - [Cepsa](https://cepsa.com) [[@alvaropc](https://github.com/alvaropc)]
  - [Cognitivo](https://www.cognitivo.ai/) [[@msantino](https://github.com/msantino)]
  - [Digio](https://www.digio.com.br/) [[@afonsomy](https://github.com/afonsomy)]
  - [DNX](https://www.dnx.solutions/) [[@DNXLabs](https://github.com/DNXLabs)]
  - [Fortescue Future Industries](https://ffi.com.au/) [[@spencervoorend](https://github.com/spencervoorend)]
  - [Funcional Health Tech](https://www.funcionalcorp.com.br/) [[@webysther](https://github.com/webysther)]
  - [Funding Circle](https://www.fundingcircle.com/) [[@pfig](https://github.com/pfig)]
  - [Infomach](https://www.infomach.com.br/)
  - [Informa Markets](https://www.informamarkets.com/en/home.html) [[@mateusmorato]](http://github.com/mateusmorato)
  - [LINE TV](https://www.linetv.tw/) [[@bryanyang0528](https://github.com/bryanyang0528)]
  - [Magnataur](https://magnataur.com) [[@brianmingus2](https://github.com/brianmingus2)]
  - [M4U](https://www.m4u.com.br/) [[@Thiago-Dantas](https://github.com/Thiago-Dantas)]
  - [NBCUniversal](https://www.nbcuniversal.com/) [[@vibe](https://github.com/vibe)]
  - [nrd.io](https://nrd.io/) [[@mrtns](https://github.com/mrtns)]
  - [OKRA Technologies](https://okra.ai) [[@JPFrancoia](https://github.com/JPFrancoia), [@schot](https://github.com/schot)]
  - [Pier](https://www.pier.digital/) [[@flaviomax](https://github.com/flaviomax)]
  - [Pismo](https://www.pismo.io/) [[@msantino](https://github.com/msantino)]
  - [ringDNA](https://www.ringdna.com/) [[@msropp](https://github.com/msropp)]
  - [Serasa Experian](https://www.serasaexperian.com.br/) [[@andre-marcos-perez](https://github.com/andre-marcos-perez)]
  - [Shipwell](https://shipwell.com/) [[@zacharycarter](https://github.com/zacharycarter)]
  - [strongDM](https://www.strongdm.com/) [[@mrtns](https://github.com/mrtns)]
  - [Thinkbumblebee](https://www.thinkbumblebee.com/) [[@dheerajsharma21]](https://github.com/dheerajsharma21)
  - [VTEX](https://vtex.com/us-en/) [[@igorborgest]](https://github.com/igorborgest)
  - [Zillow](https://www.zillow.com/) [[@nicholas-miles]](https://github.com/nicholas-miles)


pkgId: 7b322b90614a5ced6cc958957429d6841ab5c45b27b5c5f44a679dc9cda59ad3
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-33f197b5-acfb-4dc1-88c8-bea0555816ff
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: f8be215f0ed954686b55a89c7bf15a02be2c6bc9b7ff682a22c591b39b4ebb26
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-3c137765-a23f-4241-8622-0ce2b0b5d5bd
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: fce6d642aa57898545d8c740b17bb686ba76ab33af8263c955bf8deae195d3e4
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-25f43781-8ce7-42f8-a306-b08058450377
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: 956f2bb654d57cc16c5394577f588723eb9bd5c77c941ee9b3070eef3d1c0828
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-25f43781-8ce7-42f8-a306-b08058450377
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: fe164c111b60f83a5fbd325476af5153dc6a634a0335bc075df200a015824b8f
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-b2df6b29-4cbb-4230-8d0d-05f657e30b9d
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: 553b436942c7ddef27ad289fced03f363eb4b61d103a692363210b4e1e3f741f
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-b16487ac-5ad0-4cd7-9f9d-099a359a443b
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: bd46421c72fee43c6a830d175eeb5ec4f6b8b90daf747e765f956d6da2f7966d
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-0f340cf0-8abb-4ed8-b3ca-d8d9d77e64dd
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: a58515e9c2d566fb0e3dca2fbbfe5dfa8077eef58c96507781628bef1fb8b4e2
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-1eec8c5d-bb2b-4fad-90fd-ad65ffcc5b1e
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: 75658a34dbca8a748d271bb756007fb970cd530a81c26d4f9b62c632c1e676f6
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-f4c44d1d-1b4a-4c26-ba81-85231e820833
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: 18262d41f3bdf730fcf97b5a5c7b26b9475657ce5bf83255bc6262a9af77bc01
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-92f824e7-ef5c-4c24-935b-b31052eb3eab
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: 4a0b8f446adb887c1661bd46137899af5edfae6567bf41b7a52b76fe181d7917
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-4639565f-cb92-497d-bdf9-5fdee1bd9ca6
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: f7f9af65dab006dbc521364b0466cce27fc3d73ea42e0207c399f3a93476d50f
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-44952c2f-6ce2-464a-9140-333e61811e60
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: 8fcd59140e8f5022bba89882d99ffdefc828e2b62012dd5ff48d2274289ddd93
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-171ff7ad-5c66-4bbd-9d2c-f02e3b976fd1
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: eeb516dc5470fc4144c963e4ff2ee0655425c6ebf44823a998f248bdab30b7bc
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-f60f565d-d6d8-4ddf-98ba-5e93b61909cd
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.


