# packages

pkgId: e4929022094c2caf3fcc8400553084c4aefb6e1837a4258a6d99add511824d18
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_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/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: 0b56e41fa3077d60b064bdda6e82725b5fcff72c4ddf160d00eaae460a6d1f58
name: python-avirtech-spraying-lib
arch: src
version: 0.1.1
epoch: 0
release: 1
summary: Avirtech Python Library to Generate drone spraying error with palm location
url: https://github.com/dwieka21-bit
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-avirtech-spraying-lib-0.1.1-1.src.rpm
checksum_type: sha256
description:
  This is the script to count drone error on palm tree location



  Install

  pip install avirtech_spraying_lib



  Usage

  from avirtech_spraying_lib.avir_palm_corr import autocorrect


pkgId: 37a4e3aa8d415d525688b52dcdb9a6e19f7e4d9623c075c20e025bbaa35a3cc9
name: python-avista-digital-exchange-sdk
arch: src
version: 0.3.8
epoch: 0
release: 1
summary: SDK to programmatically access the Avista Digital Exchange
url: https://energy.collaboratives.io/
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-avista-digital-exchange-sdk-0.3.8-1.src.rpm
checksum_type: sha256
description:
  Retrieves your user information.
  **Parameters**
  None
  **Return Type**
  [User](#user)
  **Example**
  ```py
  user = digitalExchange.getUserInfo()

rpm_license:
[cell repeats an earlier one in this file: 34486 characters]


pkgId: c27fabfbbb9e80737b38438ad508ecd70d064f5dfa93a6658f9850d7460738a6
name: python-aviv-aws-costexplorer
arch: src
version: 0.2.3
epoch: 0
release: 1
summary: Aviv AWS CostExplorer python library
url: https://github.com/aviv-group/aviv-aws-costexplorer
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aviv-aws-costexplorer-0.2.3-1.src.rpm
checksum_type: sha256
description:
  Aims to provide a quick and comprehensive interface to AWS costexplorer api.
  This is useful to extract cost and usage (aka CAU) data, save it and to make it available for reporting and analysis.



  - python >= 3.8
  - boto3
  - Access to AWS ce:cost_and_usage



  ```shell
  pip install aviv-aws-costexplorer


  pip install aviv-aws-costexplorer[datastore]
  ```

  Sample code

  ```python
  from aviv_aws_costexplorer import costreporter

  cr = costreporter.CostReporter()
  costs = cr.get_cost_and_usage()

  print(costs)

  from aviv_aws_costexplorer import datastore
  ds = datastore.DataStore(database='test', bucket='my-s3-bucket')
  ds.to_parquet(data=costs, path='monthly/last3', database='monthly')


  import pandas as pd
  df = pd.DataFrame(costs)
  df.head()




  ```



  ```bash
  pipenv install -d
  ```



  We typically follow the [standard python packaging and distribution](https://packaging.python.org/en/latest/tutorials/packaging-projects/#generating-distribution-archives) process to release this package.

  ```bash

  pipenv run pytest -v tests/


  python3 -m pip install --upgrade build
  python3 -m build


  python3 -m pip install --upgrade twine
  python3 -m twine upload --repository testpypi dist/*
  ```

  Note: the Pypi release is also done during the CICD process.



  Yes please! Send us your PR's


pkgId: 1cc4b1fe93233a32b74e22089e5f176edd3bbe110bbe398f34112cbab14ea13e
name: python-avmesos-airflow-provider
arch: src
version: 0.2.7
epoch: 0
release: 1
summary: Apache Mesos Provider
url: https://www.aventer.biz/
rpm_license: Apache License 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-avmesos-airflow-provider-0.2.7-1.src.rpm
checksum_type: sha256
description:
  [![Docs](https://img.shields.io/static/v1?label=&message=Issues&color=brightgreen)](https://github.com/m3scluster/airflow-provider-mesos/issues)
  [![Chat](https://img.shields.io/static/v1?label=&message=Chat&color=brightgreen)](https://matrix.to/#/#mesos:matrix.aventer.biz?via=matrix.aventer.biz)
  [![Docs](https://img.shields.io/static/v1?label=&message=Docs&color=brightgreen)](https://m3scluster.github.io/airflow-provider-mesos/)

  This provider for Apache Airflow contain the following features:

  - MesosExecuter - A scheduler to run Airflow DAG's on mesos
  - MesosOperator - To executer Airflow tasks on mesos. (TODO)




  To open an issue, please use this place: https://github.com/m3scluster/airflow-provider-mesos/issues



  - Airflow 2.x
  - Apache Mesos minimum 1.6.x



  On the Airflow Server, we have to install the mesos provider.

  ```bash
  pip install avmesos_airflow_provider
  ```

  Then we will configure Airflow.

  ```bash
  vim airflow.cfg

  executor = avmesos_airflow_provider.executors.mesos_executor.MesosExecutor

  [mesos]
  mesos_ssl = True
  master = leader.mesos:5050
  framework_name = Airflow
  checkpoint = True
  attributes = False
  failover_timeout = 604800
  command_shell = True
  task_cpu = 1
  task_memory = 20000
  authenticate = True
  default_principal = <MESOS USER>
  default_secret = <MESOS PASSWORD>
  docker_image_slave = <AIRFLOW DOCKER IMAGE>
  docker_volume_driver = local
  docker_volume_dag_name = airflowdags
  docker_volume_dag_container_path = /home/airflow/airflow/dags/
  docker_sock = /var/run/docker.sock
  docker_volume_logs_name = airflowlogs
  docker_volume_logs_container_path = /home/airflow/airflow/logs/
  docker_environment = '[{ "name":"<KEY>", "value":"<VALUE>" }, { ... }]'
  api_username = <USERNAME FOR THIS API>
  api_password = <PASSWORD FOR THIS API>


  ```




  ```python
  from airflow import DAG
  from datetime import datetime, timedelta
  from airflow.operators.dummy_operator import DummyOperator
  from airflow.providers.docker.operators.docker import DockerOperator
  from airflow.operators.python import PythonOperator

  default_args = {
          'owner'                 : 'airflow',
          'description'           : 'Use of the DockerOperator',
          'depend_on_past'        : True,
  }

  with DAG('docker_dag2', default_args=default_args, schedule_interval="*/10 * * * * ", catchup=True, start_date=datetime.now()) as dag:
          t2 = DockerOperator(
                  task_id='docker_command',
                  image='centos:latest',
                  api_version='auto',
                  auto_remove=False,
                  command="/bin/sleep 600",
                  docker_url='unix:///var/run/docker.sock',
                  executor_config={
                                  "cpus": 2.0,
                                  "mem_limit": 2048
                  }
          )

          t2
  ```



  For development and testing we deliver a nix-shell file to install airflow, our airflow provider and postgresql.
  To use it, please follow the following steps:

  1. Run mesos-mini:

  ```bash
  docker run --rm --name mesos --privileged=true --shm-size=30gb -it --net host avhost/mesos-mini:1.11.0-0.2.0-1 /lib/systemd/systemd
  ```

  2. Use nix-shell:


  ```bash
  nix-shell

  > airflow scheduler
  ```

  3. On the mesos-ui (http://localhost:5050) you will see Airflow as framework.


pkgId: f6e1b592ce3a6331a7852843391e86437f85364daef1b4e186966c39ba93fc74
name: python-avocado-framework-plugin-result-html
arch: src
version: 108.0
epoch: 0
release: 1
summary: Avocado HTML Report for Jobs
url: http://avocado-framework.github.io/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-avocado-framework-plugin-result-html-108.0-1.src.rpm
checksum_type: sha256
description:
  This optional plugin creates beautiful human readable results.
  To install the HTML plugin from pip, use::
      $ pip install avocado-framework-plugin-result-html
  Once installed it produces the results in job results dir::
      $ avocado run avocado/examples/tests/sleeptest.py avocado/examples/tests/failtest.py
      JOB ID     : 480461f676fcf2a8c1c449ca1252be9521ffcceb
      JOB LOG    : $HOME/avocado/job-results/job-2021-09-30T16.02-480461f/job.log
      (2/2) avocado/examples/tests/failtest.py:FailTest.test: STARTED
      (1/2) avocado/examples/tests/sleeptest.py:SleepTest.test: STARTED
      (2/2) avocado/examples/tests/failtest.py:FailTest.test: FAIL: This test is supposed to fail (0.04 s)
      (1/2) avocado/examples/tests/sleeptest.py:SleepTest.test: PASS (1.01 s)
      RESULTS    : PASS 1 | ERROR 0 | FAIL 1 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
      JOB HTML   : $HOME/avocado/job-results/job-2021-09-30T16.02-480461f/results.html
      JOB TIME   : 2.76 s
  This can be disabled via ``--disable-html-job-result``. One can also specify a
  custom location via ``--html`` . Last but not least ``--open-browser`` can be used to
  start browser automatically once the job finishes.


pkgId: a5b985bf915c0ae93b703641f420eda15453d11be84c1ca4bf01f66c488c63e6
name: python-avocado-framework-plugin-result-upload
arch: src
version: 108.0
epoch: 0
release: 1
summary: Avocado Plugin to propagate Job results to remote host
url: http://avocado-framework.github.io/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-avocado-framework-plugin-result-upload-108.0-1.src.rpm
checksum_type: sha256
description:
  This optional plugin is intended to upload the Avocado Job results to
  a dedicated sever.
  To install the Result Upload plugin from pip, use::
      pip install avocado-framework-plugin-result-upload
  Usage::
      $ avocado run avocado/examples/tests/passtest.py --result-upload-url www@avocadologs.example.com:/var/www/html
      JOB ID     : f40403c7409ef998f293a7c83ee456c32cb6547a
      JOB LOG    : $HOME/avocado/job-results/job-2021-09-30T22.16-f40403c/job.log
       (1/1) avocado/examples/tests/passtest.py:PassTest.test: STARTED
       (1/1) avocado/examples/tests/passtest.py:PassTest.test: PASS (0.01 s)
      RESULTS    : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
      JOB HTML   : $HOME/avocado/job-results/job-2021-09-30T22.16-f40403c/results.html
  Avocado logs will be available at following URL:
  - ssh
      www@avocadologs.example.com:/var/www/html/job-2021-09-30T22.16-f40403c
  - html (If web server is enabled)
      http://avocadologs.example.com/job-2021-09-30T22.16-f40403c/
  Such links may be referred by other plugins, such as the ResultsDB plugin.
  By default upload will be handled by following command ::
      rsync -arz -e 'ssh -o LogLevel=error -o stricthostkeychecking=no -o userknownhostsfile=/dev/null -o batchmode=yes -o passwordauthentication=no'
  Optionally, you can customize uploader command, for example following command upload logs to Google storage: ::
      $ avocado run avocado/examples/tests/passtest.py --result-upload-url='gs://avocadolog' --result-upload-cmd='gsutil -m cp -r'
  You can also set the ResultUpload URL and command using a config file::
      [plugins.result_upload]
      url = www@avocadologs.example.com:/var/www/htmlavocado/job-results
      command='rsync -arzq'
  And then run the Avocado command without the explicit command options. Notice
  that the command line options will have precedence over the configuration file.


pkgId: 1de5c36fb88d49c8cc2851afb3445427d08ca779f0bb0cb9ac7ebb453505c343
name: python-avocado-framework-plugin-resultsdb
arch: src
version: 108.0
epoch: 0
release: 1
summary: Avocado Plugin to propagate Job results to Resultsdb
url: http://avocado-framework.github.io/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-avocado-framework-plugin-resultsdb-108.0-1.src.rpm
checksum_type: sha256
description:
  This optional plugin is intended to propagate the Avocado Job results to
  a given ResultsDB API URL.
  To install the ResultsDB plugin from pip, use::
      pip install avocado-framework-plugin-resultsdb
  Usage::
      $ avocado run avocado/examples/tests/passtest.py --resultsdb-api http://resultsdb.example.com/api/v2.0/
  Optionally, you can provide the URL where the Avocado logs are published::
      $ avocado run avocado/examples/tests/passtest.py --resultsdb-api http://resultsdb.example.com/api/v2.0/ --resultsdb-logs http://avocadologs.example.com/
  The ``--resultsdb-logs`` is a convenience option that will create links
  to the logs in the ResultsDB records. The links will then have the
  following formats:
  - ResultDB group (Avocado Job)::
      http://avocadologs.example.com/job-2021-09-30T22.16-f40403c/
  - ResultDB result (Avocado Test)::
      http://avocadologs.example.com/job-2021-09-30T22.16-f40403c/test-results/1-passtest.py:PassTest.test/
  You can also set the ResultsDB API URL and logs URL using a config file::
      [plugins.resultsdb]
      api_url = http://resultsdb.example.com/api/v2.0/
      logs_url = http://avocadologs.example.com/
  And then run the Avocado command without the ``--resultsdb-api`` and
  ``--resultsdb-logs`` options. Notice that the command line options will
  have precedence over the configuration file.


pkgId: 1d5b80271460546122d6d7a33c3db2ddca3dc6a19636cb2756bb62f30db314fe
name: python-avocado-framework-plugin-varianter-pict
arch: src
version: 108.0
epoch: 0
release: 1
summary: Varianter with combinatorial capabilities by PICT
url: http://avocado-framework.github.io/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-avocado-framework-plugin-varianter-pict-108.0-1.src.rpm
checksum_type: sha256
description:
  `avocado_varianter_pict`
  This plugin uses a third-party tool to provide variants created by
  "Pair-Wise" algorithms, also known as Combinatorial Independent
  Testing.


pkgId: 14efee94d82ae66ed8a1beb6671d18010492d2ed8e1f2eddc5a8c65f3e6c5a53
name: python-avocado-framework-plugin-varianter-yaml-to-mux
arch: src
version: 108.0
epoch: 0
release: 1
summary: Avocado Varianter plugin to parse YAML file into variants
url: http://avocado-framework.github.io/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-avocado-framework-plugin-varianter-yaml-to-mux-108.0-1.src.rpm
checksum_type: sha256
description:
  `avocado_varianter_yaml_to_mux`
  This plugin utilizes the ``multiplexation`` mechanism to
  produce variants out of a yaml file. This section is example-based,
  if you are interested in test parameters and/or ``multiplexation``
  overview, please take a look at `test-parameter`.
  As mentioned earlier, it inherits from the
  `avocado_varianter_yaml_to_mux.mux.MuxPlugin`
  and the only thing it implements is the argument parsing
  to get some input and a custom ``yaml``
  parser (which is also capable of parsing ``json``).
  The YAML file is perfect for this task as it's easily read by
  both, humans and machines.  Let's start with an example (line
  numbers at the first columns are for documentation purposes only,
  they are not part of the multiplex file format):
       1  hw:
       2      cpu: !mux
       3          intel:
       4              cpu_CFLAGS: '-march=core2'
       5          amd:
       6              cpu_CFLAGS: '-march=athlon64'
       7          arm:
       8              cpu_CFLAGS: '-mabi=apcs-gnu -march=armv8-a -mtune=arm8'
       9      disk: !mux
      10          scsi:
      11              disk_type: 'scsi'
      12          virtio:
      13              disk_type: 'virtio'
      14  distro: !mux
      15      fedora:
      16          init: 'systemd'
      17      mint:
      18          init: 'systemv'
      19  env: !mux
      20      debug:
      21          opt_CFLAGS: '-O0 -g'
      22      prod:
      23          opt_CFLAGS: '-O2'
     Python library were reported and Avocado always fails with
     ``unacceptable character #x0000: control characters are not
     allowed``. To workaround this issue you need to either update
     the PyYaml to the version which works properly, or you need
     to remove the ``python2.7/site-packages/yaml/cyaml.py`` or
     disable CYaml import in Avocado sources. For details check
     out the `Github issue <https://github.com/avocado-framework/avocado/issues/1190>`_
  There are couple of ``key=>value`` pairs (lines 4,6,8,11,13,...) and there are
  named nodes which define scope (lines 1,2,3,5,7,9,...). There are also additional
  flags (lines 2, 9, 14, 19) which modifies the behavior.


pkgId: 65901928588f554f0dce372fbc04bc178a61a89cdfaac7c7551ca480e72b33f5
name: python-avp-stream
arch: src
version: 1.0
epoch: 0
release: 1
url: https://pypi.org/project/avp-stream/
rpm_license: UNKNOWN
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-avp-stream-1.0-1.src.rpm
checksum_type: sha256
summary:
  This python package streams diverse tracking data available from AVP to any devices that can communicate with gRPC.


pkgId: a3efd2d0e0da4598c0b1aa2d2aa8a1c66f84340b3663bd63a662f614a18497d7
name: python-avplib
arch: src
version: 1.5.0.post1
epoch: 0
release: 1
summary: AVP - ASCII Video Player. Allows you to play any video as ASCII-art.
url: https://github.com/romanin-rf/avplib
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-avplib-1.5.0.post1-1.src.rpm
checksum_type: sha256
description:
  **AVP** - ASCII Video Player. Plays, converts any video to ASCII video that can be played in terminale.


  - Can play any ASCII video in the terminal.
  - Can convert an ASCII video file and play it back.
  - Can select a black and white gradation palette (in ASCII).


  ```
  python -m pip install --upgrade avplib
  ```


  ```
  python -m avplib [OPTIONS] COMMAND [ARGS]...

  Options:
    --help  Show this message and exit.

  Commands:
    cav      Play video files (*.mp4/*.avi/...)
    convert  Convert Video Files to ASCII Video File.
    play     Play ASCII Video.
  ```


  <details>
    <summary> 🎬 Bad Apple </summary>
    ![EXAMPLE-1](https://user-images.githubusercontent.com/60302782/233639445-20c039e2-6ab7-48ac-8f5b-96e0317065c8.webm)
  </details>


pkgId: 242e7ec538e6e16cc00bc4f914f82b13c2e41214bba3a6406a34a16209a82271
name: python-avro
arch: src
version: 1.12.0
epoch: 0
release: 1
summary: Avro is a serialization and RPC framework.
url: https://avro.apache.org/
rpm_license: Apache License 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-avro-1.12.0-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/main/LICENSE.txt) and [NOTICE.txt](https://github.com/apache/avro/blob/main/NOTICE.txt) in the source code repository. Those files are also included with the installed package.


pkgId: 25476aadc7bea617569f0275600cb8562f7967dde3c30b727b6b44338af7cf99
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_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/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: 71e3b1bd9df9a4f7ac8f815e79a3e87417f5d63b4ca096cd0f87cf80507902f4
name: python-avro-gen3
arch: src
version: 0.7.16
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_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-avro-gen3-0.7.16-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: 5568051a6568aa567f302dc28b58f0d3a10e647c889ff752c682cca4e04f4254
name: python-avro-json-serializer
arch: src
version: 1.0.4
epoch: 0
release: 1
summary: Avro Json Serializer
url: https://pypi.org/project/avro-json-serializer/
rpm_license: Apache 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-avro-json-serializer-1.0.4-1.src.rpm
checksum_type: sha256
description:
  [![PyPI version](https://badge.fury.io/py/avro_json_serializer.png)](http://badge.fury.io/py/avro_json_serializer)
  [AvroJsonSerializer](avro_json_serializer/__init__.py#L28) serializes data into a JSON format using AVRO schema.
  Why do we need serializer instead of just dumping into JSON?
  * validation that your data matches the schema
  * serialization of unions (see [SimpleExample](#simple-example) below)
  * some Avro JSON deserializers expect fields in JSON in the same order as in the schema
  * serialization of `bytes` and `fixed` fields
  Binary distribution can be found on [pypi](https://pypi.python.org/pypi/avro_json_serializer/).

  ```python
  schema_dict = {
      "namespace": "example.avro",
            "type": "record",
            "name": "User",
            "fields": [
                {"name": "name", "type": "string"},
                {"name": "favorite_number",  "type": ["int", "null"]},
                {"name": "favorite_color", "type": ["string", "null"]}
            ]
  }
  avro_schema = avro.schema.make_avsc_object(schema_dict, avro.schema.Names())
  serializer = AvroJsonSerializer(avro_schema)
  self.assertEquals(serializer.to_json({"name": "Alyssa", "favorite_number": 256}),
                    """{"name":"Alyssa","favorite_number":{"int":256},"favorite_color":null}""")
  self.assertEquals(serializer.to_json({"name": "Ben", "favorite_number": 7, "favorite_color": "red"}),
                    """{"name":"Ben","favorite_number":{"int":7},"favorite_color":{"string":"red"}}""")
  self.assertEquals(serializer.to_json({"name": "Lion"}),
                    """{"name":"Lion","favorite_number":null,"favorite_color":null}""")
  ```

  ```python

  data = {
      "ffloat": 1.0,
      "funion_null": None,
      "flong": 1L,
      "fdouble": 2.0,
      "ffixed": "1234567890123456",
      "fint": 1,
      "fstring": "hi there",
      "frec": {
          "subfint": 2
      }
  }

  schema_dict = {
      "fields": [{"name": "fint", "type": "int"},
              {"name": "flong", "type": "long"},
              {"name": "fstring", "type": "string"},
              {"name": "ffixed",
               "size": 16,
               "type": {"name": "fixed_16", "size": 16, "type": "fixed"}},
              {"name": "frec",
               "type": {"fields": [{"name": "subfint", "type": "int"}],
                        "name": "Rec",
                        "type": "record"}},
              {"name": "funion_null", "type": ["int", "null"]},
              {"name": "ffloat", "type": "float"},
              {"name": "fdouble", "type": "double"}],
      "name": "all_field",
      "namespace": "com.some.thing",
      "type": "record"
  }
  avro_schema = avro.schema.make_avsc_object(schema_dict, avro.schema.Names())
  serializer = AvroJsonSerializer(avro_schema)
  json_str = serializer.to_json(data)
  print json_str
  > {"fint":1,"flong":1,"fstring":"hi there","ffixed":"1234567890123456","frec":{"subfint":2},"funion_null":null,"ffloat":1.0,"fdouble":2.0}
  ```
  See [tests](avro_json_serializer/test/test_avro_json_serializer.py) for more examples.

  ```bash
  python-avro-json-serializer$ virtualenv venv
  python-avro-json-serializer$ source venv/bin/activate
  (venv)python-avro-json-serializer$ pip install tox
  (venv)python-avro-json-serializer$ tox
  GLOB sdist-make: /Users/bngo/python-avro-json-serializer/setup.py
  py27 create: /Users/bngo/python-avro-json-serializer/.tox/py27
  py27 installdeps: nose, -rrequirements.txt
  py27 inst: /Users/bngo/python-avro-json-serializer/.tox/dist/avro_json_serializer-0.4.1.zip
  py27 installed: avro==1.7.6,avro-json-serializer==0.4.1,nose==1.3.7,simplejson==3.8.2,six==1.10.0
  py27 runtests: PYTHONHASHSEED='107331485'


pkgId: eee5eb869d547f481ada0d999d5c896a9a3bfcb77d7d5b84738e1fe88826657b
name: python-avro-models
arch: src
version: 1.0.1
epoch: 0
release: 1
summary: Object-relational mapping for AVRO schema
url: https://github.com/kun-fang/avro-data-model
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-avro-models-1.0.1-1.src.rpm
checksum_type: sha256
description:
  [Apache Avro](http://avro.apache.org/) is a data serialization framework. It is used in data serialization (especially in Hadoop ecosystem) and RPC protocols. It has libraries to support many languages. The library supports code generation with static languages like Java, while for dynamic languages for example python, code generation is not necessary.
  When avro data is deserialized in Python environment, it was stored as a dictionary in memory. As a dictionary, it looses all the interesting features provided by the avro schema. For example, you can modify an integer field with a string without getting any errors. As a dictionary, it also doesn't provide any nice features from a normal class, for example, if an avro schema has `firstName` and `lastName` fields, it is not easy to define a `fullName` function to generate the full name.

  In stream processing and RPC protocols, strict data types are required to make sure the system runs correctly. In Python, avro data is converted to a dictionary, which doesn't guarantee types and also doesn't provide a custom class hierarchy. I am looking to develop a way so that a class can be build on top of an avro schema, so that it can keep correct data type and also has a class structure.
  My solution is similar to what [SQLAlchemy ORM](https://www.sqlalchemy.org) does. You need to manually create classes corresponding to avro schemas. However, fields of the avro schemas are all extracted from `avsc` file instead of being manually defined like SQLAlchemy. The classes allow defining methods to introduce new properties or new validations. Please check the following examples for how to use the library.
  The purpose of the library is to bridge the gap between dynamical typed python and the use cases that requires strong types. This library should be restricted to places where static types are required. Otherwise, you will loose all the happiness playing with Python if applying this library everywhere.


  **User.avsc**
  ```
  {
    "type": "record",
    "name": "User",
    "fields": [
      {
        "name": "lastName",
        "type": "string"
      },
      {
        "name": "firstName",
        "type": "string"
      }
    ]
  }
  ```
  The following code defined a User class associated with the schema
  ```
  @avro_schema(AvroDataNames(default_namespace="example.avro"), schema_file="User.avsc")
  class User(object):
    def fullname(self):
      return "{} {}".format(self.firstName, self.lastName)
  ```
  With this class definition, the full name can be obtained with the function call.
  ```
  user = User({"firstName": "Alyssa", "lastName": "Yssa"})
  print(user.fullname())

  ```

  In some use cases, some extra validations are required, for example:
  **Date.avsc**
  ```
  {
    "name": "Date",
    "type": "record",
    "fields": [
      {
        "name": "year",
        "type": "int"
      },
      {
        "name": "month",
        "type": "int"
      },
      {
        "name": "day",
        "type": "int"
      }
    ]
  }
  ```
  The `month` and `day` of a date cannot be arbitrary integers. A extra validation can be done as following:
  ```
  @avro_schema(AvroDataNames(default_namespace="example.avro"), schema_file="Date.avsc")
  class Date(object):
    def __init__(self, value):
      if isinstance(value, datetime.date):
        value = {
            'year': value.year,
            'month': value.month,
            'day': value.day
        }
      super().__init__(value)
    def date(self):
      return datetime.date(self.year, self.month, self.day)
    def validate(self, data):
      return super().validate(data) \
          and datetime.date(data['year'], data['month'], data['day'])
  ```
  The `Date` class can validate the input before assign it to then underlying avro schema
  ```
  date = Date({"year": 2018, "month": 12, "date": 99})

  date = Date(datetime.date(2018, 12, 12))

  ```

  Sometimes an avro schema is defined in another schema
  **Employee.avsc**
  ```
  {
    "type": "record",
    "name": "Employee",
    "namespace": "com.test",
    "fields": [
      {
        "name": "id"
        "type": "string"
      },
      {
        "name": "name",
        "type": {
          "type": "record",
          "name": "Name",
          "namespace": "com.test",
          "fields": [
            {
              "name": "lastName",
              "type": "string"
            },
            {
              "name": "firstName",
              "type": "string"
            }
          ]
        }
      }
    ]
  }
  ```
  The schema `com.test.Name` is defined in `com.test.Employee`. There is no `Name.avsc`, but you can still define a class for it the schema:
  ```

  @avro_schema(
      EXAMPLE_NAMES,
      schema_file=os.path.join(DIRNAME, "Employee.avsc"))
  class Employee(object):
      pass

  @avro_schema(EXAMPLE_NAMES, full_name="com.test.Name")
  class Name(object):
      pass
  name = Name({{"firstName": "Alyssa", "lastName": "Yssa"})
  print(name)

  ```

  After cloning/forking the repo, navigate to the directory and run
  ```
  source init.sh
  ```
  The python environment should be ready for you.

  * **Kun Fang** - (https://github.com/kun-fang)
  See also the list of [contributors](https://github.com/your/project/contributors) who participated in this project.

  This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details


pkgId: 8064076fa5a440ee9f6010ca1fad2065a0eb3ad432e0ace9b6f5f6031ff73c3c
name: python-avro-preprocessor
arch: src
version: 0.5.1
epoch: 0
release: 1
summary: A preprocessor for Avro Schemata
url: https://gitlab.com/Jaumo/avro-preprocessor
rpm_license: Apache2
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-avro-preprocessor-0.5.1-1.src.rpm
checksum_type: sha256
description:
  This Python project provides a preprocessor for Avro resources.

  The preprocessor is made up of a list of modules.
  Each module, in the specified order, performs an operation over the entire list of Avro resources.

  The input is a directory tree (namespace-like) in which each file is either a `domain_message`s or a `type`.

  The output is another directory tree, with the same structure as input, in which Avro resources
  underwent the list of preprocessing operations.

  Input Avro resources (`domain_message` or `type`) have `exavsc` as file extension.
  NEW: they can also be `yaml` files with the same Avro extensions as `exavsc`!
  You can even mix `exavsc` and `yaml` files if passed `-ie exavsc,yexavsc`.
  Output Avro resources have `avsc` as file extension.



  Two different kinds of data structures are used in this project: *domain messages* and *types*.



  Domain messages are Avro schemas that can be sent over a Kafka topic.
  In general, multiple messages can be associated to each Kafka topic.
  Domain messages are placed in

  `schema/com/example/message_schema/domain/<domain_context>/<record_name>`



  Types are reusable structures that can be referenced in a domain message.
  They are placed in

  `schema/com/example/message_schema/type/<typename>`

  Domain messages *cannot* be reused (i.e. referenced by other domain messages).



  - Directory structure must match the namespaces used inside the message / type definitions
  - Records are defined in camel case
  - Properties are defined in snake case



  Each directory `<domain_context>` under `schema/com/example/message_schema/domain/`
  represents a Kafka topic. All schemas under a specific topic directory (and only them)
  will be available to be sent on the corresponding Kafka topic, i.e. they will be registered
  on the schema registry.

  For subject naming we follow the guidelines defined by Confluent to
  [put several event types in the same Kafka topic](
  https://www.confluent.io/blog/put-several-event-types-kafka-topic/);
  in particular we use the strategy
  `io.confluent.kafka.serializers.subject.TopicRecordNameStrategy`.

  This behaviour is defined in `avro_naming.py`.


  ```
  domain.<domain_context>
  ```


  ```
  domain.<domain_context>-<fully_qualified_record_name>
  ```


  For schema directory:
  ```
  schema/com/example/message_schema/domain/user/
  ```

  Topic name:
  ```
  domain.user
  ```

  List of Avro subjects names:
  ```
  domain.user-com.example.message_schema.domain.user.UserCreated
  domain.user-com.example.message_schema.domain.user.UserUpdated
  domain.user-com.example.message_schema.domain.user.UserDeleted
  ```




  The following modules should be applied in the order shown as follows.
  However, they are all optional.

  - `DocumentationCondenser`: JSON strings don't support multi lines inside an editor. This makes
  it inconvenient to write long documentation for some fields. This module adds support for
  lists as `doc` field in Avro schemas (they will be joined in the output).
  - `NamespaceChecker`: Checks if a resource namespace corresponds to the directory tree structure.
  - `DocumentationChecker`: Checks if the documentation corresponds to specific rules:
      1. (sub) schemas with a "name" property MUST have a "doc" property.
      2. (sub) schemas without a "name" property MUST NOT have a "doc" property.
      3. If two (sub) schemas have the same "doc", they must be identical.
  - `DefaultValueNullChecker`: Makes sure no default values other than null are used.
  - `NamespaceChecker`: Checks if a resource namespace corresponds to the directory tree structure.
  properties in `snake_case`.
  - `AvroOrderChecker`: Check if the input schemas are sorted according to a fixed order
  (see `avro_sorter.py`). Fails if they are not.
  - `MetadataAdder`: Adds the `Metadata` `type` (specified as argument on the command line) as first
  field of every domain schema. Use the `--metadata-exclude` option to exclude a comma-separated list
  of namespaces.
  - `SchemaDependenciesChecker`: Calculates all resources dependencies and assert no cycles are present.
  - `NullableOptionalExpander`: Allows for a compact definition of `nullable_optionals`
  for "partial entity updates", see its specific section below.
  - `LogicalTypeChecker`: Checks for correct usage of logicalType property.
  - `ReferencesExpander`: While Apache's `avro-tools` is able to deal with references to other
  resources in different files, Confluent's schema registry can only take one JSON as input, for
  each schema. Therefore, references to `type`s in a `domain_message` have to be expanded.
  But with a caveat:
  only the first reference ("depth-first", NOT "breadth-first"!) *must* be expanded. All subsequent
  references *must not* be expanded, i.e. they have to remain references.
  - `AvroSorter`: For the sake of readability and clearness, JSON fields of Avro resources are
  rearranged according to a fixed order (see `avro_sorter.py`).
  - `KeysGenerator`: Generates Avro Schemas for Kafka Keys automatically for every topic based
  on the `partition-field` property of schema fields.
  - `SchemaMappingGenerator`: Outputs a JSON map `fully qualified schema -> kafka topic` to the file
  `schema-mapping.json`. It also gathers the field names having custom property
  `partition-field` and writes them in `schema-mapping.json`. This is done so that Kafka producers
  know which set of fields to hash to decide which kafka partition to send a message to.
  This module also checks that partition keys are consistent within a given Kafka topic.
  Furthermore, gathers the field names of `logicalType == user-id-fields` and stores them in
  `schema-mapping.json`. These are meant to be those fields related to users so that they
  can be indexed separately (e.g. for GDPR.)
  - `DeprecationMappingGenerator`: Outputs a JSON map with info about deprecated schemas/fields to the file
  `deprecation-mapping.json`. This is later used for code generation. Also removes "deprecated" and
  "deprecated-symbols" properties from the final schemas.
  - `JavaClassesCreator`: Creates Java classes using Apache's `avro-tools`. It is also a very
  convenient way to check correctness of Avro resources.
  - `SchemaRegistryChecker`: Check if a schema is compatible with the latest version of the
  same schema in the Schema registry.
  - `SchemaRegistrar`: Register an Avro resources (both `domain_message`s AND `type`s!)
  for the appropriate
  Kafka topic in the schema registry. `type`s are registered for a dummy topic so that we can
  check compatibility for them as well (it would not be possible otherwise).
  See the documentation in `schema_registrar.py` for further documentation of `subject`
  naming and topics.
  Autogenerated keys or the generic key for all schemas (`-k` option from the command line) are
  registered as well.



  ```bash
  pip install avro-preprocessor
  ```



  Download Avro tools JAR
  ```bash
  sh download_avro-tools.sh
  ```

  For help:
  ```bash
  avropreprocessor.py -h
  ```

  It is possible to define the `key_subject_name_strategy` with the `-ksns` switch.
  Possible values are`RecordNameStrategy` and `TopicRecordNameStrategy` (default).
  Only relevant if the `SchemaRegistryChecker` and/or `SchemaRegistrar` modules are active as well.

  All modules usage
  ```bash
  avropreprocessor.py -i schema/ -o extended-schema/ -v -s 'http://localhost:8081' -t com.jaumo.message_schema.type -d com.jaumo.message_schema.type.Metadata -p schema-mapping.json -ie 'exavsc' -a ./avro-tools-1.9.0.jar
  ```

  No java classes, no schema registry
  ```bash
  avropreprocessor.py -i schema/ -o build/schema/ -v -s 'http://localhost:8081' -t com.jaumo.message_schema.type -d com.jaumo.message_schema.type.Metadata -p build/schema-mapping.json -m DocumentationCondenser NamespaceChecker DocumentationChecker DefaultValueNullChecker NamesChecker AvroOrderChecker MetadataAdder SchemaDependenciesChecker NullableOptionalExpander ReferencesExpander AvroSorter SchemaMappingGenerator DeprecationMappingGenerator SchemaRegistryChecker
  ```

  Only register to the schema registry
  ```bash
  avropreprocessor.py -i build/schema/ -o /tmp/ -v -s 'http://localhost:8081' -t com.jaumo.message_schema.type -ie 'avsc' -m SchemaRegistryChecker SchemaRegistrar
  ```

  Reorder the *input* schemas according to the order defined in `sort_avro.py`
  ```bash
  avropreprocessor.py -i schema/ -o schema/ -v -t com.jaumo.message_schema.type -ie 'exavsc' -oe 'exavsc' -m AvroSorter
  ```

  Convert input schemas from `exavsc` to `yaml`
  ```bash
  avropreprocessor.py -i schema/ -o schema_yaml/ -v -t com.jaumo.message_schema.type -ie 'exavsc' -oe 'yexavsc' -if 'json' -of 'yaml' -m DocumentationCondenser
  ```

  Then use the yaml schemas as input
  ```bash
  avropreprocessor.py -i schema_yaml/ -o build/schema/ -ie 'yexavsc' -if 'yaml' ...
  ```



  As `protobuf`, `avro` does not distinguish between these two cases,
  unless some sort of wrapper is used.
  The simple solution is to send the entire content of an event every time
  (i.e. always complete updates, never partial updates).

  However, since partial updates can still be useful, the module `NullableOptionalExpander` automatises
  the following process. Let's consider a simple Avro schema for user updates:

  ```json
  {
      "namespace": "com.jaumo",
      "type": "record",
      "name": "UserUpdate",
      "doc": "Update user event",
      "fields": [
          {
              "name": "id",
              "doc": "The id",
              "type": "int"
          },
          {
              "name": "name",
              "doc": "The name of the user",
              "type": "string"
          },
          {
              "name": "age",
              "doc": "The age of the user",
              "type": "int"
          },
          {
              "name": "email",
              "doc": "The email of the user",
              "type": "string"
          }
      ]
  }
  ```

  This schema does not support `null` values at all. In `avro`, they can be supported as follows:

  ```json
  {
      "namespace": "com.jaumo",
      "type": "record",
      "name": "UserUpdate",
      "doc": "Update user event",
      "fields": [
          {
              "name": "id",
              "doc": "The id",
              "type": "int"
          },
          {
              "name": "name",
              "doc": "The name of the user",
              "type": ["null", "string"],
              "default": null
          },
          {
              "name": "age",
              "doc": "The age of the user",
              "type": ["null", "int"],
              "default": null
          },
          {
              "name": "email",
              "doc": "The email of the user",
              "type": ["null", "string"],
              "default": null
          }
      ]
  }
  ```

  With the schema above, both `set-as-null` and `null-because-not-present` are just null,
  so they are still ambiguous. To distinguish them, we can wrap around a record type
  (which in Java will be a specific class). Showing the `email` property only, this would be

  ```json
  {
      "name": "email",
      "doc": "The email of the user",
      "default": null,
      "type": [
          "null",
          {
              "name": "OptionalString",
              "type": "record",
              "fields": [
                  {
                      "name": "value",
                      "default": null,
                      "type": [
                          "null",
                          "string"
                      ]
                  }
              ]
          }
      ]
  }
  ```

  Note how the name of the wrapper record (`"OptionalString"`, above)
  comes from the prefix `Optional` and the capitalised version of the Avro type field (`string`).
  The name of the inner property is always `"value"` (this is done automatically, see below).

  Now we have three cases
  - `email` set to null means `null-because-not-present`
  - `email.value` set to null means `set-as-null`
  - `email.value` set to string

  Since there's a lot of boilerplate and thus this is error-prone, the `nullable_optional`
  is simple extension to the Avro syntax that adds the property `"nullable_optional": true`.
  If a field has this property set to
  `true`, the field is expanded with its wrapper. The schema above then becomes:

  ```json
  {
      "name": "email",
      "doc": "The email of the user",
      "nullable_optional": true,
      "type": "string"
  }
  ```

  and it is saved to a `.exavsc` file.

  Note how this step is completely **language independent**: its output is a
  completely standard Avro schema that can be used by any library or framework.


pkgId: 088d8e84a5b99d2e9835644353fbc9df434c11183a805788326510c017e2c090
name: python-avro-py
arch: src
version: 2024.10.26
epoch: 0
release: 1
summary: A modern Pythonic implementation of Avro Phonetic.
url: https://pypi.org/project/avro-py
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-avro-py-2024.10.26-1.src.rpm
checksum_type: sha256
description:
  **Additional Developer Notes**
  In short, avro.py doesn't depend on any third-party libraries. However, if you'd like to contribute to the project, you'll need a handful of such useful tools.
  **Poetry** has been used to manage the project's dependencies and virtual environment. You can install it by following [the instructions here](https://python-poetry.org/docs/). The dependencies have been configured using the `pyproject.toml` file and doesn't require manual installation. Simply set up your developer environment using the following commands: <br>
  ```sh

  $ python3 -m venv venv && source venv/bin/activate

  $ make install  # same as `poetry install --sync --no-interaction`

  $ poetry update
  ```
  Later, you can run the tests provided with the project using the following command. This option has already been configured in the "Testing" panel if you're using Visual Studio Code as your primary IDE.
  ```sh

  $ make test  # same as `poetry run pytest .`

  $ make build  # same as `poetry build --verbose --no-interaction`
  ```
  <br>


pkgId: c9768da9a2ef48d45493c0d255c7adb911b1a71c85ae6032e6ab42c2e1e61aa1
name: python-avro-py
arch: src
version: 2024.10.30
epoch: 0
release: 1
summary: A modern Pythonic implementation of Avro Phonetic.
url: https://pypi.org/project/avro-py
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-avro-py-2024.10.30-1.src.rpm
checksum_type: sha256
description:
  **Additional Developer Notes**
  This project is based on the [uv](https://github.com/astral-sh/uv) package manager by Astral. In order to automatically update and set up the environment, you can run the following command:
  ```sh

  $ uv python install && uv venv
  $ source .venv/bin/activate

  $ uv sync --all-extras --dev

  $ uv build --verbose
  ```
  In order to run the tests, you can use the following command:
  ```sh

  $ uv run pytest .
  ```
  <br>

rpm_license:
  MIT License  Copyright (c) 2022-present HitBlast  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


pkgId: 14fdf318c074ee9522ec9132c0fb5a7ec74dcc8fc405e80cc808d81fcd7af199
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_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/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: 83093f110776fa0a75ae30673694aac1cc04ff235294f1793fb9e1dfbbf835a4
name: python-avro-to-python
arch: src
version: 0.3.3
epoch: 0
release: 1
url: https://github.com/srserves85/avro-to-python
rpm_license: MIT license
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-avro-to-python-0.3.3-1.src.rpm
checksum_type: sha256
summary:
  avro-to-python is a light tool for compiling avro schema files (.avsc) to python classes making using avro schemata easy.


pkgId: 7f58127431f3aa3e9b3992aa0603d3e3bf79ef07c6267f00e53822419186aebc
name: python-avro-validator
arch: src
version: 1.2.1
epoch: 0
release: 1
summary: Pure python avro schema validator
url: https://github.com/leocalm/avro_validator
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-avro-validator-1.2.1-1.src.rpm
checksum_type: sha256
description:
  [![CI](https://github.com/leocalm/avro_validator/actions/workflows/ci.yaml/badge.svg)](https://github.com/leocalm/avro_validator/actions/workflows/ci.yaml)
  [![Documentation Status](https://readthedocs.org/projects/avro-validator/badge/?version=latest)](https://avro-validator.readthedocs.io/en/latest/?badge=latest)
  [![PyPI version](https://badge.fury.io/py/avro-validator.svg)](https://badge.fury.io/py/avro-validator)
  [![Downloads](https://pepy.tech/badge/avro-validator)](https://pepy.tech/project/avro-validator)
  [![Coverage Status](https://coveralls.io/repos/github/leocalm/avro_validator/badge.svg?branch=main)](https://coveralls.io/github/leocalm/avro_validator?branch=main)


  A pure python avro schema validator.

  The default avro library for Python provide validation of data against the schema, the problem is that the output of
  this validation doesn't provide information about the error.
  All you get is the `the datum is not an example of the schema` error message.

  When working with bigger avro schemas, sometimes is not easy to visually find the field that has an issue.

  This library provide clearer exceptions when validating data against the avro schema, in order to be easier to
  identify the field that is not compliant with the schema and the problem with that field.


  Install using pip:
  ```bash
  $ pip install -U avro_validator
  ```


  The validator can be used as a console application. It receives a schema file, and a data file, validating the data
  and returning the error message in case of failure.

  The avro_validator can also be used as a library in python code.


  In order to validate the `data_to_validate.json` file against the `schema.avsc` using the `avro_validator` callable, just type:
  ```bash
  $ avro_validator schema.avsc data_to_valdate.json
  OK
  ```
  Since the data is valid according to the schema, the return message is `OK`.


  If the data is not valid, the program returns an error message:
  ```bash
  $ avro_validator schema.avsc data_to_valdate.json
  Error validating value for field [data,my_boolean_value]: The value [123] is not from one of the following types: [[NullType, BooleanType]]
  ```
  This message indicates that the field `my_boolean_value` inside the `data` dictionary has value `123`, which is not
  compatible with the `bool` type.


  It is possible to get information about usage of the `avro_validator` using the help:
  ```bash
  $ avro_validator -h
  ```



  When using the avr_validator as a library, it is possible to pass the schema as a file:
  ```python
  from avro_validator.schema import Schema

  schema_file = 'schema.avsc'

  schema = Schema(schema_file)
  parsed_schema = schema.parse()

  data_to_validate = {
      'name': 'My Name'
  }

  parsed_schema.validate(data_to_validate)
  ```
  In this example, if the `data_to_validate` is valid according to the schema, then the
   `parsed_schema.validate(data_to_validate)` call will return `True`.


  It is also possible to provide the schema as a json string:
  ```python
  import json
  from avro_validator.schema import Schema

  schema = json.dumps({
      'name': 'test schema',
      'type': 'record',
      'doc': 'schema for testing avro_validator',
      'fields': [
          {
              'name': 'name',
              'type': 'string'
          }
      ]
  })

  schema = Schema(schema)
  parsed_schema = schema.parse()

  data_to_validate = {
      'name': 'My Name'
  }

  parsed_schema.validate(data_to_validate)
  ```
  In this example, the `parsed_schema.validate(data_to_validate)` call will return `True`, since the data is valid according to the schema.


  If the data is not valid, the `parsed_schema.validate` will raise a `ValueError`, with the message containing the error description.
  ```python
  import json
  from avro_validator.schema import Schema

  schema = json.dumps({
      'name': 'test schema',
      'type': 'record',
      'doc': 'schema for testing avro_validator',
      'fields': [
          {
              'name': 'name',
              'type': 'string',
              'doc': 'Field that stores the name'
          }
      ]
  })

  schema = Schema(schema)
  parsed_schema = schema.parse()

  data_to_validate = {
      'my_name': 'My Name'
  }

  parsed_schema.validate(data_to_validate)
  ```
  The schema defined expects only one field, named `name`, but the data contains only the field `name_2`,
  making it invalid according to the schema. In this case, the `validate` method will return the following error:
  ```
  Traceback (most recent call last):
    File "/Users/leonardo.almeida/.pyenv/versions/avro_validator_venv/lib/python3.7/site-packages/IPython/core/interactiveshell.py", line 3326, in run_code
      exec(code_obj, self.user_global_ns, self.user_ns)
    File "<ipython-input-3-a5e8ce95d21c>", line 23, in <module>
      parsed_schema.validate(data_to_validate)
    File "/opt/dwh/avro_validator/avro_validator/avro_types.py", line 563, in validate
      raise ValueError(f'The fields from value [{value}] differs from the fields '
  ValueError: The fields from value [{'my_name': 'My Name'}] differs from the fields of the record type [{'name': RecordTypeField <name: name, type: StringType, doc: Field that stores the name, default: None, order: None, aliases: None>}]
  ```
  The message detailed enough to enable the developer to pinpoint the error in the data.


  If the schema is not valid according to avro specifications, the `parse` method will also return a `ValueError`.
  ```python
  import json
  from avro_validator.schema import Schema

  schema = json.dumps({
      'name': 'test schema',
      'type': 'record',
      'doc': 'schema for testing avro_validator',
      'fields': [
          {
              'name': 'name',
              'type': 'invalid_type',
              'doc': 'Field that stores the name'
          }
      ]
  })

  schema = Schema(schema)
  parsed_schema = schema.parse()
  ```
  Since the schema tries to define the `name` field as `invalid_type`, the schema declaration is invalid,
  thus the following exception will be raised:
  ```
  Traceback (most recent call last):
    File "/Users/leonardo.almeida/.pyenv/versions/avro_validator_venv/lib/python3.7/site-packages/IPython/core/interactiveshell.py", line 3326, in run_code
      exec(code_obj, self.user_global_ns, self.user_ns)
    File "<ipython-input-2-7f3f77000f08>", line 18, in <module>
      parsed_schema = schema.parse()
    File "/opt/dwh/avro_validator/avro_validator/schema.py", line 28, in parse
      return RecordType.build(schema)
    File "/opt/dwh/avro_validator/avro_validator/avro_types.py", line 588, in build
      record_type.__fields = {field['name']: RecordTypeField.build(field) for field in json_repr['fields']}
    File "/opt/dwh/avro_validator/avro_validator/avro_types.py", line 588, in <dictcomp>
      record_type.__fields = {field['name']: RecordTypeField.build(field) for field in json_repr['fields']}
    File "/opt/dwh/avro_validator/avro_validator/avro_types.py", line 419, in build
      field.__type = cls.__build_field_type(json_repr)
    File "/opt/dwh/avro_validator/avro_validator/avro_types.py", line 401, in __build_field_type
      raise ValueError(f'Error parsing the field [{fields}]: {actual_error}')
  ValueError: Error parsing the field [name]: The type [invalid_type] is not recognized by Avro
  ```
  The message is clearly indicating that the the `invalid_type` is not recognized by avro.


pkgId: c78e2fc22e504ff27ffd822811737a472971b2f81a62e1a7de4a6d4e4406fe8e
name: python-avs
arch: src
version: 0.5.5
epoch: 0
release: 1
summary: Alexa Voice Service Python SDK
url: https://github.com/respeaker/avs
rpm_license: GNU General Public License v3
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-avs-0.5.5-1.src.rpm
checksum_type: sha256
description:
  [![](https://img.shields.io/pypi/v/avs.svg)](https://pypi.python.org/pypi/avs)
  [![](https://img.shields.io/travis/respeaker/avs.svg)](https://travis-ci.org/respeaker/avs)

  * Support Alexa Voice Service API v20160207
  * Support multiple audio players: gstreamer 1.0, mpv and mpg123
  * 支持[Baidu DuerOS](https://github.com/respeaker/avs/wiki/%E4%BD%BF%E7%94%A8DuerOS%E7%9A%84AVS%E5%85%BC%E5%AE%B9%E6%9C%8D%E5%8A%A1)

  1. Player
      We have 3 players (`mpv`, `mpg123` and gstreamer) to use.
      `SpeechSynthesizer` and `Alerts` prefer `mpg123` which is more responsive.
      `AudioPlayer` likes gstreamer > `mpv` > `mpg123`. Gstreamer supports more audio format and works well on raspberry pi. We can also specify the player of `AudioPlayer` using the environment variable `PLAYER`.
  2. Recorder
      2 recorders (pyaudio & `arecord`) are available. We can use environment variable `RECORDER` to specify the recorder. For example, run `RECORDER=pyaudio alexa-tap` will use pyaudio as the recorder. By default, `arecord` is used as the recorder.
  3. Keyword detector (optional)
      Use PocketSphinx or Snowboy. To use pocketsphinx, install respeaker python library and pocketsphinx.
      To use Snowboy, go to [Snowboy's Github](https://github.com/Kitt-AI/snowboy) to install it.
  >If you use raspberry pi and gstreamer, it is likely that gstreamer's default audio sink is GstOMXHdmiAudioSink. It ignores ALSA configurations and outputs audio to HDMI. If you don't want to use HDMI audio output, you should run `sudo apt remove gstreamer1.0-omx gstreamer1.0-omx-rpi`

  * For ReSpeaker Core (MT7688)
    gstreamer1.0, pyaudio and pocketsphinx and respeaker python library are already installed by default, just run `pip install avs`
  * For Debian/Ubuntu/Raspbian
        sudo apt-get install mpg123 mpv
        sudo apt-get install gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly \
        gir1.2-gstreamer-1.0 python-gi python-gst-1.0
        sudo apt-get install python-pyaudio

  1. run `alexa-audio-check` to check if recording & playing is OK. If RMS is not zero, recording is OK, if you can hear alarm, playing is OK
          $alexa-audio-check
          RMS: 41
          RMS: 43
  2. run `alexa-auth` to login Amazon, it will save authorization information to `~/.avs.json`
  3. run `alexa-tap`, then press Enter to talk with alexa
  >If you want to use a specified player, use the environment variable `PLAYER` to specify it, such as `PLAYER=mpv alexa-tap` or `PLAYER=mpg123 alexa` or `PLAYER=gstreamer alexa`


  1. install respeaker and pocketsphinx python packages
      `sudo pip install respeaker pocketsphinx  # pocketsphinx requires gcc toolchain and libpulse-dev`
  2. run `alexa`, then use "alexa" to start a conversation with alexa, for example, "alexa, what time is it"

  1. Install [Snowboy](https://github.com/Kitt-AI/snowboy)
      ```
      git clone --depth 1 https://github.com/Kitt-AI/snowboy.git snowboy_github
      cd snowboy_github
      sudo apt install libatlas-base-dev swig
      python setup.py build
      sudo pip install .
      ```
  2. Install voice-engine python library
      `sudo pip install voice-engine`
  3. run the following python script and use the keyword `alexa` to start a conversation with alexa
      ```python
      import time
      import signal
      from voice_engine.source import Source
      from voice_engine.kws import KWS
      from avs.alexa import Alexa
      import logging
      logging.basicConfig(level=logging.DEBUG)
      src = Source(rate=16000)
      kws = KWS(model='snowboy')
      alexa = Alexa()
      src.pipeline(kws, alexa)
      def on_detected(keyword):
          print('detected {}'.format(keyword))
          alexa.listen()
      kws.set_callback(on_detected)
      is_quit = []
      def signal_handler(signal, frame):
          print('Quit')
          is_quit.append(True)
      signal.signal(signal.SIGINT, signal_handler)
      src.pipeline_start()
      while not is_quit:
          time.sleep(1)
      src.pipeline_stop()
      ```

  * Speaker interface
  * Notifications interface

  If you want to use your own  client id and product id, try:
  1. [register for an Amazon Developer Account](https://github.com/alexa/alexa-avs-raspberry-pi#61---register-your-product-and-create-a-security-profile)
  2. create a file named config.json with your product_id, client_id and client_secret
          {
              "product_id": "x",
              "client_id": "y",
              "client_secret": "z"
          }
  3. run `alexa-auth -c config.json`
  4. run `alexa-tap` or `alexa`

  GNU General Public License v3

  This project is based on [nicholas-gh/python-alexa-client](https://github.com/nicholas-gh/python-alexa-client)
  This package was created with Cookiecutter_ and the [audreyr/cookiecutter-pypackage](https://github.com/audreyr/cookiecutter-pypackage) project template.


pkgId: 70b0c5b5937766d824fdab2bfaecc9347b333760b2d04a30fdc7a97bacef5467
name: python-avtdl
arch: src
version: 1.1
epoch: 0
release: 1
summary: Monitoring and automation tool for Youtube and other streaming platforms
url: https://github.com/15532th/avtdl
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-avtdl-1.1-1.src.rpm
checksum_type: sha256
description:
  Tool to monitor Youtube and some other streaming platforms for new streams and uploads and execute user-defined commands when it happens. It aims to provide a highly configurable environment for setting up automated archiving of new content with filtering and notification support. It does not try to provide downloading streams itself and instead relies on executing commonly used well-known solutions for the task, such as `yt-dlp`.

  Refer to [documentation](https://github.com/15532th/avtdl?tab=readme-ov-file#avtdl) for full list of available features and description of configuration process.



  Some of the supported features include:

  - monitoring Youtube channels using RSS feed
  - monitoring Youtube channels, individual tabs of a channel or playlists by parsing html. With authorization cookies from Youtube account it's possible to get notifications for member-only and in any other way restricted streams and uploads, as well as to monitor the entire subscriptions feed
  - monitoring Youtube channel community tab for new posts (including member-only with authorization cookies)
  - monitoring other streaming platforms, such as Twitch and Twitcasting, for events of a channel going live
  - filtering new videos and streams by channel name, presence or absense of pre-defined keywords in video title or description, picking up only upcoming streams or only member-only content, deduplication of the same stream or video url coming from multiple sources
  - sending notifications to a Discord channel and/or as a Jabber message


pkgId: 0e1b3ae471b6000c8d6851b8c652257a873aa5a44be53ff32c5b4abfc4ad53c5
name: python-avtoolbox
arch: src
version: 0.0.42
epoch: 0
release: 1
summary: Autonomy Toolkit
url: https://projects.sbel.org/autonomy-toolkit
rpm_license: BSD3
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-avtoolbox-0.0.42-1.src.rpm
checksum_type: sha256
description:
  The Autonomy Toolkit, dubbed `autonomy-toolkit`, is meant to be a simplified mechansim for quickly setting up and developing a ROS 2 based control stack. The `autonomy-toolkit` platform is under activate development by the [Simulation Based Engineering Laboratory](https://sbel.wisc.edu) at the [University of Wisconsin-Madison](https://wisc.edu).



  The `autonomy-toolkit` platform provides the following resources for expediting development of autonomous algorithms:
  1. A development workflow for writing and testing ROS 2 code
  2. A mechansim for easily generating custom images for use with the ROS 2 stack
  3. A wrapper for Docker Compose to improve user experience

  Furthermore, the [Autonomy Research Testbed](https://github.com/uwsbel/autonomy-research-testbed), which utilizes this toolbox, provides the following functionality:
  1. A parts list and instructions on how to build the physical platform
  2. A high-fidelity simulation environment built using [Chrono](https://projectchrono.org) to test autonomous algorithms

  For more information about the design considerations and purpose for this project, see the [background](https://projects.sbel.org/autonomy-toolkit/background.html) section.



  Contact the [Simulation Based Engineering Laboratory](mailto:negrut@wisc.edu) for any questions or concerns regarding the contents of this repository.



  Visit our website at [sbel.wisc.edu](https://sbel.wisc.edu)!

  <br>

  <div>
  	<img src="https://github.com/uwsbel/autonomy-toolkit/blob/master/docs/_static/SBEL-dark.png?raw=true" alt="Simulation Based Engineering Lab Logo" class="readme-img" height="100px">
  	<img src="https://github.com/uwsbel/autonomy-toolkit/blob/master/docs/_static/UWCrest.png?raw=true" alt="University of Wisconsin - Madison Crest" class="readme-img" height="100px" align="right">
  </div>


pkgId: bfc4dabdfa571169ecee5673ae21013c7df51df13ccdb911146a2f85192a05ba
name: python-avutil
arch: src
version: 1.6.3
epoch: 0
release: 1
summary: Provide some useful util functions and a poweful tool (tidyup) for tidying up your video folder
url: https://pypi.org/project/avutil/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-avutil-1.6.3-1.src.rpm
checksum_type: sha256
description:
  [![Release](https://img.shields.io/pypi/v/avutil?color=%2366CCFF&label=release)](https://pypi.org/project/avutil/)

  Provide some useful util functions (and a poweful tool `tidyup`) for *tidying up* your personal video folder.
  Data source from *LIBRARY* or *BUS*.

  - Extract designatio
  - Search folder (recursively)
  - Pull & save video info (title, actors etc.)
  - Download cover image
  - Rename video file

  ![gjf](https://github.com/Lqlsoftware/avutil/blob/main/doc/demo.gif)



      Python >= 3.4
      BeautifulSoup4 >= 4.7.0
      requests >= 2.21.0



  ```sh
  pip install avutil
  ```



  ```sh
  $ tidyup -h
  usage: tidyup [-h] [-r] [-i IN] [-o OUT] [-p PROXY] [-s SOURCE] [-t THREAD] [-e ENCODER] [--with-poster]

  Tidy up your personal video dir

  optional arguments:
    -h, --help            show this help message and exit
    -r                    search dir recursively
    -i IN, --in IN        video input dir
    -o OUT, --out OUT     video output dir
    -p PROXY, --proxy PROXY
                          http proxy address
    -s SOURCE, --source SOURCE
                          data source of video info, 'library' or 'bus'
    -t THREAD, --thread THREAD
                          threads num, use multi-threads to download info & images
    -e ENCODER, --encoder ENCODER
                          encoder of meta-data, 'nfo'(default) or 'vsmeta'
    --with-poster         save poster
  ```

  Tidy up current dir

  ```sh
  $ tidyup
  ```



  Import avutil:
  ```python
  import avutil
  ```

  Search folder recursively to find videos:
  ```python
  folder = "StudyResource"
  videos = avutil.Search_folder(folder)

  ```

  Or you can specify the extension type of video
  ```python
  videos = avutil.Search_folder(folder, media_suffix={".mp4", ".wmv", ".avi", ".mkv"})
  ```

  Pull video info from *LIBRARY* by default & download cover image
  ```python
  for designatio, file_paths in videos.items():
      video = avutil.Video(designatio, file_paths)

      
      video.pull_info()

      
      video.download_cover()
  ```

  It's okey using *BUS*
  ```python
      
      video.pull_info(source=avutil.Bus)
  ```

  Save video info as .nfo file
  ```python
      
      video.save_info()
  ```

  Tidy up!

  ```python
      
      video.rename()
  ```



  Proxy is supported in avutil in two ways, you can either pass http-proxy in code
  ```python
  video.pull_info(http_proxy="http://127.0.0.1:1087")
  video.download_cover(http_proxy="http://127.0.0.1:1087")
  ```
  Or define a global bash variable (eg. http proxy):
  ```shell
  $ export HTTP_PROXY="http://127.0.0.1:1087"
  ```


pkgId: 79faca87f19d798f70fccc1ca7a82b0f2b14a110ca8aad9a8a974122bd3e5114
name: python-aw-cli
arch: src
version: 2.0
epoch: 0
release: 1
summary: guarda anime dal terminale e molto altro!
url: https://github.com/fexh10/aw-cli
rpm_license: GPL-3.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aw-cli-2.0-1.src.rpm
checksum_type: sha256
description:
  <h3 align="center">

  Guarda anime dal terminale e molto altro!<br /> Gli anime vengono presi da <a href="https://www.animeworld.tv/">AnimeWorld</a>

  </h3>


  https://github.com/fexh10/aw-cli/assets/90156014/88e1c2e2-bb7f-4002-8784-26f70861e164



  - [aw-cli](#aw-cli)
    - [Anteprima](#anteprima)
    - [Indice](#indice)
    - [Installazione](#installazione)
    - [Problemi noti](#problemi-noti)
    - [Disinstallazione](#disinstallazione)
    - [Utilizzo](#utilizzo)
    - [Crediti](#crediti)




  Lo script funziona sia con [MPV](https://mpv.io/installation/) che con [VLC](https://www.videolan.org/vlc/index.it.html). <br />

  È richiesta l'installazione di [fzf](https://github.com/junegunn/fzf?tab=readme-ov-file#installation).<br />

  <details><summary><b>Linux, MacOS</b></summary>
  È possibile installare aw-cli da pip:

  ```
  python3 -m pip install aw-cli
  ```
  </details>

  <details><summary><b>Windows</b></summary>
  Attualmente, Windows presenta due versioni: la più recente, progettata per funzionare su WSL (Windows Subsystem for Linux), e una versione Legacy compatibile con PowerShell. La versione Legacy non riceverà ulteriori aggiornamenti, mentre l'altra sarà mantenuta costantemente.

  <br>

  <details><summary><b>Ultima Versione</b></summary>
  L'ultima versione per Windows richiede installare <a href="https://learn.microsoft.com/it-it/windows/wsl/install">WSL</a>:

  ```
  wsl --install
  ```

  Il programma dovrà essere installato e avviato da WSL:

  ```
  python3 -m pip install aw-cli
  ```

  Attenzione! Quando viene richiesto il path del player, è necessario inserirlo tramite il percorso di WSL. Ad esempio: `/mnt/c/Program\ Files/VideoLAN/VLC/vlc.exe`

  </details>
  <details><summary><b>Versione Legacy</b></summary>
  Per installare la versione Legacy, è necessario avere <a href="https://www.git-scm.com/download/win">git</a>.


  ```
  python3 -m pip install git+https://github.com/fexh10/aw-cli.git@winLegacy
  ```

  </details>
  </details>

  <details><summary><b>Android</b></summary>
  Android richiede l'installazione di <a href="https://github.com/termux/termux-app/releases/tag/v0.118.0">termux</a>. <br>

  ```
  pkg update && pkg upgrade
  pkg install python python-pip libxml2 libxslt pkg-config
  python3 -m pip install aw-cli
  ```
  </details>

  <details><summary><b>iOS</b></summary>
  La versione per iOS richiede <a href="https://apps.apple.com/it/app/ish-shell/id1436902243">iSH</a> e <a href="https://apps.apple.com/it/app/vlc-media-player/id650377962">VLC</a>.

  ```
  apk update
  apk upgrade
  apk add python3 python3-dev py3-pip gcc musl-dev git
  python3 -m pip install git+https://github.com/fexh10/aw-cli.git@iosCompatibility
  ```
  Nota che la velocità di download e caricamento molto bassa è un problema di iSH e non di aw-cli.
  </details>


  Se è impossibile avviare `aw-cli`, è possibile che non si abbia la cartella degli script Python aggiunta al path. <br />

  <details> <summary><b>Linux/Windows WSL</b></summary>
  Aggiungere la seguente linea al file di profilo (.bashrc, .zshrc, o altro):

  ```
  export PATH=$PATH:$HOME/.local/bin
  ```
  Riavviare il terminale o eseguire `source ~/.bashrc`.

  </details>

  <details> <summary><b>MacOS</b></summary>
  Aggiungere la seguente linea al file di profilo (.bashrc, .zshrc, o altro):

  ```
  export PATH=$PATH:$HOME/Library/Python/3.x/bin
  ```
  Sostituire `3.x` con la propria versione di Python. <br>
  Riavviare il terminale o eseguire `source ~/.bashrc`.
  </details>

  <details> <summary><b>Windows Legacy</b></summary>
  Inserire da linea di comando:

  ```
  setx PATH "%PATH%;%APPDATA%\Local\Programs\Python\Python3x\Scripts
  ```
  Sostituire `3.x` con la propria versione di Python. <br/>
  Se necessario, riavviare il sistema.
  </details>



  ```
  python3 -m pip uninstall aw-cli
  ```


  ```
  usage: aw-cli [-h] [-v] [-c [{r}]] [-l [{a,s,d,t}]] [-i] [-s] [-d] [-o] [-p] [-u [UPDATE]] [-a]

  Guarda anime dal terminale e molto altro!

  Informazioni:
    -h, --help            mostra questo messaggio
    -v, --versione        stampa la versione del programma

  Opzioni:
    -c [{r}], --cronologia [{r}]
                          continua a guardare un anime dalla cronologia. 'r' per rimuovere un anime (opzionale)
    -l [{a,s,d,t}], --lista [{a,s,d,t}]
                          lista degli ultimi anime usciti su AnimeWorld. a = all, s = sub, d = dub, t = tendenze. Default 'a'
    -i, --info            visualizza le informazioni e la trama di un anime
    -s, --syncplay        usa syncplay per guardare un anime insieme ai tuoi amici
    -d, --download        scarica gli episodi che preferisci
    -o, --offline         apri gli episodi scaricati precedentemente direttamente dal terminale
    -p, --privato         guarda un episodio senza che si aggiorni la cronologia o AniList
    -u [UPDATE], --update [UPDATE]
                          aggiorna il programma

  Configurazione:
    -a, --configurazione  avvia il menu di configurazione
  ```


  Progetto ispirato a <a href="https://github.com/pystardust/ani-cli">ani-cli</a>.

  Un ringraziamento speciale a <a href="https://github.com/axtrat">axtrat</a> per l'aiuto nella realizzazione del progetto.


pkgId: ba2f890c04ed6e3bf51b37baa7a2e3a858afbef27c7b738929fcc45ebcdaa21a
name: python-aw-client
arch: src
version: 0.5.14
epoch: 0
release: 1
summary: Client library for ActivityWatch
url: https://activitywatch.net/
rpm_license: MPL-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aw-client-0.5.14-1.src.rpm
checksum_type: sha256
description:
  [![GitHub Actions badge](https://github.com/ActivityWatch/aw-client/workflows/Build/badge.svg)](https://github.com/ActivityWatch/aw-client/actions)
  [![PyPI](https://img.shields.io/pypi/v/aw-client)](https://pypi.org/project/aw-client/)
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
  [![Typechecking: Mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)
  Client library for ActivityWatch in Python.
  Please see [the documentation][docs] for usage, and take a look at `examples/`.
   - [Documentation][docs]
   - [API Reference][apiref]
  [docs]: https://docs.activitywatch.net/en/latest/
  [apiref]: https://docs.activitywatch.net/en/latest/api/python.html#aw-client

  Install from pip: `pip install aw-client`
  Install the latest version directly from github without cloning: `pip install git+https://github.com/ActivityWatch/aw-client.git`
  To install from a cloned version:
   - clone repo: `git clone https://github.com/ActivityWatch/aw-client.git`
   - cd into the directory: `cd aw-client`
   - run `poetry install` (will create a virtualenv, if none activated)
     - If you don't want to use poetry you can also use `pip install .`, but that might not get the exact version of the dependencies (due to not reading the `poetry.lock` file).

  For the CLI:
  ```
  $ aw-client --help
  Usage: aw-client [OPTIONS] COMMAND [ARGS]...
    CLI utility for aw-client to aid in interacting with the ActivityWatch
    server
  Options:
    --host TEXT     Address of host
    --port INTEGER  Port to use
    -v, --verbose   Verbosity
    --testing       Set to use testing ports by default
    --help          Show this message and exit.
  Commands:
    buckets    List all buckets
    canonical  Query 'canonical events' for a single host (filtered,...
    events     Query events from bucket with ID `bucket_id`
    heartbeat  Send a heartbeat to bucket with ID `bucket_id` with JSON `data`
    query      Run a query in file at `path` on the server
    report     Generate an activity report
  ```

  * Run python with `LOG_LEVEL=debug` to get additional debugging output
  * If invalid events have been queued for submission, you may need to delete the file-based queues generated by this library
  * To use the development version of this library use `aw-client = {path = "../aw-client" }` in `pyproject.toml`

  The [`examples/`](examples/) directory contains a couple of example scripts, including:
   - [`time_spent_today.py`](examples/time_spent_today.py) - fetches all non-afk events and sums their duration to get the total active time for the day.
   - [`working_hours.py`](https://github.com/ActivityWatch/aw-client/blob/master/examples/working_hours.py) - computes hours worked per day (matching a "work" category rule), and exports matching events to a JSON file (for auditing).
   - [`load_dataframe.py`](https://github.com/ActivityWatch/aw-client/blob/master/examples/load_dataframe.py) - loads events from a host using a categorizing & AFK-filtering query, put result in a pandas dataframe, and export as CSV.
   - [`merge_buckets.py`](examples/merge_buckets.py) - merges two buckets with non-intersecting events by moving all events from one into the other.
   - [`redact_sensitive.py`](examples/redact_sensitive.py) - redact sensitive events.


pkgId: 7a8366d088136b95a0ec26e9ff8656c847f08a75a347b0332b7319a2de0faabe
name: python-aw-core
arch: src
version: 0.5.17
epoch: 0
release: 1
summary: Core library for ActivityWatch
url: https://activitywatch.net/
rpm_license: MPL-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aw-core-0.5.17-1.src.rpm
checksum_type: sha256
description:
  [![GitHub Actions badge](https://github.com/ActivityWatch/aw-core/workflows/Build/badge.svg)](https://github.com/ActivityWatch/aw-core/actions)
  [![Code coverage](https://codecov.io/gh/ActivityWatch/aw-core/branch/master/graph/badge.svg)](https://codecov.io/gh/ActivityWatch/aw-core)
  [![PyPI](https://img.shields.io/pypi/v/aw-core)](https://pypi.org/project/aw-core/)
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
  [![Typechecking: Mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)
  Core library for ActivityWatch.

   - `aw_core`, contains basic datatypes and utilities, such as the `Event` class, helpers for configuration and logging, as well as schemas for buckets, events, and exports.
   - `aw_datastore`, contains the datastore classes used by aw-server-python.
   - `aw_transform`, all event-transforms used in queries.
   - `aw_query`, the query-language used by ActivityWatch.

  Run python with `LOG_LEVEL=debug` to use change the log level across all AW components

  To install the latest git version directly from github without cloning, run
  `pip install git+https://github.com/ActivityWatch/aw-core.git`
  To install from a cloned version, cd into the directory and run
  `poetry install` to install inside an virtualenv. If you want to install it
  system-wide it can be installed with `pip install .`, but that has the issue
  that it might not get the exact version of the dependencies due to not reading
  the poetry.lock file.


pkgId: 2f45a4c744ba31b8fe3ae78aa4fc71c112ef46aa5b5ae5d65f4fd3a9791c5bd2
name: python-awadb
arch: src
version: 0.3.13
epoch: 0
release: 1
url: https://github.com/awa-ai/awadb
rpm_license: Apache 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-awadb-0.3.13-1.src.rpm
checksum_type: sha256
summary:
  Local lightweight AI Native database for RAG, incluing embedding vectors and text search for LLM generation

description:
  Easily Use - No boring database schema definition. No need to pay attention to vector indexing details.

  Realtime Search - Lock free realtime index keeps new data fresh with millisecond level latency. No wait no manual operation.

  Stability - AwaDB builds upon over 4 years experience at JD.com running production workloads at scale using a system called [Vearch](https://github.com/vearch/vearch), combined with best-of-breed ideas and practices from the community.



  First install awadb:
  ```bash
  pip3 install awadb'
  ```

  Then use as below:
  ```bash
  import awadb

  awadb_client = awadb.Client()


  awadb_client.Create("test_llm1")



  awadb_client.Add([{'embedding_text':'The man is happy'}, {'source' : 'pic1'}])
  awadb_client.Add([{'embedding_text':'The man is very happy'}, {'source' : 'pic2'}])
  awadb_client.Add([{'embedding_text':'The cat is happy'}, {'source' : 'pic3'}])
  awadb_client.Add([{'embedding_text':'The man is eating'}, {'source':'pic4'}])


  query = "The man is happy"
  results = awadb_client.Search(query, 3)


  print(results)
  ```
  Here the text is embedded by SentenceTransformer which is supported by [Hugging Face](https://huggingface.co)
  More detailed python local library usage you can read [here](https://ljeagle.github.io/awadb/)


  If you are on the Windows platform or want a awadb service, you can download and deploy the awadb docker.
  The installation of awadb docker please see [here](https://github.com/awa-ai/awadb/tree/main/docs/deploy.md)

  - Python Usage

  First, Install gRPC and awadb service python client as below:

  ```bash
  pip3 install grpcio
  pip3 install awadb-client
  ```

  A simple example as below:

  ```bash

  from awadb_client import Awa


  client = Awa()


  client.add("example1", {'name':'david', 'feature':[1.3, 2.5, 1.9]})
  client.add("example1", {'name':'jim', 'feature':[1.1, 1.4, 2.3]})


  results = client.search("example1", [1.0, 2.0, 3.0])


  print(results)




  db_name: "default"
  table_name: "example1"
  results {
    total: 2
    msg: "Success"
    result_items {
      score: 0.860000074
      fields {
        name: "_id"
        value: "64ddb69d-6038-4311-9118-605686d758d9"
      }
      fields {
        name: "name"
        value: "jim"
      }
    }
    result_items {
      score: 1.55
      fields {
        name: "_id"
        value: "f9f3035b-faaf-48d4-a947-801416c005b3"
      }
      fields {
        name: "name"
        value: "david"
      }
    }
  }
  result_code: SUCCESS
  ```
  More python sdk for service is [here](https://ljeagle.github.io/awadb/)
  More detailed quick start examples you can find [here](https://github.com/awa-ai/awadb/blob/main/tests/test_awadb_client.py)

  - RESTful Usage
  ```bash

  curl -H "Content-Type: application/json" -X POST -d '{"db":"default", "table":"test", "docs":[{"_id":1, "name":"lj", "age":23 "f":[1,0]},{"_id":2, "name":"david", "age":32, "f":[1,2]}]}' http://localhost:8080/add


  curl -H "Content-Type: application/json" -X POST -d '{"db":"default", "table":"test", "vector_query":{"f":[1, 1]}}' http://localhost:8080/search
  ```
  More detailed RESTful API is [here](https://github.com/awa-ai/awadb/tree/main/docs/restful_tutorial.md)




  Any unstructured data(image/text/audio/video) can be transferred to vectors which are generally understanded by computers through AI(LLMs or other deep neural networks).

  For example, "The man is happy"-this sentence can be transferred to a 384-dimension vector(a list of numbers `[0.23, 1.98, ....]`) by SentenceTransformer language model. This process is called embedding.

  More detailed information about embeddings can be read from [OpenAI](https://platform.openai.com/docs/guides/embeddings/what-are-embeddings)

  Awadb uses [Sentence Transformers](https://huggingface.co/sentence-transformers) to embed the sentence by default, while you can also use OpenAI or other LLMs to do the embeddings according to your needs.



  Examples of combining LLaMa or quantized Alpaca with llama.cpp to do local knowledge database please see [here](./examples/llama.cpp)
  Examples of combining ChatGLM to do local knowledge database please see [here](./examples/chatglm)




  - [Issues and PR](https://github.com/awa-ai/awadb/issues)
  - [Roadmap and Contribution](https://github.com/awa-ai/awadb/blob/main/ROADMAP.md)




  [Apache 2.0](./LICENSE)




  Join the AwaDB community to share any problem, suggestion, or discussion with us:

  - [Discord](https://discord.gg/GP7QxRrDjB)
  - [Slack](https://awadbhq.slack.com)
  - [Reddit](https://www.reddit.com/r/Awadb/)


pkgId: ef99f87cee79b404a1ab2a2f525eee39ee4a837d28d6ce53b89a5060d6deec3b
name: python-awagpt
arch: src
version: 0.0.10
epoch: 0
release: 1
description:
  Install the package via pip:
  ```bash
  pip install awagpt

url: https://github.com/Awarri/awagpt
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-awagpt-0.0.10-1.src.rpm
checksum_type: sha256
summary:
  AwaGPT is a powerful Python library designed for developers to interact with advanced language and audio models. It provides a seamless way to generate text, stream responses, transcribe audio, and translate text between languages


pkgId: 82664c91b3391fa2a26d7ed4f92debf9e9ceca4d8a13834748022c72b60e580f
name: python-awaiter
arch: src
version: 0.1.2
epoch: 0
release: 1
summary: Makes your blocking functions awaitable.
url: https://github.com/nggit/awaiter
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-awaiter-0.1.2-1.src.rpm
checksum_type: sha256
description:
  [![codecov](https://codecov.io/gh/nggit/awaiter/branch/main/graph/badge.svg?token=E6GK8YQ26P)](https://codecov.io/gh/nggit/awaiter)
  [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=nggit_awaiter&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=nggit_awaiter)

  Makes your blocking functions *awaitable*.

  `awaiter.ThreadExecutor()` represents a single thread that you can use to execute blocking functions in a FIFO manner.
  It does not use a thread pool like [asyncio.to_thread()](https://docs.python.org/3/library/asyncio-task.html#asyncio.to_thread) or [loop.run_in_executor()](https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.run_in_executor), to keep it minimal and predictable.


  ```python
  import asyncio
  import time

  from awaiter import ThreadExecutor


  def blocking_function(name):
      time.sleep(1)
      return f'Hello, {name}!'

  async def main():
      async with ThreadExecutor() as executor:
          result = await executor(blocking_function)('World')
          print(result)

      

  if __name__ == '__main__':
      asyncio.run(main())
  ```

  Or use the decorator style:
  ```python
  import asyncio
  import time

  from awaiter import ThreadExecutor

  executor = ThreadExecutor()


  @executor
  def blocking_function(name):
      time.sleep(1)
      return f'Hello, {name}!'

  async def main():
      executor.start()

      result = await blocking_function('World')
      print(result)

      executor.shutdown()
      
      
      

  if __name__ == '__main__':
      asyncio.run(main())
  ```

  If you want to execute multiple tasks at once without waiting in the main thread, use `executor.submit()`:
  ```python


      fut1 = executor.submit(blocking_function, 'World')
      fut2 = executor.submit(blocking_function, 'Foo')
      fut3 = executor.submit(blocking_function, 'Bar')


  ```

  Last but not least, it also supports generator functions:
  ```python


  @executor
  def generator_function(name):
      yield 'Hello, '
      time.sleep(1)
      yield name
      yield '!'



      async for data in generator_function('World'):
          print(data)


  ```

  We provide the `awaiter.MultiThreadExecutor` helper.

  It has a thread pool-like approach and is more suitable for use as a single, persistent object:

  ```python
  executor = MultiThreadExecutor(size=10)
  ```

  How to use is the same, as the interface is identical to `awaiter.ThreadExecutor`.


  ```
  python3 -m pip install --upgrade awaiter
  ```


  MIT


pkgId: cb223db247b7eae18ec7ba2d672cc3cf0e2f088c3e9dedb3205c21c66750d146
name: python-awaits
arch: src
version: 0.0.11
epoch: 0
release: 1
summary: async + threads + decorators = ?
url: https://pypi.org/project/awaits/
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-awaits-0.0.11-1.src.rpm
checksum_type: sha256
description:
  ![logo](https://raw.githubusercontent.com/pomponchik/awaits/develop/docs/assets/logo_2.svg)

  [![Downloads](https://static.pepy.tech/badge/awaits/month)](https://pepy.tech/project/awaits)
  [![Downloads](https://static.pepy.tech/badge/awaits)](https://pepy.tech/project/awaits)
  [![codecov](https://codecov.io/gh/pomponchik/awaits/graph/badge.svg?token=A5VJ4PUED7)](https://codecov.io/gh/pomponchik/awaits)
  [![Hits-of-Code](https://hitsofcode.com/github/pomponchik/awaits?branch=main)](https://hitsofcode.com/github/pomponchik/awaits/view?branch=main)
  [![Tests](https://github.com/pomponchik/awaits/actions/workflows/tests_and_coverage.yml/badge.svg)](https://github.com/pomponchik/awaits/actions/workflows/tests_and_coverage.yml)
  [![Python versions](https://img.shields.io/pypi/pyversions/awaits.svg)](https://pypi.python.org/pypi/awaits)
  [![PyPI version](https://badge.fury.io/py/awaits.svg)](https://badge.fury.io/py/awaits)
  [![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)
  [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)

  Данная библиотека решает 3 проблемы:

  - Асинхронное программирование с использованием синтаксиса async / await теряет смысл, если в коде часто встречаются куски с "тяжелыми" вычислениями или иными задачами, которые блокируют event-loop. Зато теперь вы можете навесить на такую "тяжелую" функцию декоратор [```@awaitable```](#декоратор-awaitable) и она станет корутиной, которая будет исполняться в отдельном потоке, не блокируя event-loop. Во всем остальном это будет совершенно обычная корутина.
  - Многопоточное программирование многословно. Чтобы заставить ваш код исполняться в многопоточном режиме, вам нужно создавать объекты потоков, передавать туда нужные функции и запускать потоки. Теперь же вам достаточно навесить на обычную функцию декоратор и она автоматически будет исполняться в многопоточном режиме.
  - Частое создание потоков в программе требует постоянно отслеживать создание потоков и управление ими. Здесь же минимальным уровнем абстракции для вас становится группа потоков (pool of threads), а не какой-то отдельный поток. Ими становится удобно управлять в рамках т. н. "комнат" (rooms) с такими группами, где каждой группе присваивается имя.

  Прочитайте документацию ниже, чтобы увидеть, как все это работает.




  - [**Быстрый старт**](#быстрый-старт)
  - [**Как это все работает?**](#как-это-все-работает)
  - [**Как работает группа потоков?**](#как-работает-группа-потоков)
  - [**Что такое "комната"?**](#что-такое-комната)
  - [**Об объекте задачи**](#об-объекте-задачи)
  - [**Декоратор ```@awaitable```**](#декоратор-awaitable)
  - [**Декоратор ```@shoot```**](#декоратор-shoot)
  - [**Настройки**](#настройки)




  Установите awaits через [pip](https://pypi.org/project/awaits/):

  ```
  $ pip install awaits
  ```

  Теперь просто импортируйте декоратор [```@awaitable```](#декоратор-awaitable) и примените его к вашей функции. Никаких настроек, ничего лишнего - все уже работает:

  ```python
  import asyncio
  from awaits import awaitable


  @awaitable
  def sum(a, b):
    
    return a + b


  print(asyncio.run(sum(2, 2)))
  ```

  Готово! Мы сделали из обычной функции неблокирующую ваш event-loop корутину, к которой теперь применим синтаксис await.

  Если ваша функция ничего не возвращает, к ней можно применить другой декоратор, [```@shoot```](#декоратор-shoot):

  ```python
  from awaits import shoot


  @shoot
  def hello():
    
    print('Hello world!')


  hello()
  ```

  Ваша функция будет исполняться в другом потоке, в то время как основной может уже заняться чем-то еще.

  Более подробно о возможностях библиотеки awaits читайте ниже.




  Базовым "примитивом" библиотеки является [группа потоков](#как-работает-группа-потоков) (threads pool). "Сердцем" группы является очередь (queue) с задачами (объектами класса [```Task```](#об-объекте-задачи)). Когда вы создаете новую группу потоков, внутри себя она порождает сколько-то потоков с "воркерами", которые постоянно ждут новых задач из очереди. Как только в очереди появляется новая задача, первый же освободившийся воркер выполняет ее.

  Чтобы выполнить в группе произвольную функцию, вам достаточно передать ее туда вместе с необходимыми аргументами. При этом группа вернет вам объект класса [```Task```](#об-объекте-задачи), в котором по значению атрибута ```done``` вы можете отслеживать, выполнена ваша задача или нет. Если она выполнена - можете забрать результат из атрибута ```result```. Более подробно о работе с группами потоков читайте в [соответствующем разделе](#как-работает-группа-потоков).

  Для удобства управления несколькими группами, библиотека содержит абстракцию "комната". По своей сути это обертка вокруг словаря с группами потоков. Обращаясь к "комнате" по ключу, вы либо получаете новую группу потоков, если ранее этой группы не существовало, либо уже имеющуюся группу, если ранее она создавалась. Так вам становится не нужно вручную создавать группы потоков.

  Для работы декораторов используется "комната", хранящаяся в синглтоне. Обернутые в декораторы [```@awaitable```](#декоратор-awaitable) и [```@shoot```](#декоратор-shoot) функции будут выполняться в группах потоков из одной и той же комнаты (по умолчанию - в одной группе потоков под названием ```"base"```).

  За счет такой компоновки, весь менеджмент потоков происходит "под капотом" и вам больше не нужно задумываться над тем, в каком именно потоке выполнится ваша функция. Она выполнится в том, который раньше всех освободится.




  Группа потоков - это экземпляр класса ```ThreadsPool```. Импортируем его:

  ```python
  from awaits.pools.threads_pool import ThreadsPool
  ```

  При инициализации экземпляра будут созданы потоки. Число потоков в группе вы указываете в конструкторе класса:

  ```python
  threads = ThreadsPool(5)
  ```

  Теперь, когда группа создана, ей можно давать задания, используя метод ```do()```:

  ```python
  def function(a, b, c, d=5, e=5):
    return a + b + c + d + e

  task = threads.do(function, 1, 2, 3, d=10, e=20)
  ```

  Первым параметром туда передается функция, которую требуется выполнить, а далее все те же параметры и в том же порядке, как при оригинальном вызове этой функции.

  Что тут произошло под капотом? Метод ```do()``` создал объект класса [```Task```](#об-объекте-задачи), передав туда функцию для выполнения и все ее параметры, и положил его в очередь. Объект задачи он вам вернул, чтобы вы могли отслеживать прогресс выполнения и результат. Воркеры из других потоков постоянно ждут появления новых элементов в очереди. Если хоть один из них свободен - он сразу получит вашу задачу и выполнит ее. Если нет, задача будет ждать в очереди освобождения первого воркера.

  Как только задача будет выполнена, вы можете получить результат:

  ```python

  while not task.done:
      pass

  print(task.result)
  ```

  Если при выполнении функции случилась ошибка, в объекте задачи атрибут ```error``` будет установлен в положение ```True```, а получить экземпляр исключения вы можете из атрибута ```exception```:

  ```python
  def error_function(a, b):
    return a / b

  task = threads.do(error_function, 2, 0)

  while not task.done:
      pass

  if task.error:
    raise task.exception
  ```




  Комната (room) - это абстракция над группами потоков, позволяющая отдавать задания разным группам, называя их по именам. По сути это обертка над словарем.

  Создадим объект комнаты:

  ```python
  from awaits.threads_pools_room import ThreadsPoolsRoom


  room = ThreadsPoolsRoom(5)
  ```

  Число, передаваемое в конструктор - количество потоков в каждой из групп данной комнаты.

  Конкретную группу потоков можно получить, используя синтаксис словаря:

  ```python
  pool = room['some_key']
  ```

  Поскольку мы впервые обращаемся к комнате по этому ключу, она создаст новый объект класса [```ThreadsPool```](#как-работает-группа-потоков) и вернет его. При последующих обращениях по этому ключу, она будет возвращать тот же самый объект.




  Задача - это объект класса ```Task```. В конструктор объекта первым аргументом передается функция для выполнения, а последующими - ее аргументы:

  ```python
  from awaits.task import Task


  def hello_something(something, sign='!'):
    hello_string = f'Hello {something}{sign}'
    print(hello_string)
    return hello_string

  task = Task(hello_something, 'world')
  ```

  В неактивированном состоянии задача просто хранит в себе функцию и ее аргументы. Чтобы выполнить функцию с заданными аргументами, необходимо "вызвать" объект задачи:

  ```python
  task()
  ```

  Флаг ```task.done``` будет установлен в положение ```True```, когда задача будет выполнена. После этого вы можете получить результат выполнения из атрибута ```result```:

  ```python
  while not task.done:
      pass

  print(task.result)
  ```

  Если при выполнении функции случилась ошибка, в объекте задачи атрибут ```error``` будет установлен в положение ```True```, а получить экземпляр исключения вы можете из атрибута ```exception```:

  ```python
  def error_function(a, b):
    return a / b

  task = threads.do(error_function, 2, 0)

  while not task.done:
      pass

  if task.error:
    raise task.exception
  ```




  Прочитав документацию выше, вы уже научились создавать группы потоков и комнаты с ними, а также давать потокам на исполнение различные задания. Однако делать даже это вручную не обязательно.

  Декоратор ```@awaitable``` превращает обычную функцию в корутину, т. е. в функцию, с которой можно работать через await-синтаксис Python. Давайте попробуем создать такую функцию:

  ```python
  from awaits import awaitable


  @awaitable
  def heavy_math_function(x, y):
    return x * y
  ```

  При попытке выполнения функции, она будет вести себя как обычная корутина. Однако фактически ее код будет выполняться в группе потоков. Пока код выполняется, управление будет передано в event-loop.

  ```python

  print(asyncio.run(heavy_math_function(5, 5)))
  ```

  "Под капотом" при этом происходит периодический опрос состояния задачи с последующим "засыпанием" (вызовом ```asyncio.sleep()```) на некий промежуток времени. Как только задача выполнена, ее результат возвращается. Если выполнение прервано исключением - оно извлекается из [объекта задачи](#об-объекте-задачи) и снова поднимается.

  Промежуток, на который функция "засыпает" между опросами о готовности, по умолчанию берется из [глобальных настроек](#настройки) библиотеки. При необходимости, вы можете указать его в фабрике декоратора (в секундах):

  ```python
  @awaitable(delay=0.5)
  def heavy_math_function(x, y):
    return x * y
  ```

  Ручное управление вам может быть полезно, к примеру, в случае особо "тяжелых" функций, которые нет смысла опрашивать слишком часто.

  Кроме того, отдельным параметром вы можете указать имя группы потоков, в которой вы хотите чтобы выполнялся код. По умолчанию используется группа ```"base"```.

  ```python
  @awaitable(pool='gravities')
  def heavy_math_function(x, y):
    return x * y
  ```



  Этот декоратор проще, чем [```@awaitable```](#декоратор-awaitable). Обернутая им функция будет просто "отстрелена" в группу потоков, без ожидания результата. Возвращен при этом будет объект класса [```Task```](#об-объекте-задачи), что позволяет вручную отслеживать статус выполнения.

  ```python
  from awaits import shoot


  @shoot
  def other_heavy_math_function(x, y):
    return x * y

  task = other_heavy_math_function(10, 10)

  while not task.done:
      pass

  print(task.result)
  ```

  При необходимости, вы можете указать название группы потоков, в котором хотите, чтобы выполнялась ваша функция:

  ```python
  @shoot(pool='gravities')
  def other_heavy_math_function(x, y):
    return x * y
  ```

  По умолчанию также используется группа ```"base"```.

  > Если основной поток исполнения программы подойдет к концу, "отстреленные" функции могут не успеть выполниться, что может создать у вас ложное впечатление сломанной программы. Не стоит использовать данный декоратор, если для вас это критично.



  Вы можете настроить параметры по умолчанию самостоятельно. Для этого необходимо вызвать метод ```set``` у класса ```config```:

  ```python
  from awaits import config



  config.set(delay=10.5)
  ```

  Данный метод принимает следующие именованные параметры:

    **pool_size** (int) - количество потоков в группе по умолчанию. Важно, чтобы данная настройка была выставлена до выполнения первой задачи. Если не установить этот параметр, он будет равен 10.

    **delay** (int или float) - значение задержки (в секундах) между итерациями опроса завершенности задачи. Используется по умолчанию в декораторе [```@awaitable```](#декоратор-awaitable). Если не установить это значение вручную, будет использовано число ```0.001```.


pkgId: 3bb794292151f7de2faebcf591971647d4987d32a5df195822ae0d28360402e5
name: python-awaken2
arch: src
version: 0.2.4
epoch: 0
release: 1
summary: Awaken 是一个功能自动化测试框架, 将支持 WEB、API、APP 等平台。
url: https://gitee.com/catcat7/awaken2
rpm_license: UNKNOWN
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-awaken2-0.2.4-1.src.rpm
checksum_type: sha256
description:
      Awaken 是以 "关键字驱动" 为中心思想搭建的自动化测试框架。
      其核心实现是通过相比编程语言更加语义化的 "关键字" 来组织自动化用例的逻辑实现;
      相较于传统的通过编程语言直接编写的自动化脚本而言, "关键字驱动" 极大降低了技术栈的门槛, 使得非技术人员也能参与其中;


pkgId: 28d7bb0d46567d36da5df715e5d0e4fbadc644ffb2e10e6b0507518286800890
name: python-awarecache
arch: src
version: 1.5.12
epoch: 0
release: 1
summary: A context-aware caching library with customizable policies and metrics.
url: https://github.com/tobi2x/awarecache
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-awarecache-1.5.12-1.src.rpm
checksum_type: sha256
description:
  `awarecache` is a versatile caching library that provides context-aware caching with customizable eviction policies and detailed cache metrics. It allows you to manage different caches for different contexts with various caching strategies, and track performance metrics such as cache hits and misses.



  - **Context-Aware Caching**: Manage different caches for different contexts.
  - **Customizable Eviction Policies**: Choose from LRU, LFU, MRU, FIFO, TinyLFU, SLRU, and Clock caching strategies.
  - **Cache Metrics**: Track cache performance with hit and miss statistics.



  1. **Web Applications**: Manage different caches for user sessions, API responses, and static content with context-specific eviction policies.
  2. **Data Processing Pipelines**: Use specialized caches for different stages of data processing to optimize performance and resource usage.
  3. **Microservices**: Maintain separate caches for different services or components, each with its own eviction strategy.



  You can install `awarecache` via pip:

  ```bash
  pip install awarecache
  ```





  Here's a quick example to get you started:

  ```python
  from awarecache import Cache


  cache = Cache()


  cache.set_context_policy('user_sessions', 'LRU', capacity=50)
  cache.set_context_policy('api_responses', 'LFU', capacity=200)


  cache.put('session1', 'data1', context='user_sessions')
  print(cache.get('session1', context='user_sessions'))  # Output: data1


  cache.put('response1', 'data2', context='api_responses')
  print(cache.get('response1', context='api_responses'))  # Output: data2


  print(cache.get_metrics())  # Output: {'hits': 2, 'misses': 0}
  ```



  - **LRU (Least Recently Used)**: Removes the least recently accessed item.
  - **LFU (Least Frequently Used)**: Removes the least frequently accessed item.
  - **MRU (Most Recently Used)**: Removes the most recently accessed item.
  - **FIFO (First In, First Out)**: Removes the oldest item.
  - **TinyLFU**: A variant of LFU that uses a probabilistic approach for cache eviction.
  - **SLRU (Segmented LRU)**: Combines LRU with a segmented approach to differentiate between frequently and infrequently accessed items.
  - **Clock**: A circular buffer approach to manage cache items with a clock-like replacement strategy.


pkgId: eea36eb9606d0b591b437c409b4b2adf400a34b21716a5791f69003bf624a9e5
name: python-awesome-align
arch: src
version: 0.1.7
epoch: 0
release: 1
summary: An awesome word alignment tool
url: https://github.com/neulab/awesome-align
rpm_license: BSD 3-Clause
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-awesome-align-0.1.7-1.src.rpm
checksum_type: sha256
description:
  `awesome-align` is a tool that can extract word alignments from multilingual BERT (mBERT) [[Demo]](https://colab.research.google.com/drive/1205ubqebM0OsZa1nRgbGJBtitgHqIVv6?usp=sharing) and allows you to fine-tune mBERT on parallel corpora for better alignment quality (see [our paper](https://arxiv.org/abs/2101.08231) for more details).



  First, you need to install the dependencies:

  ```bash
  pip install -r requirements.txt
  python setup.py install
  ```



  Inputs should be *tokenized* and each line is a source language sentence and its target language translation, separated by (` ||| `). You can see some examples in the `examples` folder.



  Here is an example of extracting word alignments from multilingual BERT:

  ```bash
  DATA_FILE=/path/to/data/file
  MODEL_NAME_OR_PATH=bert-base-multilingual-cased
  OUTPUT_FILE=/path/to/output/file

  CUDA_VISIBLE_DEVICES=0 awesome-align \
      --output_file=$OUTPUT_FILE \
      --model_name_or_path=$MODEL_NAME_OR_PATH \
      --data_file=$DATA_FILE \
      --extraction 'softmax' \
      --batch_size 32
  ```

  This produces outputs in the `i-j` Pharaoh format. A pair `i-j` indicates that the <i>i</i>th word (zero-indexed) of the source sentence is aligned to the <i>j</i>th word of the target sentence.

  You can set `--output_prob_file` if you want to obtain the alignment probability and set `--output_word_file` if you want to obtain the aligned word pairs (in the `src_word<sep>tgt_word` format). You can also set `--cache_dir` to specify where you want to cache multilingual BERT.

  You can also set `MODEL_NAME_OR_PATH` to the path of your fine-tuned model as shown below.



  If there is parallel data available, you can fine-tune embedding models on that data.

  Here is an example of fine-tuning mBERT that balances well between efficiency and effectiveness:

  ```bash
  TRAIN_FILE=/path/to/train/file
  EVAL_FILE=/path/to/eval/file
  OUTPUT_DIR=/path/to/output/directory

  CUDA_VISIBLE_DEVICES=0 awesome-train \
      --output_dir=$OUTPUT_DIR \
      --model_name_or_path=bert-base-multilingual-cased \
      --extraction 'softmax' \
      --do_train \
      --train_tlm \
      --train_so \
      --train_data_file=$TRAIN_FILE \
      --per_gpu_train_batch_size 2 \
      --gradient_accumulation_steps 4 \
      --num_train_epochs 1 \
      --learning_rate 2e-5 \
      --save_steps 4000 \
      --max_steps 20000 \
      --do_eval \
      --eval_data_file=$EVAL_FILE
  ```

  You can also fine-tune the model a bit longer with more training objectives for better quality:

  ```bash
  TRAIN_FILE=/path/to/train/file
  EVAL_FILE=/path/to/eval/file
  OUTPUT_DIR=/path/to/output/directory

  CUDA_VISIBLE_DEVICES=0 awesome-train \
      --output_dir=$OUTPUT_DIR \
      --model_name_or_path=bert-base-multilingual-cased \
      --extraction 'softmax' \
      --do_train \
      --train_mlm \
      --train_tlm \
      --train_tlm_full \
      --train_so \
      --train_psi \
      --train_data_file=$TRAIN_FILE \
      --per_gpu_train_batch_size 2 \
      --gradient_accumulation_steps 4 \
      --num_train_epochs 1 \
      --learning_rate 2e-5 \
      --save_steps 10000 \
      --max_steps 40000 \
      --do_eval \
      --eval_data_file=$EVAL_FILE
  ```

  If you want high alignment recalls, you can turn on the `--train_co` option, but note that the alignment precisions may drop. You can set `--cache_dir` to specify where you want to cache multilingual BERT.



  In supervised settings where gold word alignments are available for your training data, you can incorporate the supervised signals into our self-training objective (`--train_so`) and here is an example command:

  ```bash
  TRAIN_FILE=/path/to/train/file
  TRAIN_GOLD_FILE=/path/to/train/gold/file
  OUTPUT_DIR=/path/to/output/directory

  CUDA_VISIBLE_DEVICES=0 awesome-train \
      --output_dir=$OUTPUT_DIR \
      --model_name_or_path=bert-base-multilingual-cased \
      --extraction 'softmax' \
      --do_train \
      --train_so \
      --train_data_file=$TRAIN_FILE \
      --train_gold_file=$TRAIN_GOLD_FILE \
      --per_gpu_train_batch_size 2 \
      --gradient_accumulation_steps 4 \
      --num_train_epochs 5 \
      --learning_rate 1e-4 \
      --save_steps 200
  ```

  See `examples/*.gold` for the example format of the gold alignments. You need to turn on the `--gold_one_index` option if the gold alignments are 1-indexed and you can turn on the `--ignore_possible_alignments` option if you want to ignore possible alignments.



  The following table shows the alignment error rates (AERs) of our models and popular statistical word aligners on five language pairs. The De-En, Fr-En, Ro-En datasets can be obtained following [this repo](https://github.com/lilt/alignment-scripts), the Ja-En data is from [this link](http://www.phontron.com/kftt/) and the Zh-En data is available at [this link](http://nlp.csai.tsinghua.edu.cn/~ly/systems/TsinghuaAligner/TsinghuaAligner.html). The best scores are in **bold**.

  |            | De-En | Fr-En | Ro-En | Ja-En | Zh-En |
  | -| ------- | ------- | ------- | ------- | ------- |
  | [fast\_align](https://github.com/clab/fast_align) | 27.0 | 10.5 | 32.1 | 51.1 | 38.1 |
  | [eflomal](https://github.com/robertostling/eflomal) | 22.6 | 8.2 | 25.1 | 47.5 | 28.7 |
  | [Mgiza](https://github.com/moses-smt/mgiza)    | 20.6 | 5.9 | 26.4 | 48.0 | 35.1 |
  | Ours (w/o fine-tuning, softmax) | 17.4 | 5.6 | 27.9 | 45.6 | 18.1 |
  | Ours (multilingually fine-tuned <br/>  w/o `--train_co`, softmax) [[Download]](https://drive.google.com/file/d/1IcQx6t5qtv4bdcGjjVCwXnRkpr67eisJ/view?usp=sharing) | 15.2 | **4.1** | 22.6 | **37.4** | **13.4** |
  | Ours (multilingually fine-tuned <br/>  w/ `--train_co`, softmax) [[Download]](https://drive.google.com/file/d/1IluQED1jb0rjITJtyj4lNMPmaRFyMslg/view?usp=sharing) |  **15.1** | 4.5 | **20.7** | 38.4 | 14.5 |




  If you use our tool, we'd appreciate if you cite the following paper:

  ```
  @inproceedings{dou2021word,
    title={Word Alignment by Fine-tuning Embeddings on Parallel Corpora},
    author={Dou, Zi-Yi and Neubig, Graham},
    booktitle={Conference of the European Chapter of the Association for Computational Linguistics (EACL)},
    year={2021}
  }
  ```




  Some of the code is borrowed from [HuggingFace Transformers](https://github.com/huggingface/transformers) licensed under [Apache 2.0](https://github.com/huggingface/transformers/blob/master/LICENSE) and the entmax implementation is from [this repo](https://github.com/deep-spin/entmax).


pkgId: ff36287c66fbfc3bda63bbb0a3dd132404e23b6f42dec909b5c2691a81c87250
name: python-awesome-panel-extensions
arch: src
version: 20221019.2
epoch: 0
release: 1
summary: A package of awesome Panel extensions. Provided by awesome-panel.org
url: https://pypi.org/project/awesome-panel-extensions/
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-awesome-panel-extensions-20221019.2-1.src.rpm
checksum_type: sha256
description:
  ⚠️ The extensions in this package are currently being carved out and split into seperate
  extensions. Please check out the
  [awesome-panel repositories](https://github.com/orgs/awesome-panel/repositories) to see if the
  extension you need is available there.

  We want to

  - Make sure [Panel](https://panel.holoviz.org/) has lots of available extensions

  We provide

  - The `awesome-panel-extensions` Python package containing extra extensions for Panel.

  You can install and use the package as simple as.

  ```bash
  pip install awesome-panel-extensions
  ```



  Install `awesome-panel-extensions` including the *`examples` dependencies*.

  ```bash
  pip install  awesome-panel-extensions[examples]
  ```

  Explore the sample apps

  ```bash
  pn hello  awesome-panel-extensions
  ```

  ![Project Intro](https://raw.githubusercontent.com/awesome-panel/awesome-panel-extensions/main/assets/videos/pn-hello-awesome-panel-extensions.gif)

  You can now find the *reference* and *gallery* notebooks in the `examples/awesome-panel/awesome-panel-extensions` folder. Check them out by running `jupyter lab`.



  Click one of the buttons

  [![nbviewer](https://raw.githubusercontent.com/jupyter/design/master/logos/Badges/nbviewer_badge.svg)](https://nbviewer.org/github/awesome-panel/awesome-panel-extensions/tree/main/examples/)
  [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/awesome-panel/awesome-panel-extensions/HEAD)



  Please support [Panel](https://panel.holoviz.org) and
  [awesome-panel](https://awesome-panel.org) by giving the projects a star on Github:

  - [holoviz/panel](https://github.com/holoviz/panel).
  - [awesome-panel/awesome-panel](https://github.com/awesome-panel/awesome-panel).

  Thanks



  If you are looking to contribute to this project you can find ideas in the [issue tracker](https://github.com/awesome-panel/awesome-panel-extensions/issues). To get started check out the [DEVELOPER_GUIDE](DEVELOPER_GUIDE.md).

  I would love to support and receive your contributions. Thanks.

  [![Hacktober Fest](https://github.blog/wp-content/uploads/2022/10/hacktoberfestbanner.jpeg?fit=1200%2C630)](https://github.com/awesome-panel/awesome-panel-extensions/issues).



  [![PyPI version](https://badge.fury.io/py/panel-highcharts.svg)](https://pypi.org/project/awesome-panel-extensions/)
  [![Downloads](https://pepy.tech/badge/panel-highcharts/month)](https://pepy.tech/project/awesome-panel-extensions)
  ![Python Versions](https://img.shields.io/badge/python-3.7%20%7C%203.8%20%7C%203.9%20%7C%203.10-blue)
  [![License](https://img.shields.io/badge/License-MIT%202.0-blue.svg)](https://opensource.org/licenses/MIT)
  ![Test Results](https://github.com/awesome-panel/awesome-panel-extensions/actions/workflows/tests.yaml/badge.svg?branch=main)

rpm_license:
  MIT License Copyright (c) 2021 Marc Skov Madsen Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


pkgId: 2d6781a9793c71d84f88e2eb82f1b7e79dceda1272bcdc82bceaa915067d2ff3
name: python-awesome-pattern-matching
arch: src
version: 0.24.4
epoch: 0
release: 1
summary: Awesome Pattern Matching
url: https://github.com/scravy/awesome-pattern-matching
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-awesome-pattern-matching-0.24.4-1.src.rpm
checksum_type: sha256
description:
  [![Github Actions](https://github.com/scravy/awesome-pattern-matching/workflows/Python%20application/badge.svg)](https://github.com/scravy/awesome-pattern-matching/actions)
  [![Downloads](https://pepy.tech/badge/awesome-pattern-matching)](https://pepy.tech/project/awesome-pattern-matching)
  [![PyPI version](https://badge.fury.io/py/awesome-pattern-matching.svg)](https://pypi.org/project/awesome-pattern-matching/)

  ```bash
  pip install awesome-pattern-matching
  ```

  - Simple
  - Powerful
  - Extensible
  - Composable
  - Functional
  - Python 3.7+, PyPy3.7+
  - Typed (IDE friendly)
  - Offers different styles (expression, declarative, statement, ...)

  There's a ton of pattern matching libraries available for python, all with varying degrees of maintenance and usability;
  also [since Python 3.10 there is the PEP-634 `match` statement](https://www.python.org/dev/peps/pep-0634/). However,
  this library still offers functionality that PEP-634 doesn't offer, as well as pattern matching for python versions
  before 3.10. [A detailed comparison of PEP-634 and _`apm`_ is available](https://github.com/scravy/awesome-pattern-matching/blob/main/docs/apm_vs_pep634.md).

  _`apm`_ defines patterns as objects which are _composable_ and _reusable_. Pieces can be matched and captured into
  variables, much like pattern matching in Haskell or Scala (a feature which most libraries actually lack, but which also
  makes pattern matching useful in the first place - the capability to easily extract data). Here is an example:

  ```python
  from apm import *

  if result := match([1, 2, 3, 4, 5], [1, '2nd' @ _, '3rd' @ _, 'tail' @ Remaining(...)]):
      print(result['2nd'])   # 2
      print(result['3rd'])   # 3
      print(result['tail'])  # [4, 5]


  match([1, 2, 3, 4, 5], [1, _ >> '2nd', _ >> '3rd', Remaining(...) >> 'tail'])
  ```

  Patterns can be composed using `&`, `|`, and `^`, or via their more explicit counterparts `AllOf`, `OneOf`, and `Either`
  . Since patterns are objects, they can be stored in variables and be reused.

  ```python
  positive_integer = InstanceOf(int) & Check(lambda x: x >= 0)
  ```

  Some fancy matching patterns are available out of the box:

  ```python
  from apm import *

  def f(x: int, y: float) -> int:
      pass

  if match(f, Arguments(int, float) & Returns(int)):
      print("Function satisfies required signature")
  ```






  For matching and selecting from multiple cases, choose your style:

  ```python
  from apm import *

  value = 7


  if match(value, Between(1, 10)):
      print("It's between 1 and 10")
  elif match(value, Between(11, 20)):
      print("It's between 11 and 20")
  else:
      print("It's not between 1 and 20")


  case(value) \
      .of(Between(1, 10), lambda: print("It's between 1 and 10")) \
      .of(Between(11, 20), lambda: print("It's between 11 and 20")) \
      .otherwise(lambda: print("It's not between 1 and 20"))


  try:
      match(value)
  except Case(Between(1, 10)):
      print("It's between 1 and 10")
  except Case(Between(11, 20)):
      print("It's between 11 and 20")
  except Default:
      print("It's not between 1 and 20")


  @case_distinction
  def f(n: Match(Between(1, 10))):
      print("It's between 1 and 10")

  @case_distinction
  def f(n: Match(Between(11, 20))):
      print("It's between 11 and 20")

  @case_distinction
  def f(n):
      print("It's not between 1 and 20")

  f(value)


  match(value,
        Between( 1, 10), lambda: print("It's between 1 and 10"),
        Between(11, 20), lambda: print("It's between 11 and 20"),
        _,               lambda: print("It's not between 1 and 20"))
  ```




  Patterns are applied recursively, such that nested structures can be matched arbitrarily deep.
  This is super useful for extracting data from complicated structures:

  ```python
  from apm import *

  sample_k8s_response = {
      "containers": [
          {
              "args": [
                  "--cert-dir=/tmp",
                  "--secure-port=4443",
                  "--kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname",
                  "--kubelet-use-node-status-port"
              ],
              "image": "k8s.gcr.io/metrics-server/metrics-server:v0.4.1",
              "imagePullPolicy": "IfNotPresent",
              "name": "metrics-server",
              "ports": [
                  {
                      "containerPort": 4443,
                      "name": "https",
                      "protocol": "TCP"
                  }
              ]
          }
      ]
  }

  if result := match(sample_k8s_response, {
          "containers": Each({
              "image": 'image' @ _,
              "name": 'name' @ _,
              "ports": Each({
                  "containerPort": 'port' @ _
              }),
          })
      }):
      print(f"Image: {result['image']}, Name: {result['name']}, Port: {result['port']}")
  ```

  The above will print

  ```
  Image: k8s.gcr.io/metrics-server/metrics-server:v0.4.1, Name: metrics-server, Port: 4443
  ```




  By default `match` records only the last match for captures. If for example `'item' @ InstanceOf(int)` matches multiple times,
  the last match will be recorded in `result['item']`. `match` can record all captures using the `multimatch=True` flag:

  ```python
  if result := match([{'foo': 5}, 3, {'foo': 7, 'bar': 9}], Each(OneOf({'foo': 'item' @ _}, ...)), multimatch=True):
      print(result['item'])  # [5, 7]


  if result := match([{'foo': 5}, 3, {'foo': 7, 'bar': 9}], Each(OneOf({'foo': 'item' @ _}, ...))):
    print(result['item'])  # 7
  ```




  Any value which occurs verbatim in a pattern is matched verbatim (`int`, `str`, `list`, ...), except Dictionaries (
  anything which has an `items()` actually).

  Thus:

  ```python
  some_very_complex_object = {
      "A": 1,
      "B": 2,
      "C": 3,
  }
  match(some_very_complex_object, {"C": 3})  # matches!
  ```

  If you do not want unknown keys to be ignored, wrap the pattern in a `Strict`:

  ```python

  match(some_very_complex_object, Strict({"C": 3}))
  ```

  Lists (anything iterable which does not have an `items()` actually) are also compared as they are, i.e.:

  ```python
  ls = [1, 2, 3]
  match(ls, [1, 2, 3])  # matches
  match(ls, [1, 2])  # does not match
  ```




  It is possible to match the remainder of a list though:

  ```python
  match(ls, [1, 2, Remaining(InstanceOf(int))])
  ```

  And each item:

  ```python
  match(ls, Each(InstanceOf(int)))
  ```

  Patterns can be joined using `&`, `|`, and `^`:

  ```python
  match(ls, Each(InstanceOf(int) & Between(1, 3)))
  ```

  Wild-card matches are supported using Ellipsis (`...`):

  ```python
  match(ls, [1, Remaining(..., at_least=2)])
  ```

  The above example also showcases how `Remaining` can be made to match
  `at_least` _n_ number of items (`Each` also has an `at_least` keyword argument).




  A wildcard pattern can be expressed using `_`. `_` is a `Pattern` and thus `>>` and `@` can be used with it.

  ```python
  match([1, 2, 3, 4], [1, _, 3, _])
  ```




  The `Ellipsis` can be used as a wildcard match, too. It is however not a `Pattern` (so `|`, `&`, `@`, etc. can not
  be used on it). If you actually want to match `Ellipsis`, wrap it using `Value(...)`.

  Otherwise `...` is equivalent for most intents and purposes to `_`:

  ```python
  match([1, 2, 3, 4], [1, ..., 3, ...])
  ```




  ```python
  @dataclass
  class User:
      first_name: str
      last_name: str

  value = User("Jane", "Doe")

  if match(value, User(_, "Doe")):
      print("Welcome, member of the Doe family!")
  elif match(value, User(_, _)):
      print("Welcome, anyone!")
  ```






  - 💚 has access to result captures
  - 💚 vanilla python
  - 💔 no case guards
  - 💔 can not return values (since it's a statement, not an expression)
  - 🖤 a bit repetetive
  - 💚 simplest and most easy to understand style
  - 🖤 fastest of them all

  ```python
  from apm import *

  value = {"a": 7, "b": "foo", "c": "bar"}

  if result := match(value, EachItem(_, 'value' @ InstanceOf(str) | ...), multimatch=True):
      print(result['value'])  # ["foo", "bar"]
  ```



  `bind()` can be used on a `MatchResult` to bind the matched items to an existing dictionary.

  ```python
  from apm import *

  value = {"a": 7, "b": "foo", "c": "bar"}

  result = {}
  if match(value, EachItem(_, 'value' @ InstanceOf(str) | ...)).bind(result):
      print(result['value'])  # ["foo", "bar"]
  elif match(value, {"quux": _ >> 'quux'}).bind(result):
      print(result['quux'])
  ```



  - 💚 has access to result captures
  - 💚 vanilla python
  - 💚 can return values directly as it is an expression
  - 💚 can use case guards via `when=` or `guarded`
  - 🖤 so terse that it is sometimes hard to read

  The expression style is summarized:

  ```python
  case(value).of(pattern, action) ... .otherwise(default_action)
  ```

  ...where action is either a value or a callable. The captures from the matching result are bound to the named
  parameters of the given callable, i.e. `result['foo']` and `result['bar']` from `'foo' @ _` and `'bar' @ _` will be
  bound to `foo` and `bar` respectively in `lambda foo, bar: ...`.

  ```python
  from apm import *

  display_name = case({'user': 'some-user-id', 'first_name': "Jane", 'last_name': "Doe"}) \
      .of({'first_name': 'first' @ _, 'last_name': 'last' @ _}, lambda first, last: f"{first}, {last}") \
      .of({'user': 'user_id' @ _}, lambda user_id: f"#{user_id}") \
      .otherwise("anonymous")
  ```

  _Note: To return a value an `.otherwise(...)` case must always be present._




  This is arguable the most hacky style in _`apm`_, as it re-uses the `try .. except`
  mechanism. It is nevertheless quite readable.

  - 💚 has access to result captures
  - 💚 very readable
  - 💔 can not return values (since it's a statement, not an expression)
  - 💚 can use case guards via `when=`
  - 🖤 misuse of the `try .. except` statement

  ```python
  from apm import *

  try:
      match({'user': 'some-user-id', 'first_name': "Jane", 'last_name': "Doe"})
  except Case({'first_name': 'first' @ _, 'last_name': 'last' @ _}) as result:
      user = f"{result['first']} {result['last']}"
  except Case({'user': 'user_id' @ _}) as result:
      user = f"#{result['user_id']}"
  except Default:
      user = "anonymous"

  print(user)  # "Jane Doe"
  ```




  - 💔 does not have access to result captures
  - 💚 very readable
  - 💚 can use case guards via `when=`
  - 💚 can return values
  - 🖤 the most bloated version of all styles

  ```python
  from apm import *

  @case_distinction
  def fib(n: Match(OneOf(0, 1))):
     return n

  @case_distinction
  def fib(n):
      return fib(n - 2) + fib(n - 1)

  for i in range(0, 6):
      print(fib(i))
  ```



  If not for its pattern matching capabilities, `@case_distinction` can be used
  to implement overloading. In fact, it can be imported as `@overload`.
  The mechanism is aware of arity and argument types.

  ```python
  from apm.overload import overload

  @overload
  def add(a: str, b: str):
      return "".join([a, b])

  @overload
  def add(a: int, b: int):
      return a + b

  add("a", "b")
  add(1, 2)
  ```



  - 💚 has access to result captures
  - 💚 can use case guards via `guarded`
  - 💚 very concise
  - 💚 can return values
  - 🖤 very readable when formatted nicely
  - 🖤 not so well suited for larger match actions
  - 🖤 slowest of them all

  As the name indicates the "terse" style is terse. It is inspired by the `pampy`
  pattern matching library and mimics some of its behavior. Despite a slim surface
  area it also comes with some simplifications:

  - A type given as a pattern is matched against as if it was wrapped in an `InstanceOf`
  - `re.Pattern` objects (result of `re.compile`) are matched against as if it was given via `Regex`
  - Captures are passed to actions in the same order as they occur in the pattern (not by name)

  ```python
  from apm import *

  def fibonacci(n):
    return match(n,
                 1, 1,
                 2, 1,
                 _, lambda x: fibonacci(x - 1) + fibonacci(x - 2)
                 )

  fibonacci(6)  # -> 8


  class Animal:        pass
  class Hippo(Animal): pass
  class Zebra(Animal): pass
  class Horse(Animal): pass

  def what_am_i(x):
    return match(x,
                 Hippo,  'hippopotamus',
                 Zebra,  'zebra',
                 Animal, 'some other animal',
                 _,      'not at all an animal',
                 )

  what_am_i(Hippo())  # -> 'hippopotamus'
  what_am_i(Zebra())  # -> 'zebra'
  what_am_i(Horse())  # -> 'some other animal'
  what_am_i(42)       # -> 'not at all an animal'
  ```






  Captures a piece of the thing being matched by name.

  ```python
  if result := match([1, 2, 3, 4], [1, 2, Capture(Remaining(InstanceOf(int)), name='tail')]):
      print(result['tail'])  ## -> [3, 4]
  ```

  As this syntax is rather verbose, two shorthand notations can be used:

  ```python

  if result := match([1, 2, 3, 4], [1, 2, 'tail' @ Remaining(InstanceOf(int))]):
      print(result['tail'])  ## -> [3, 4]


  if result := match([1, 2, 3, 4], [1, 2, Remaining(InstanceOf(int)) >> 'tail']):
      print(result['tail'])  ## -> [3, 4]
  ```




  Performs a strict pattern match. A strict pattern match also compares the type of verbatim values. That is, while
  _`apm`_ would match `3` with `3.0` it would not do so when using `Strict`. Also _`apm`_ performs partial matches of
  dictionaries (that is: it ignores unknown keys). It will perform an exact match for dictionaries using `Strict`.

  ```python

  match({"a": 3, "b": 7}, {"a": ...})
  match(3.0, 3)


  match({"a": 3, "b": 7}, Strict({"a": ...}))
  match(3.0, Strict(3))
  ```




  Matches against any of the provided patterns. Equivalent to `p1 | p2 | p3 | ..`
  (but operator overloading does not work with values that do not inherit from `Pattern`)

  ```python
  match("quux", OneOf("bar", "baz", "quux"))
  ```

  ```python
  match(3, OneOf(InstanceOf(int), None))
  ```

  Patterns can also be joined using `|` to form a `OneOf` pattern:

  ```python
  match(3, InstanceOf(int) | InstanceOf(float))
  ```

  The above example is rather contrived, as `InstanceOf` already accepts multiple types natively:

  ```python
  match(3, InstanceOf(int, float))
  ```

  Since bare values do not inherit from `Pattern` they can be wrapped in `Value`:

  ```python
  match("quux", Value("foo") | Value("quux"))
  ```




  Checks whether the value matches all of the given pattern. Equivalent to `p1 & p2 & p3 & ..`
  (but operator overloading does not work with values that do not inherit from `Pattern`)

  ```python
  match("quux", AllOf(InstanceOf("str"), Regex("[a-z]+")))
  ```




  Same as `Not(OneOf(*pattern))` (also `~OneOf(*pattern)`).




  Matches if the given pattern does not match.

  ```python
  match(3, Not(4))  # matches
  match(5, Not(4))  # matches
  match(4, Not(4))  # does not match
  ```

  The bitflip prefix operator (`~`) can be used to express the same thing. Note that it does not work on bare values,
  so they need to be wrapped in `Value`.

  ```python
  match(3, ~Value(4))  # matches
  match(5, ~Value(4))  # matches
  match(4, ~Value(4))  # does not match
  ```

  `Not` can be used do create a `NoneOf` kind of pattern:

  ```python
  match("string", ~OneOf("foo", "bar"))  # matches everything except "foo" and "bar"
  ```

  `Not` can be used to create a pattern that never matches:

  ```python
  Not(...)
  ```




  Matches each item in an iterable.

  ```python
  match(range(1, 10), Each(Between(1, 9)))
  ```




  Matches an object if each key satisfies `key_pattern` and each value satisfies `value_pattern`.

  ```python
  match({"a": 1, "b": 2}, EachItem(Regex("[a-z]+"), InstanceOf(int)))
  ```




  Matches a sequence of items within a list:

  ```python
  if result := match(range(1, 10), [1, 'a' @ Some(...), 4, 'b' @ Some(...), 8, 9]):
      print(result['a'])  # [2, 3]
      print(result['b'])  # [5, 6, 7]
  ```

  Takes the optional values `exactly`, `at_least`, and `at_most` which makes `Some` match
  either `exactly` _n_ items, `at_least` _n_, or `at_most` _n_ items (`at_least` and `at_most` can be given at the same
  time, but not together with `exactly`).

  Note the difference between `Some(1, 2)` and `Some([1, 2])`. The first version matches subsequences, the second
  version matches items which are themselves lists:

  ```python
  match([0,  1, 2 ,  1, 2 , 3], [0, Some( 1, 2 ), 3])  # matches the subsequence 1, 2 twice
  match([0, [1, 2], [1, 2], 3], [0, Some([1, 2]), 3])  # matches the item [1, 2] twice, which happen to be lists
  ```

  `Some` also goes by the names of `Many` and `Remaining`, which is sometimes nice to convey meaning:

  ```python
  match(range(1, 10), [1, 2, 'remaining' @ Remaining()])
  match([0, 1, 1, 1, 2, 1], [0, Many(1), Remaining(InstanceOf(int))])
  ```

  When used with no arguments, `Some()` is the same as `Some(...)`.




  Can be used to match the unmatched parts of a Dictionary/Mapping.

  ```python
  result = match({
      "foo": 1,
      "bar": 2,
      "qux": 4,
      "quuz": 8,
  }, {"foo": 'foo' @ _, "bar": 'bar' @ _} ** Remainder('rs' @ _))
  print(result.foo)  # 1
  print(result.bar)  # 2
  print(result.rs)   # {'qux': 4, 'quuz': 8}
  ```

  `Remainder` is, strictly speaking, not a `Pattern` and only works in conjunction with `**` on dictionaries,
  and it only works on the right-hand side of the dictionary.




  Matches an object if it is between `lower` and `upper` (inclusive). The optional keyword arguments
  `lower_bound_exclusive` and `upper_bound_exclusive` can be set to `True` respectively to exclude the
  lower/upper from the range of matching values.




  Matches an object if it has the given length. Alternatively also accepts `at_least` and `at_most` keyword arguments.

  ```python
  match("abc", Length(3))
  match("abc", Length(at_least=2))
  match("abc", Length(at_most=4))
  match("abc", Length(at_least=2, at_most=4))
  ```




  Matches an object if it contains the given item (as per the same logic as the `in` operator).

  ```python
  match("hello there, world", Contains("there"))
  match([1, 2, 3], Contains(2) & Contains(3))
  match({'foo': 1, 'bar': 2}, Contains('quux') | Contains('bar'))
  ```




  Matches a string if it completely matches the given regex, as per `re.fullmatch`.
  If the regular expression pattern contains named capturing groups and `bind_groups` is set to `True`,
  this pattern will bind the captured results in the `MatchResult` (the default).

  To mimic `re.match` or `re.search` the given regular expression `x` can be augmented as `x.*` or `.*x.*`
  respectively.




  Matches an object if it satisfies the given predicate.

  ```python
  match(2, Check(lambda x: x % 2 == 0))
  ```




  Matches an object if it is an instance of any of the given types.

  ```python
  match(1, InstanceOf(int, flaot))
  ```




  Matches if the matched type is a subclass of any of the given types.

  ```python
  match(int, SubclassOf(int, float))
  ```




  Matches the parameters of a callable.

  ```python
  def f(x: int, *xs: float, y: str, **kwargs: bool):
      pass


  match(f, Parameters(int, VarArgs(float), y=str, KwArgs(bool)))
  ```

  Each argument to Parameters is expected to be the type of a positional argument.

  `Parameters` matches function signatures if their positional arguments match completely, i.e.

  ```python
  def f(x: int, y: float):
      pass


  print(bool(match(f, Parameters(int))))  # False
  print(bool(match(f, Parameters(int, float))))  # True
  print(bool(match(f, Parameters(int, Remaining(_)))))  # True
  ```

  Keyword arguments are matched only if they are keyword only arguments. In contrast to positional arguments it matches
  also impartially (which aligns with the non-strict matching behavior with respect to dictionaries):

  ```python
  def f(x: int, *, y: str, z: float):
      pass


  print(bool(match(f, Parameters(int))))  # True
  print(bool(match(f, Parameters(y=str))))  # False – positional parameters not matched
  print(bool(match(f, Parameters(int, y=str))))  # True
  ```

  This can be changed with `Strict`:

  ```python
  def f(x: int, *, y: str, z: float):
      pass


  print(bool(match(f, Strict(Parameters(int)))))  # False
  print(bool(match(f, Strict(Parameters(int, y=str)))))  # False  (z not mentioned but present)
  print(bool(match(f, Strict(Parameters(int, y=str, z=float)))))  # True  (has y and z exactly)
  ```




  <span style="color: red">**DEPRECATED, use `Parameters` instead (see above)**</span>


  Matches a callable if it's type annotations correspond to the given types.

  ```python
  def f(x: int, y: float, z):
      ...


  match(f, Arguments(int, float, None))
  ```

  Arguments has an alternate form which can be used to match keyword arguments:

  ```python

  def f(x: int, y: float, z: str):
      ...

  match(f, Arguments(x=int, y=float))
  ```

  The strictness rules are the same as for dictionaries (which is why the above example works).

  ```python

  match(f, Strict(Arguments(x=int, y=float)))  # does not match
  match(f, Strict(Arguments(x=int, y=float, z=str)))  # matches
  ```




  Matches a callable if it's type annotations denote the given return type.

  ```python
  def g(x: int) -> str:
      ...


  match(g, Arguments(int) & Returns(str))
  ```




  Transforms the currently looked at value by applying `function` on it and matches the result against `pattern`. In
  Haskell and other languages this is known as a [_view
  pattern_](https://gitlab.haskell.org/ghc/ghc/-/wikis/view-patterns).

  ```python
  def sha256(v: str) -> str:
      import hashlib
      return hashlib.new('sha256', v.encode('utf8')).hexdigest()

  match("hello", Transformed(sha256, "2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824"))
  ```

  This is handy for matching data types like `datetime.date` as this pattern won't match if the transformation
  function errored out with an exception.

  ```python
  from apm import *
  from datetime import date

  if result := match("2020-08-27", Transformed(date.fromisoformat, 'date' @ _):
      print(repr(result['date']))  # result['date'] is a datetime.date
  ```




  Checks whether the nested object to be matched satisfies pattern at the given path. The match fails if the given path
  can not be resolved.

  ```python
  record = {
      "foo": {
          "bar": {
              "quux": {
                  "value": "deeply nested"
              }
          }
      }
  }

  result := match(record, At("foo.bar.quux", {"value": Capture(..., name="value")}))
  result['value']  # "deeply nested"


  result := match(record, At(['foo', 'bar', 'quux'], {"value": Capture(..., name="value")}))
  ```




  Mostly syntactic sugar to match a dictionary nicely (and anything that provides an `.items()` method).

  ```python
  from apm import *
  from datetime import datetime

  request = {
      "api_version": "v1",
      "job": {
          "run_at": "2020-08-27 14:09:30",
          "command": "echo 'booya'",
      }
  }

  if result := match(request, Items(
      api_version="v1",
      job=Object(
          run_at=Transformed(datetime.fromisoformat, 'time' @ _),
      ) & OneOf(
          Items(command='command' @ InstanceOf(str)),
          Items(spawn='container' @ InstanceOf(str)),
      )
  )):
      print(repr(result['time']))      # datetime(2020, 8, 27, 14, 9, 30)
      print('container' not in result) # True
      print(result['command'])         # "echo 'booya'"
  ```




  Matches any object of the specific type with the given attrs as in `**kwargs`.
  It respects the `__match_args__` introduced by PEP-634.

  ```python
  from apm import *
  from typing import Literal, Tuple

  class Click:
      __match_args__ = ("position", "button")

      def __init__(self, pos: Tuple[int, int], btn: Literal['left', 'right', 'middle']):
          self.position = pos
          self.button = btn

  assert match(Click((1, 2), 'left'), Object(Click, (1, 2)))
  assert match(Click((1, 2), 'left'), Object(Click, (1, 2), 'left'))
  assert match(Click((1, 2), 'left'), Object(Click, (1, 2), button='left'))
  ```




  New patterns can be added, just like the ones in `apm.patterns.*`. Simply extend the `apm.Pattern` class:

  ```python
  class Min(Pattern):
      def __init__(self, min):
          self.min = min

      def match(self, value, *, ctx: MatchContext, strict=False) -> MatchResult:
          return ctx.match_if(value >= self.min)

  match(3, Min(1))  # matches
  match(3, Min(5))  # does not match
  ```


pkgId: c3939facec112253430dd06ad3cc4925db574812381c55c9015a5cc3a723e21a
name: python-awesome-progress-bar
arch: src
version: 1.7.2
epoch: 0
release: 1
summary: Progress bar for terminal
url: https://github.com/yoskutik/awesome_progress_bar
rpm_license: GNU General Public License v3 or later (GPLv3+)
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-awesome-progress-bar-1.7.2-1.src.rpm
checksum_type: sha256
description:
  Feel free to suggest ideas to improve this package in the GitHub's Issues section.
  ![](https://img.shields.io/badge/@Yoskutik-444?logo=github&style=flat-square)


pkgId: 330455c83368bde4fe52aa71da578101b0ad1744e3a12a8aba08eec2758a9a53
name: python-awesome-sso
arch: src
version: 0.6.0
epoch: 0
release: 1
summary: sso general utility for services connected to sso
url: https://github.com/MoBagel/awesome-sso
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-awesome-sso-0.6.0-1.src.rpm
checksum_type: sha256
description:
  [![Stable Version](https://badge.fury.io/py/awesome-sso.svg)](https://pypi.org/project/awesome-sso/)
  [![tests](https://github.com/MoBagel/awesome-sso/workflows/develop/badge.svg)](https://github.com/MoBagel/awesome-sso)
  [![Coverage Status](https://coveralls.io/repos/github/MoBagel/awesome-sso/badge.svg?branch=develop)](https://coveralls.io/github/MoBagel/awesome-sso)



  A library designed to host common components for a cluster of microservices sharing a single sign on.



  - [x] A common exception class, supporting both status code and custom error code to map to more detailed error message
    or serve as i18n key.
  - [x] A common FastAPI app for interaction with service, like login ,registration and unregistration.
  - [x] a connector for minio object store.
  - [x] a connector for beanie, a mongo odm compatible with pydantic.





  1. `pip install awesome-sso`



  Using fast API as example, we may simply throw exception with a proper status code, and an optional error code. We may
  also supply arbitrary key value in args dict, to help frontend render better error message.

  ```python
  from awesome_sso.exceptions import NotFound
  from fastapi import APIRouter

  router = APIRouter()


  @router.get('/transactions')
  def get(id: str):
      try:
          obj = find_by_id(id)
      except Exception as e:
          raise NotFound(message='transaction not found' % id, error_code='A0001', args={id: id})
      ...
  ```

  And we may implement a common error handler to convert all these errors to proper response schema

  ```python
  from awesome_sso.exceptions import HTTPException
  from fastapi.requests import Request
  from fastapi.responses import JSONResponse


  @app.exception_handler(HTTPException)
  async def http_exception_handler(request: Request, exc: HTTPException):
      return JSONResponse(
          status_code=exc.status_code,
          content={
              'detail': exc.detail,
              'error_code': exc.error_code,
          }
      )
  ```

  This would result in a response with status code 404, and body

  ```json
  {
    "status_code": 404,
    "detail": {
      "message": "transaction not found",
      "id": "some_id"
    },
    "error_code": "A0001"
  }
  ```

  With this response, frontend can decide to simply render detail, or map it to detailed message. If error_code "A0001"
  correspond to the following i18 n entry

  ```json
  "error.A0001": {"en-US": "transaction can not be found with supplied {id}: {message}"}
  ```

  we may format message accordingly with

  ```typescript
  errorMessage = formatMessage({ id: `error.${error.data.error_code}` }, error.data.detail);
  ```

  Note that error code is not supplied, is default to status code. So it is always safe to simply use error_code in
  frontend to decide what to render.





  refer to `tests/test_minio.py`



  refer to `tests/service/test_user.py`

  ```python
  from beanie import init_beanie
  from motor.motor_asyncio import AsyncIOMotorClient
  from awesome_sso.service.user.schema import AwesomeUser


  def init_mongo():
      settings = YOUR_SETTINGS()
      models = [AwesomeUser]
      cli = AsyncIOMotorClient(settings.mongodb_dsn)
      await init_beanie(
          database=cli[settings.mongodb_db_name],
          document_models=models,
      )
      for model in models:
          await model.get_motor_collection().drop()
          await model.get_motor_collection().drop_indexes()
  ```





  ```python
  from awesome_sso.service.settings import Settings

  settings = Settings()
  settings.init_app(
      symmetric_key='YOUR_SYMMETRIC_KEY',  # to encode and decode service token
      public_key='YOUR_PUBLIC_KEY',  # to decode the token signed by sso
      user_model=USER_MODEL,  # user orm needs to inherit AwesomeUser from `awesome_sso.user.schema`
      service_name='YOUR_SERVICE_NAME',  # for service discovery, to recognize service
      sso_domain='YOUR_SSO_DOMAIN',  # for service registration and sync user
  )

  ```



  ```python
  from awesome_sso.service import Service
  from fastapi import FastAPI

  app = FastAPI()
  service = Service()
  service.init_app(YOUR_FASTAPI_APP)
  app.mount('/YOUR/PATH', YOUR_FASTAPI_APP)
  ```

  then open the api doc, you will see the apis in `awesome_sso.service.user.route`





  1. create your own environment for poetry, and simply run: `pip install poetry`
  2. alternatively, you can refer to [poetry's official page](https://github.com/python-poetry/poetry)
  3. to be able to use `poe` directly, `pip install poethepoet`



  1. project setup: `poetry install`
  2. create your own branch to start developing new feature.
  3. before creating pr, make sure you pass `poe lint` and `./run_test.sh`.
      - what happened inside `./run_test.sh` is that a minio server is setup for you temporarily, and teardown and unit
        test is finished.
      - notice that `poe test` would also work if you already have a minio up and running. You need the following env
        variable: `MINIO_ACCESS_KEY`, `MINIO_SECRET_KEY`, `MINIO_ADDRESS` upon running `poe test`.
  4. for a list of available poe command, `poe`
  5. after you submit a pr, you should check if pipeline is successful.



  1. `poetry version [new_version]`
  2. `git commit -m"Bump version"`
  3. `git push origin develop`
  4. [create new release](https://github.com/MoBagel/awesome-sso/releases/new) on github.
  5. Create release off develop branch, auto generate notes, and review release note.
  6. Publish release


pkgId: 80e293938829fc1022f333f381061bebf742d0bf0110ec13a00ddfba5f812328
name: python-awesomeNations
arch: src
version: 0.0.4
epoch: 0
release: 1
summary: A simple python web scraping library for NationStates
url: https://pypi.org/project/awesomeNations/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-awesomeNations-0.0.4-1.src.rpm
checksum_type: sha256
description:
  AwesomeNations is a simple python web scraping library for NationStates. Useful to get nation census like Defense Forces, Compassion, Scientific Advancement and etc.


pkgId: d1021d69e8c046d1843c715901d005318c8303901aedbdf7d8a84ca22a6c8adc
name: python-awesomest-search
arch: src
version: 0.2.0
epoch: 0
release: 1
summary: Awesomest best fuzzy search
url: https://github.com/prakHr/awesomest_search
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-awesomest-search-0.2.0-1.src.rpm
checksum_type: sha256
description:
  - [Installation](#installation)
  - [License](#license)

  ```console
  pip install awesomest-search
  ```

  ```
  import awesomest_search.search
  para = "Hi my name is Prakhar!"
  search_term = "Prakhar!"
  level = 1 # for faster execution

  results = awesomest_search.search.awesome_search(para,search_term,level)
  pprint(results)
  ```

  `automate-unsupervised-dataset-generation` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.


pkgId: 8b9091f032fe314229f13f80aa6ac09b2c6ab6a36c163cf955aa2646445ce0cf
name: python-awesomeversion
arch: src
version: 24.6.0
epoch: 0
release: 1
url: https://github.com/ludeeus/awesomeversion
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-awesomeversion-24.6.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.

  <details>
  <summary><code>AwesomeVersion.in_range</code></summary>
  This is a helper method to check if the version is in a range.
  This method takes two arguments, `lowest` and `highest`, both are required, and returns a boolean.
  > **Note** This method is the same as doing `lowest <= AwesomeVersion <= highest`
  Example:
  ```python
  from awesomeversion import AwesomeVersion
  print(AwesomeVersion("1.2.2").in_range("1.2.1", "1.3"))
  > True
  print(AwesomeVersion("1.2.0").in_range("1.2.1", "1.3"))
  > False
  ```
  </details>
  <details>
  <summary><code>AwesomeVersion.diff</code></summary>
  This is a helper method to get the difference between two versions.
  This method takes one argument which is the version to compare against, and returns a `AwesomeVersionDiff` object.
  > **Note** This method is the same as doing `AwesomeVersion - version`
  Example:
  ```python
  from awesomeversion import AwesomeVersion
  > print(AwesomeVersion("1.0").diff("2.1"))
  AwesomeVersionDiff(major=True, minor=True, patch=False, modifier=False, strategy=False)
  ```
  </details>
  <details>
  <summary><code>AwesomeVersion.section</code></summary>
  This is a helper method to get a section of the version.
  This method takes one argument which is the section to get, and returns an integer representing it (or 0 if it does not exist).
  Example:
  ```python
  from awesomeversion import AwesomeVersion
  > print(AwesomeVersion("1.0").section(0))
  1
  ```
  </details>


pkgId: 00a211ebb13fc2b5d4fdd9f78be5eb6608e8433c43bdf32460e601383dc1e1b6
name: python-awftp
arch: src
version: 1.3.4
epoch: 0
release: 1
summary: awftp - a FTP-style client for HCP Anywhere
url: http://awftp.readthedocs.io/en/latest/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-awftp-1.3.4-1.src.rpm
checksum_type: sha256
description:
  **A FTP-style client for HCP Anywhere File Sync & Share**
  HCP Anywhere is a File Sync & Share solution developed by Hitachi
  Vantara. It offers a wide range of FS&S clients for Desktop computers,
  Mobile devices as well as Browsers.
  A lacking piece so far is a CLI client that allows to access HCP Anywhere
  on devices where no GUI is available (Linux servers, for example).
  **awftp** tries to fill this gap by providing a look and feel as close as
  possible to well-known CLI-based ftp clients. The features available
  are a subset of what is offered by ftp clients, due to the functionality the
  HCP Anywhere FS&S service offers through its API; some other functions in
  ftp clients simply doesn't make sense for use with HCP Anywhere. On the other
  hand, there are some features (*snap*, for example) not found with ftp...
  **Features**
      *   Works with any FS&S API version >= 2.1.1 while using the highest
          version known
      *   Navigate the folders stored in HCP Anywhere, including Mobilized NAS,
          Shared Folders, Team Folders, Backup Folders
      *   List folders content, including deleted files/folders
      *   Store, update and retrieve files
      *   Move files and folders
      *   Undelete files/folders
      *   Create/delete folders (even recursive)
      *   Link handling:
          *   Create links to share content with others - internal/public,
              read-only, read-write, write-only
          *   List links
          *   Delete links
          *   Work with folders shared with us:
              *   List all collaboration folders
              *   List invitations
              *   Accept invitations
              *   Reject invitations
      *   Work with snapshots
          *   List available snapshots
          *   Provide view into snapshots
          *   Restore files from snapshots
      *   Dynamically enables/disables features depending on the HCP Anywhere
          version connected to


pkgId: 5594e9a41f3cc6648606fcd62a361cac7f828f11ec660000269c19e1da189c2e
name: python-awk-plus-plus
arch: src
version: 0.17.1
epoch: 0
release: 1
summary: Declarative Data Orchestration
url: https://github.com/pyscaffold/pyscaffold/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-awk-plus-plus-0.17.1-1.src.rpm
checksum_type: sha256
description:
  [![Project generated with PyScaffold](https://img.shields.io/badge/-PyScaffold-005CA0?logo=pyscaffold)](https://pyscaffold.org/)
  [![PyPI-Server](https://img.shields.io/pypi/v/awk_plus_plus.svg)](https://pypi.org/project/awk_plus_plus/)

  <!-- These are examples of badges you might also want to add to your README. Update the URLs accordingly.
  [![Built Status](https://api.cirrus-ci.com/github/<USER>/awk_plus_plus.svg?branch=main)](https://cirrus-ci.com/github/<USER>/awk_plus_plus)
  [![ReadTheDocs](https://readthedocs.org/projects/awk_plus_plus/badge/?version=latest)](https://awk_plus_plus.readthedocs.io/en/stable/)
  [![Coveralls](https://img.shields.io/coveralls/github/<USER>/awk_plus_plus/main.svg)](https://coveralls.io/r/<USER>/awk_plus_plus)
  [![Conda-Forge](https://img.shields.io/conda/vn/conda-forge/awk_plus_plus.svg)](https://anaconda.org/conda-forge/awk_plus_plus)
  [![Monthly Downloads](https://pepy.tech/badge/awk_plus_plus/month)](https://pepy.tech/project/awk_plus_plus)
  [![Twitter](https://img.shields.io/twitter/url/http/shields.io.svg?style=social&label=Twitter)](https://twitter.com/awk_plus_plus)
  -->



  > A  language designed for data orchestration.


  * Fuzzy regex engine and Semantic search to retrieve information in an in-process DB.
  * End-user programming.
  * Orthogonal Persistence based on DuckDB
  * Transparent reference with Jsonnet. We plan to execute this feature with Dask.
  * URL interpreter to manage data sources.


  Install the package with:
  ```bash
  pip install awk_plus_plus
  ```


  You output your data to JSON with the `cti` command.


  The command runs a web service with Gradio, allowing you to execute your expressions through a user-friendly user interface or by making HTTP requests.
  ```bash
  cti run-webservice
  ```



  ```bash
  cti i "Hello world" -p -v 4
  ```


  ```bash
  cti i '{"keys":: ["AWK", "SED", "SHELL"], "languages": [std.asciiLower(x) for x in self.keys]}'
  ```


  Our step further is the URL interpreter which allows you to manage different data sources with an unique syntax across a set of plugins.


  ```bash
  cti i '{"lines": interpret("stream://stdin?strip=true")}'
  ```


  ```bash
  cti i '{"emails": interpret("imap://USER:PASSWORD@HOST:993/INBOX")}'
  ```


  ```bash
  cti i '{"email":: interpret("keyring://backend/awk_plus_plus/email"), "emails": interpret($.email)}'
  ```


  ```bash
  cti i 'interpret("**/*.csv")'
  ```


  ```bash
  cti i 'interpret("sql:SELECT * FROM email")'
  ```


  Unlike other programming languages that require multiple steps to reference data, Jsonnet requires only one step, thanks to its reference mechanism.
  This is particularly useful for data engineers who want to connect different services in a topological order. The code below represents this scenario in Python:
  ```python

  import requests

  def fetch_character(id):
      url = f"https://rickandmortyapi.com/api/character/{id}"
      response = requests.get(url)
      return response.json()

  def process_character(character):
      
      character['image'] += f"?awk_download=data/{character['name'].replace(' ', '_').lower()}.jpeg"

      
      character['episode'] = [requests.get(episode).json() for episode in character['episode']]

      return character


  print([process_character(fetch_character(id)) for id in [1, 2, 3, 4, 5, 6]])

  ```
  Contrary to the previous Python code, Jsonnet allows you to leverage the power of referential transparency. The previous code is equivalent in Jsonnet to:

  ```jsonnet
  [
     i("https://rickandmortyapi.com/api/character/%s" % id) +
      {image: i(super.image+"?awk_download=data/"+std.strReplace(std.asciiLower(super.name), " ", "_")+".jpeg")} +
      {episode: [i(episode) for episode in super.episode]}
     for id in [1,2,3,4,5,6]
  ]
  ```


  ```jsonnet
  {
     "emails": i("sql:SELECT subject FROM `%s`" %  self.email),
     // This expression saves the unseen emails from your inbox, as defined in your keyring, using IMAP query criteria. It then returns the netloc hash, which refers to the table.
     "email": i(i("keyring://backend/awk_plus_plus/primary_email")+"?q=UNSEEN")
  }
  ```


  * pop3://
  * imap://
  * keyring://backend/{service}/{username}
  * sql:{expression}
  * https://
  * file:/



  This project has been set up using [PyScaffold] 4.5 and the [dsproject extension] 0.0.post167+g4386552.

  [conda]: https://docs.conda.io/
  [pre-commit]: https://pre-commit.com/
  [Jupyter]: https://jupyter.org/
  [nbstripout]: https://github.com/kynan/nbstripout
  [Google style]: http://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings
  [PyScaffold]: https://pyscaffold.org/
  [dsproject extension]: https://github.com/pyscaffold/pyscaffoldext-dsproject


pkgId: 5157e796fe898b61d0f2159ab042ce39d0b5db07db2460f984c6e93ccca137d3
name: python-awkward
arch: src
version: 2.6.9
epoch: 0
release: 1
summary: Manipulate JSON-like data with NumPy-like idioms.
url: https://github.com/scikit-hep/awkward-1.0
rpm_license: BSD-3-Clause
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-awkward-2.6.9-1.src.rpm
checksum_type: sha256
description:
  <a href="https://github.com/scikit-hep/awkward-1.0">
      <img src="https://github.com/scikit-hep/awkward-1.0/raw/main/docs-img/logo/logo-300px.png">
  </a>


  [![PyPI version](https://badge.fury.io/py/awkward.svg)](https://pypi.org/project/awkward)
  [![Conda-Forge](https://img.shields.io/conda/vn/conda-forge/awkward)](https://github.com/conda-forge/awkward-feedstock)
  [![Python 3.8‒3.12](https://img.shields.io/badge/python-3.8%E2%80%923.12-blue)](https://www.python.org)
  [![BSD-3 Clause License](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
  [![Build Test](https://github.com/scikit-hep/awkward/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/scikit-hep/awkward/actions/workflows/test.yml)

  [![Scikit-HEP](https://scikit-hep.org/assets/images/Scikit--HEP-Project-blue.svg)](https://scikit-hep.org/)
  [![NSF-1836650](https://img.shields.io/badge/NSF-1836650-blue.svg)](https://nsf.gov/awardsearch/showAward?AWD_ID=1836650)
  [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.4341376.svg)](https://doi.org/10.5281/zenodo.4341376)
  [![Documentation](https://img.shields.io/badge/docs-online-success)](https://awkward-array.org/)
  [![Gitter](https://img.shields.io/badge/chat-online-success)](https://gitter.im/Scikit-HEP/awkward-array)

  Awkward Array is a library for **nested, variable-sized data**, including arbitrary-length lists, records, mixed types, and missing data, using **NumPy-like idioms**.

  Arrays are **dynamically typed**, but operations on them are **compiled and fast**. Their behavior coincides with NumPy when array dimensions are regular and generalizes when they're not.



  Given an array of lists of objects with `x`, `y` fields (with nested lists in the `y` field),

  ```python
  import awkward as ak

  array = ak.Array([
      [{"x": 1.1, "y": [1]}, {"x": 2.2, "y": [1, 2]}, {"x": 3.3, "y": [1, 2, 3]}],
      [],
      [{"x": 4.4, "y": [1, 2, 3, 4]}, {"x": 5.5, "y": [1, 2, 3, 4, 5]}]
  ])
  ```

  the following slices out the `y` values, drops the first element from each inner list, and runs NumPy's `np.square` function on everything that is left:

  ```python
  output = np.square(array["y", ..., 1:])
  ```

  The result is

  ```python
  [
      [[], [4], [4, 9]],
      [],
      [[4, 9, 16], [4, 9, 16, 25]]
  ]
  ```

  The equivalent using only Python is

  ```python
  output = []
  for sublist in array:
      tmp1 = []
      for record in sublist:
          tmp2 = []
          for number in record["y"][1:]:
              tmp2.append(np.square(number))
          tmp1.append(tmp2)
      output.append(tmp1)
  ```

  The expression using Awkward Arrays is more concise, using idioms familiar from NumPy, and it also has NumPy-like performance. For a similar problem 10 million times larger than the one above (single-threaded on a 2.2 GHz processor),

     * the Awkward Array one-liner takes **1.5 seconds** to run and uses **2.1 GB** of memory,
     * the equivalent using Python lists and dicts takes **140 seconds** to run and uses **22 GB** of memory.

  Awkward Array is even faster when used in [Numba](https://numba.pydata.org/)'s JIT-compiled functions.

  See the [Getting started](https://awkward-array.org/doc/main/getting-started/index.html) documentation on [awkward-array.org](https://awkward-array.org) for an introduction, including a [no-install demo](https://awkward-array.org/doc/main/getting-started/try-awkward-array.html) you can try in your web browser.



     * View the documentation on [awkward-array.org](https://awkward-array.org/).
     * Report bugs, request features, and ask for additional documentation on [GitHub Issues](https://github.com/scikit-hep/awkward/issues).
     * If you have a "How do I...?" question, start a [GitHub Discussion](https://github.com/scikit-hep/awkward/discussions) with category "Q&A".
     * Alternatively, ask about it on [StackOverflow with the [awkward-array] tag](https://stackoverflow.com/questions/tagged/awkward-array). Be sure to include tags for any other libraries that you use, such as Pandas or PyTorch.
     * To ask questions in real time, try the Gitter [Scikit-HEP/awkward-array](https://gitter.im/Scikit-HEP/awkward-array) chat room.



  Awkward Array can be installed from [PyPI](https://pypi.org/project/awkward) using pip:

  ```bash
  pip install awkward
  ```

  The `awkward` package is pure Python, and it will download the `awkward-cpp` compiled components as a dependency. If there is no `awkward-cpp` binary package (wheel) for your platform and Python version, pip will attempt to compile it from source (which has additional dependencies, such as a C++ compiler).

  Awkward Array is also available on [conda-forge](https://conda-forge.org/docs/user/introduction.html#how-can-i-install-packages-from-conda-forge):

  ```bash
  conda install -c conda-forge awkward
  ```


pkgId: 5a939438689cc641677587a6e5b644dad05418ced5b8f9cb460d5d4ab9656ed8
name: python-awkward
arch: src
version: 2.7.1
epoch: 0
release: 1
summary: Manipulate JSON-like data with NumPy-like idioms.
url: https://github.com/scikit-hep/awkward-1.0
rpm_license: BSD-3-Clause
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-awkward-2.7.1-1.src.rpm
checksum_type: sha256
description:
  <a href="https://github.com/scikit-hep/awkward-1.0">
      <img src="https://github.com/scikit-hep/awkward-1.0/raw/main/docs-img/logo/logo-300px.png">
  </a>


  [![PyPI version](https://badge.fury.io/py/awkward.svg)](https://pypi.org/project/awkward)
  [![Conda-Forge](https://img.shields.io/conda/vn/conda-forge/awkward)](https://github.com/conda-forge/awkward-feedstock)
  [![Python 3.9‒3.13](https://img.shields.io/badge/python-3.9%E2%80%923.13-blue)](https://www.python.org)
  [![BSD-3 Clause License](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
  [![Build Test](https://github.com/scikit-hep/awkward/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/scikit-hep/awkward/actions/workflows/test.yml)

  [![Scikit-HEP](https://scikit-hep.org/assets/images/Scikit--HEP-Project-blue.svg)](https://scikit-hep.org/)
  [![NSF-1836650](https://img.shields.io/badge/NSF-1836650-blue.svg)](https://nsf.gov/awardsearch/showAward?AWD_ID=1836650)
  [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.4341376.svg)](https://doi.org/10.5281/zenodo.4341376)
  [![Documentation](https://img.shields.io/badge/docs-online-success)](https://awkward-array.org/)
  [![Gitter](https://img.shields.io/badge/chat-online-success)](https://gitter.im/Scikit-HEP/awkward-array)

  Awkward Array is a library for **nested, variable-sized data**, including arbitrary-length lists, records, mixed types, and missing data, using **NumPy-like idioms**.

  Arrays are **dynamically typed**, but operations on them are **compiled and fast**. Their behavior coincides with NumPy when array dimensions are regular and generalizes when they're not.



  Given an array of lists of objects with `x`, `y` fields (with nested lists in the `y` field),

  ```python
  import awkward as ak

  array = ak.Array([
      [{"x": 1.1, "y": [1]}, {"x": 2.2, "y": [1, 2]}, {"x": 3.3, "y": [1, 2, 3]}],
      [],
      [{"x": 4.4, "y": [1, 2, 3, 4]}, {"x": 5.5, "y": [1, 2, 3, 4, 5]}]
  ])
  ```

  the following slices out the `y` values, drops the first element from each inner list, and runs NumPy's `np.square` function on everything that is left:

  ```python
  output = np.square(array["y", ..., 1:])
  ```

  The result is

  ```python
  [
      [[], [4], [4, 9]],
      [],
      [[4, 9, 16], [4, 9, 16, 25]]
  ]
  ```

  The equivalent using only Python is

  ```python
  output = []
  for sublist in array:
      tmp1 = []
      for record in sublist:
          tmp2 = []
          for number in record["y"][1:]:
              tmp2.append(np.square(number))
          tmp1.append(tmp2)
      output.append(tmp1)
  ```

  The expression using Awkward Arrays is more concise, using idioms familiar from NumPy, and it also has NumPy-like performance. For a similar problem 10 million times larger than the one above (single-threaded on a 2.2 GHz processor),

     * the Awkward Array one-liner takes **1.5 seconds** to run and uses **2.1 GB** of memory,
     * the equivalent using Python lists and dicts takes **140 seconds** to run and uses **22 GB** of memory.

  Awkward Array is even faster when used in [Numba](https://numba.pydata.org/)'s JIT-compiled functions.

  See the [Getting started](https://awkward-array.org/doc/main/getting-started/index.html) documentation on [awkward-array.org](https://awkward-array.org) for an introduction, including a [no-install demo](https://awkward-array.org/doc/main/getting-started/try-awkward-array.html) you can try in your web browser.



     * View the documentation on [awkward-array.org](https://awkward-array.org/).
     * Report bugs, request features, and ask for additional documentation on [GitHub Issues](https://github.com/scikit-hep/awkward/issues).
     * If you have a "How do I...?" question, start a [GitHub Discussion](https://github.com/scikit-hep/awkward/discussions) with category "Q&A".
     * Alternatively, ask about it on [StackOverflow with the [awkward-array] tag](https://stackoverflow.com/questions/tagged/awkward-array). Be sure to include tags for any other libraries that you use, such as Pandas or PyTorch.
     * To ask questions in real time, try the Gitter [Scikit-HEP/awkward-array](https://gitter.im/Scikit-HEP/awkward-array) chat room.



  Awkward Array can be installed from [PyPI](https://pypi.org/project/awkward) using pip:

  ```bash
  pip install awkward
  ```

  The `awkward` package is pure Python, and it will download the `awkward-cpp` compiled components as a dependency. If there is no `awkward-cpp` binary package (wheel) for your platform and Python version, pip will attempt to compile it from source (which has additional dependencies, such as a C++ compiler).

  Awkward Array is also available on [conda-forge](https://conda-forge.org/docs/user/introduction.html#how-can-i-install-packages-from-conda-forge):

  ```bash
  conda install -c conda-forge awkward
  ```


pkgId: 348db7cd818e7f6b15a8892ec03a394f4f83e7063acb5607ed426224f7434b7c
name: python-awkward0
arch: src
version: 0.15.5
epoch: 0
release: 1
summary: Manipulate arrays of complex data structures as easily as Numpy.
url: https://github.com/scikit-hep/awkward-0.x
rpm_license: BSD 3-clause
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-awkward0-0.15.5-1.src.rpm
checksum_type: sha256
description:
  Install Awkward Array like any other Python package:
      pip install awkward0                      # maybe with sudo or --user, or in virtualenv
  The base ``awkward0`` package requires only `Numpy <https://scipy.org/install.html>`__  (1.13.1+).


pkgId: ef0c7fca7478205a5685d8af5a171c961e6ecede24f12ca68684329e2c99b72b
name: python-awkward_kaitai
arch: src
version: 0.2.0
epoch: 0
release: 1
summary: Kaitai Struct runtime for Awkward Arrays
url: https://github.com/ManasviGoyal/kaitai_struct_awkward_runtime
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-awkward_kaitai-0.2.0-1.src.rpm
checksum_type: sha256
description:
  This library building Awkward Arrays using Kaitai Struct API for Awkward using
  C++/STL.





  Here, we take an example of `animal.ksy`

  ```yaml
  meta:
    id: animal
    endian: le
    license: CC0-1.0
    ks-version: 0.8

  seq:
    - id: entry
      type: animal_entry
      repeat: eos

  types:
    animal_entry:
      seq:
        - id: str_len
          type: u1

        - id: species
          type: str
          size: str_len
          encoding: UTF-8

        - id: age
          type: u1

        - id: weight
          type: u2
  ```



  ```
  git clone --recursive https://github.com/det-lab/kaitai_struct_awkward_runtime.git
  ```

  ```
  cd kaitai_struct_awkward_runtime
  ```
  ```
  git checkout ManasviGoyal/test
  ```



  ```
  git submodule update --init
  ```

  ```
  cd kaitai_struct_compiler
  ```

  ```
  sbt package
  ```

  ```
  cd ../
  chmod u+x kaitai-struct-compiler
  ```



  ```
  ./kaitai-struct-compiler -t awkward --outdir src-animal example_data/schemas/animal.ksy
  ```


  ```
  pip install awkward-kaitai
  ```


  If python gives a warning about the installation not being on the path, in order to get the file to build you may need to run:
  ```
  echo "export PATH=$PATH:/whatever/path/python/says" >> ~/.bashrc
  ```

  ```
  awkward-kaitai-build src-animal/animal.cpp -b build
  ```
  > **Note:**
  >
  > `awkward-kaitai-build [-h] [-d DEST] [-b BUILD] file`
  >
  > options:
  >- `-h, --help`: shows help message
  >- `-d DEST, --dest DEST`: explicitly specify a destination for the build shared library.
  >- `-b BUILD, --build BUILD`: explicitly specify a build location.


  ```
  python
  ```

  ```python
  import awkward_kaitai

  animal = awkward_kaitai.Reader("./src-animal/libanimal.so") # pass the path of the shared file
  awkward_array = animal.load("example_data/data/animal.raw")

  awkward_array.to_list()
  ```



  ```python
  [{'animalA__Zentry': [{'animal_entryA__Zstr_len': 3, 'animal_entryA__Zspecies': 'cat', 'animal_entryA__Zage': 5, 'animal_entryA__Zweight': 12}, {'animal_entryA__Zstr_len': 3, 'animal_entryA__Zspecies': 'dog', 'animal_entryA__Zage': 3, 'animal_entryA__Zweight': 43}, {'animal_entryA__Zstr_len': 6, 'animal_entryA__Zspecies': 'turtle', 'animal_entryA__Zage': 10, 'animal_entryA__Zweight': 5}]}]
  ```


  1. [Describe Data to get Science-Data-Ready Tooling: Awkward as a Target for Kaitai Struct YAML](https://indico.cern.ch/event/1330797/contributions/5796564/), Advanced Computing and Analysis Techniques for Physics Research Workshop 2024, New York, US.
  2. [Awkward Target for Kaitai Struct](https://indico.cern.ch/event/1252095/contributions/5592420/), PyHEP Users Workshop 2023.


pkgId: b7bcdcb579358b16b1fe9a6ca5120cf35e00e99529078aec552a8ed5dda95c28
name: python-awpr
arch: src
version: 0.0.222
epoch: 0
release: 1
summary: Library that helps an application report progress to Argo Workflows.
url: https://github.com/fsai-dev/fsai-cli-tools
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-awpr-0.0.222-1.src.rpm
checksum_type: sha256
description:
  Library that helps an application report progress to Argo Workflows.



  ```shell
  pip install awpr
  ```


  Set the environment variable and run your application:
  `ARGO_PROGRESS_FILE=/tmp/progress.txt`

  ```shell
  from awpr.awpr import ArgoWorkflowsProgressReporter

  awpr = ArgoWorkflowsProgressReporter()
  awpr.set_total_progress(100)
  awpr.start_reporting()

  awpr.set_current_progress(20)
  awpr.set_current_progress(30)
  awpr.get_progress_percent()

  awpr.set_progress_complete()
  awpr.get_progress_percent()
  ```


pkgId: db2a5a2bfb66919ed0425ad67fa1b2e7dde79f88e29e3e9948de1634253866c2
name: python-aws-access-key-id
arch: src
version: 1.0.0
epoch: 0
release: 1
summary: Extract AWS account ID and resource type from an AWS access key ID.
url: https://github.com/nagwww/aws_access_key_id
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aws-access-key-id-1.0.0-1.src.rpm
checksum_type: sha256
description:
  A Python module for extracting the AWS Account ID and resource type from an AWS Access Key ID. This tool simplifies the process of decoding AWS Access Key IDs to identify account and resource information programmatically.



  This table lists various prefixes and their associated AWS resource types. For more details, refer to the [AWS IAM User Guide - Unique Identifiers](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-unique-ids).

  | Prefix | Resource Type |
  |--------|---------------|
  | ABIA   | AWS STS service bearer token |
  | ACCA   | Context-specific credential |
  | AGPA   | User group |
  | AIDA   | IAM user |
  | AIPA   | Amazon EC2 instance profile |
  | AKIA   | Access key |
  | ANPA   | Managed policy |
  | ANVA   | Version in a managed policy |
  | APKA   | Public key |
  | AROA   | Role |
  | ASCA   | Certificate |
  | ASIA   | Temporary (AWS STS) access key IDs use this prefix, but are unique only in combination with the secret access key and the session token. |


  * Extracts the AWS Account ID from an AWS Access Key ID.
  * Identifies the resource type (e.g., IAM user, role, access key).
  * Lightweight and easy to integrate into your projects.


  Install the package via pip:

  ``` pip install aws-access-key-id ```


  Here’s an example of how to use the module in your Python code:


  ```
  from aws_access_key_id import get_aws_account_id, get_resource_type


  aws_access_key_id = "AKIAEXAMPLE123456"


  account_id = get_aws_account_id(aws_access_key_id)
  print(f"AWS Account ID: {account_id}")


  resource_type = get_resource_type(aws_access_key_id[:4])
  print(f"Resource Type: {resource_type}")
  ```

  ``` get_aws_account_id(aws_access_key_id: str) -> str ```
  * Input: A valid AWS Access Key ID (e.g., "AKIAEXAMPLE123456").
  * Output: The corresponding 12-digit AWS Account ID.

  ``` get_resource_type(prefix: str) -> str ```
  * Input: The 4-character prefix of the AWS Access Key ID.
  * Output: The resource type (e.g., IAM user, Role, Access Key).


  The package includes a test suite to ensure all functionalities work as expected. To run the tests:

  1. Clone the repository:

  ```
  git clone https://github.com/yourusername/aws-access-key-id.git
  cd aws-access-key-id
  ```

  2. Install testing dependencies:

  ```
  pip install pytest
  ```

  3. Run the tests:
  ```
  pytest tests/
  ```


  Contributions are welcome! Follow these steps to contribute:

  1. Fork the repository.
  2. Create a feature branch:
  ```
  git checkout -b feature-name
  ```
  3. Commit your changes:
  ```
  git commit -m "Add feature or fix description"
  ```
  4. Push the branch to your fork:
  ```
  git push origin feature-name
  ```
  5 .Open a pull request.


  * **Code Style:** Follow PEP 8 guidelines.
  * **Testing:** Add test cases for new features in the tests/ directory.
  * **Documentation:** Update the README.md file for any major changes.


  The repository is organized as follows:

  ```
  aws_access_key_id/
  │
  ├── aws_access_key_id/        # Module folder
  │   ├── __init__.py           # Contains your module code
  │
  ├── tests/                    # Test cases folder
  │   ├── test_aws_access_key_id.py  # Unit tests for the module
  │
  ├── LICENSE                   # Project license file (e.g., MIT License)
  ├── README.md                 # Detailed description and usage documentation
  ├── setup.py                  # Configuration for building and packaging
  ├── pyproject.toml            # Build system configuration (PEP 517/518)
  ├── setup.cfg                 # Optional: Additional build configurations
  ```

  ```aws_access_key_id/:``` The core module containing all the functionality.

  ```tests/:``` Contains test cases to ensure the module works as expected.

  ```LICENSE:``` The license file for the project (e.g., MIT License).

  ```README.md:``` Documentation about the project, including installation and usage.

  ```setup.py:``` Configures the module for distribution and packaging.

  ```pyproject.toml:``` Specifies the build system and dependencies.

  ```setup.cfg:``` Optional configurations for packaging tools.


  This project is licensed under the MIT License.


  If you have any suggestions, issues, or feature requests, feel free to open an issue on the GitHub repository.


pkgId: 7eb72f85cd9cfb6297a1edc4e0fd8cd1c90ee3dc66d81812ec4b27f9fec9f851
name: python-aws-adfs
arch: src
version: 2.11.2
epoch: 0
release: 1
url: https://pypi.org/project/aws-adfs/
rpm_license: Python Software Foundation License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aws-adfs-2.11.2-1.src.rpm
checksum_type: sha256
summary:
  AWS CLI authenticator via ADFS - small command-line tool to authenticate via ADFS and assume chosen role

description:
      - name: "Auth sts aws"
        command: "aws-adfs login --adfs-host sts.example.com --env --stdout --role-arn arn:aws:iam::000123456789:role/ADMIN"
        register: sts_result
        environment:
          - username: "{{ ansible_user }}@example.com"
          - password: "{{ ansible_ssh_pass }}"
      - name: "Set sts facts"
        set_fact:
          sts: "{{ sts_result.stdout | from_json }}"
      - name: "List s3 Buckets"
        aws_s3_bucket_facts:
          aws_access_key: "{{ sts.AccessKeyId }}"
          aws_secret_key: "{{ sts.SecretAccessKey }}"
          security_token: "{{ sts.SessionToken }}"
          region: "us-east-1"
        register: buckets
      - name: "Print Buckets"
        debug:
          var: buckets
      ```
  * login to your adfs host by passing username and password credentials via a file
      ```
      aws-adfs login --adfs-host=your-adfs-hostname --authfile=/path/and/file/name
      ```
      Auth file should be in format of
      ```
      [profile_name]
      username = your_username
      password = your_password
      ```
  * .aws/config profile for automatically refreshing credentials
      ```
      [profile example-role-ue1]
      credential_process=aws-adfs login --region=us-east-1 --role-arn=arn:aws:iam::1234567891234:role/example-role --adfs-host=adfs.example.com --stdout
      ```
      Warning: see [AWS documentation](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sourcing-external.html) about security considerations to take when sourcing credentials with an external process.
  * help, help, help?
      <!-- AWS_HELP_START -->
      ```
      $ aws-adfs --help
      Usage: aws-adfs [OPTIONS] COMMAND [ARGS]...
      Options:
        --version      Show current tool version
        -v, --verbose  Enables debug information on stdout. By default log level is
                       set on ERROR
        --help         Show this message and exit.
      Commands:
        list   lists available profiles
        login  Authenticates an user with active directory credentials
        reset  removes stored profile
      ```
      <!-- AWS_HELP_END -->
      <!-- AWS_LIST_HELP_START -->
      ```
      $ aws-adfs list --help
      Usage: aws-adfs list [OPTIONS]
        lists available profiles
      Options:
        --help  Show this message and exit.
      ```
      <!-- AWS_LIST_HELP_END -->
      <!-- AWS_LOGIN_HELP_START -->
      ```
      $ aws-adfs login --help
      Usage: aws-adfs login [OPTIONS]
        Authenticates an user with active directory credentials
      Options:
        --profile TEXT                  AWS cli profile that will be authenticated.
                                        After successful authentication just use:
                                        aws --profile <authenticated profile>
                                        <service> ...
        --region TEXT                   The default AWS region that this script will
                                        connect to for all API calls
        --ssl-verification / --no-ssl-verification
                                        SSL certificate verification: Whether or not
                                        strict certificate verification is done,
                                        False should only be used for dev/test
        --adfs-ca-bundle TEXT           Override CA bundle for SSL certificate
                                        verification for ADFS server only.
        --adfs-host TEXT                For the first time for a profile it has to
                                        be provided, next time for the same profile
                                        it will be loaded from the stored
                                        configuration
        --output-format [json|text|table]
                                        Output format used by aws cli
        --provider-id TEXT              Provider ID, e.g urn:amazon:webservices
                                        (optional)
        --s3-signature-version [s3v4]   s3 signature version: Identifies the version
                                        of AWS Signature to support for
                                        authenticated requests. Valid values: s3v4
        --username-password-command TEXT
                                        Read username and password from the output
                                        of a shell command (expected JSON format:
                                        `{"username": "myusername", "password":
                                        "mypassword"}`)
        --mfa-token-command TEXT        Read MFA token for Symantec or RSA
                                        authenticators from the output of a shell
                                        command (expected JSON format:
                                        `{"mfa_token": "123654"}`)
        --env                           Read username, password and optionally an
                                        MFA token from environment variables
                                        (username, password and mfa_token).
        --stdin                         Read username, password from standard input
                                        separated by a newline.
        --authfile TEXT                 Read username, password from a local file
                                        (optional)
        --stdout                        Print aws_session_token in json on stdout.
        --printenv                      Output commands to set AWS_ACCESS_KEY_ID,
                                        AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN,
                                        AWS_DEFAULT_REGION environmental variables
                                        instead of saving them to the aws
                                        configuration file.
        --print-console-signin-url      Output a URL that lets users who sign in to
                                        your organization's network securely access
                                        the AWS Management Console.
        --console-role-arn TEXT         Role to assume for use in conjunction with
                                        --print-console-signin-url
        --console-external-id TEXT      External ID to pass in assume role for use
                                        in conjunction with --print-console-signin-
                                        url
        --role-arn TEXT                 Predefined role arn to selects, e.g. aws-
                                        adfs login --role-arn arn:aws:iam::123456789
                                        012:role/YourSpecialRole
        --session-duration INTEGER      Define the amount of seconds you want to
                                        establish your STS session, e.g. aws-adfs
                                        login --session-duration 3600
        --no-session-cache              Do not use AWS session cache in
                                        ~/.aws/adfs_cache/ directory.
        --assertfile TEXT               Use SAML assertion response from a local
                                        file
        --sspi / --no-sspi              Whether or not to use Kerberos SSO
                                        authentication via SSPI (Windows only,
                                        defaults to True).
        --duo-factor TEXT               Use a specific Duo factor, overriding the
                                        default one configured server side. Known
                                        Duo factors that can be used with aws-adfs
                                        are "Duo Push", "Passcode", "Phone Call" and
                                        "WebAuthn Security Key".
        --duo-device TEXT               Use a specific Duo device, overriding the
                                        default one configured server side. Depends
                                        heavily on the Duo factor used. Known Duo
                                        devices that can be used with aws-adfs are
                                        "phone1" for "Duo Push" and "Phone Call"
                                        factors. For "Passcode" and "WebAuthn
                                        Security Key" factors, it is always "None".
        --enforce-role-arn              Only allow the role passed in by --role-arn.
        --aad-verification-code TEXT    Verification code for Azure AD multi-factor
                                        authentication.
        --help                          Show this message and exit.
      ```
      <!-- AWS_LOGIN_HELP_END -->
      <!-- AWS_RESET_HELP_START -->
      ```
      $ aws-adfs reset --help
      Usage: aws-adfs reset [OPTIONS]
        removes stored profile
      Options:
        --profile TEXT  AWS cli profile that will be removed
        --help          Show this message and exit.
      ```
      <!-- AWS_RESET_HELP_END -->

  * duo-security
      `Error: Cannot begin authentication process. The error response: {"message": "Unknown authentication method.", "stat": "FAIL"}`
      Please setup preferred auth method in duo-security settings (settings' -> 'My Settings & Devices').
  * USB FIDO2 does not work in Windows Subsystem for Linux (WSL)
      `OSError: [Errno 2] No such file or directory: '/sys/class/hidraw'`
      USB devices are not accessible in WSL, please install and run `aws-adfs` on the Windows 10 host and then access the credentials in WSL from the filesystem. Example:
      ```
      export AWS_CONFIG_FILE=/mnt/c/Users/username/.aws/config
      export AWS_SHARED_CREDENTIALS_FILE=/mnt/c/Users/username/.aws/credentials
      ```
  *  FIDO2 devices are not detected on Windows 10 build 1903 or newer
      Running `aws-adfs` as Administrator is required since Windows 10 build 1903 to access FIDO2 devices, cf. https://github.com/Yubico/python-fido2/issues/55)
  * in cases of trouble with lxml please install
    ```
    sudo apt-get install python3-dev libxml2-dev libxslt1-dev zlib1g-dev
    ```
  * in cases of trouble with pykerberos please install
    ```
    sudo apt-get install python3-dev libkrb5-dev
    ```
  * in cases of trouble with OSX Sierra (obsolete OpenSSL), upgrade OpenSSL. Example:
    ```
    brew upgrade openssl
    ```
    AND add explicit directive to .bash_profile:
    ```
    export PATH=$(brew --prefix openssl)/bin:$PATH
    ```
  * only python >= 3.7 to <4.0 are supported:
    - python 2.6 is not supported
    - python 2.7 is not supported
    - python 3.2 is not supported
    - python 3.3 is not supported
    - python 3.4 is not supported
    - python 3.5 is not supported
    - python 3.6 is not supported

  * update dependencies:
  ```
  poetry update
  ```
  * run unit tests:
  ```
  poetry run pytest
  ```
  * release:
  ```
  export CHANGELOG_GITHUB_TOKEN=$(gopass show -o pins/Github/github-changelog-generator)
  ./scripts/release.sh patch # or minor, major, prepatch, preminor, premajor, prerelease, or a valid semver string
  ```

  See the [CHANGELOG.md](CHANGELOG.md) file, which is generated using [github-changelog-generator](https://github.com/github-changelog-generator/github-changelog-generator).


pkgId: 0b45343142822b7d95737fc8b33244c35e1a4648073dacfab6c73d4d98c4422d
name: python-aws-allowlister
arch: src
version: 0.2.15
epoch: 0
release: 1
summary: Generate AWS AllowList SCPs
url: https://github.com/salesforce/aws-allowlister
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aws-allowlister-0.2.15-1.src.rpm
checksum_type: sha256
description:
  ![Continuous Integration Tests](https://github.com/salesforce/aws-allowlister/workflows/continuous-integration/badge.svg)
  [![Twitter](https://img.shields.io/twitter/url/https/twitter.com/kmcquade3.svg?style=social&label=Follow%20the%20author)](https://twitter.com/kmcquade3)
  [![Downloads](https://pepy.tech/badge/aws-allowlister)](https://pepy.tech/project/aws-allowlister)

  Automatically compile an AWS Service Control Policy that ONLY allows AWS services that are compliant with your preferred compliance frameworks.

  ![](./examples/media/aws-allowlister.gif)



  AWS Service Control Policies (SCPs) allow you to control which AWS Service APIs are allowed *at the AWS Account level* - so local administrators (not even the account's root user) can perform prohibited actions in a child account.

   However, before `aws-allowlister`, it was very difficult and error-prone to create AWS AllowList SCPs - only giving accounts access to the compliant services that they need, and nothing else. Before `aws-allowlister`, the approach for creating an AllowList was:
  1. Create a spreadsheet 🙄  based on the [AWS Services in Scope](https://aws.amazon.com/compliance/services-in-scope/) documentation, which have inconsistent naming and do not list the "IAM names"
  2. Create an AllowList.json by hand, based on that spreadsheet
  3. Roll it out to Dev/Stage/Production
  4. Whoever manages that spreadsheet now magically owns the AllowList policy due to ✨tribal knowledge✨ and any updates occur by pinging this person over Slack.

  `aws-allowlister` takes care of this process for you. Instead of following the painful process above, just run the following command to generate an AWS SCP policy that meets PCI compliance:

  ```bash
  aws-allowlister generate --pci
  ```

  The policies generated by `aws-allowlister` are based off of official AWS [documentation](https://aws.amazon.com/compliance/services-in-scope/) and are automatically kept up to date when new services achieve compliance or accreditation.




  `aws-allowlister` currently supports:

  | Compliance Framework | Support Status |
  |----------------------|----------------|
  | PCI                  | ✅             |
  | SOC 1, 2, and 3      | ✅             |
  | ISO/IEC              | ✅             |
  | HIPAA BAA            | ✅             |
  | FedRAMP Moderate     | ✅             |
  | FedRAMP High         | ✅             |
  | DOD CC SRG (USA 🇺🇸)  | ✅             |
  | HITRUST              | ✅             |
  | IRAP (Australia 🇦🇺)  | ✅             |
  | C5 (Germany 🇩🇪)      | ⏱ Coming soon |
  | K-ISMS (Japan 🇯🇵)    | ⏱ Coming soon |
  | ENS High (Spain 🇪🇸)  | ⏱ Coming soon |



  In addition to creating compliance-focused SCPs, `aws-allowlister` supports the ability to include or exclude services (IAM permissions) of your choice using the `--include` or `--exclude` flags. For more details related to policy customization, view the [Arguments](#arguments) section.



  * Python Pip:

  ```bash
  pip3 install aws-allowlister
  ```

  * Homebrew:

  ```bash
  brew tap salesforce/aws-allowlister https://github.com/salesforce/aws-allowlister
  brew install aws-allowlister
  ```



  * Generate an AllowList Policy using this command:

  ```bash
  aws-allowlister generate
  ```

  By default, it allows policies at the intersection of PCI, HIPAA, SOC, ISO, FedRAMP High, and FedRAMP Moderate.

  The resulting policy will look like this:

  <details>
  <summary>Example AllowList Policy</summary>

  ```json
  {
      "Version": "2012-10-17",
      "Statement": {
          "Sid": "AllowList",
          "Effect": "Deny",
          "NotAction": [
              "account:*",
              "acm:*",
              "amplify:*",
              "amplifybackend:*",
              "apigateway:*",
              "application-autoscaling:*",
              "appstream:*",
              "appsync:*",
              "athena:*",
              "autoscaling:*",
              "aws-portal:*",
              "backup:*",
              "batch:*",
              "clouddirectory:*",
              "cloudformation:*",
              "cloudfront:*",
              "cloudhsm:*",
              "cloudtrail:*",
              "cloudwatch:*",
              "codebuild:*",
              "codecommit:*",
              "codedeploy:*",
              "codepipeline:*",
              "cognito-identity:*",
              "cognito-idp:*",
              "comprehend:*",
              "comprehendmedical:*",
              "config:*",
              "connect:*",
              "dataexchange:*",
              "datasync:*",
              "directconnect:*",
              "dms:*",
              "ds:*",
              "dynamodb:*",
              "ebs:*",
              "ec2:*",
              "ecr:*",
              "ecs:*",
              "eks:*",
              "elasticache:*",
              "elasticbeanstalk:*",
              "elasticfilesystem:*",
              "elasticmapreduce:*",
              "es:*",
              "events:*",
              "execute-api:*",
              "firehose:*",
              "fms:*",
              "forecast:*",
              "freertos:*",
              "fsx:*",
              "glacier:*",
              "globalaccelerator:*",
              "glue:*",
              "greengrass:*",
              "guardduty:*",
              "health:*",
              "iam:*",
              "inspector:*",
              "iot:*",
              "iot-device-tester:*",
              "iotdeviceadvisor:*",
              "iotevents:*",
              "iotwireless:*",
              "kafka:*",
              "kinesis:*",
              "kinesisanalytics:*",
              "kinesisvideo:*",
              "kms:*",
              "lambda:*",
              "lex:*",
              "logs:*",
              "macie2:*",
              "mediaconnect:*",
              "mediaconvert:*",
              "medialive:*",
              "mq:*",
              "neptune-db:*",
              "opsworks-cm:*",
              "organizations:*",
              "outposts:*",
              "personalize:*",
              "polly:*",
              "qldb:*",
              "quicksight:*",
              "rds:*",
              "rds-data:*",
              "rds-db:*",
              "redshift:*",
              "rekognition:*",
              "robomaker:*",
              "route53:*",
              "route53domains:*",
              "s3:*",
              "sagemaker:*",
              "secretsmanager:*",
              "securityhub:*",
              "serverlessrepo:*",
              "servicecatalog:*",
              "shield:*",
              "sms:*",
              "sms-voice:*",
              "snowball:*",
              "sns:*",
              "sqs:*",
              "ssm:*",
              "sso:*",
              "sso-directory:*",
              "states:*",
              "storagegateway:*",
              "sts:*",
              "support:*",
              "swf:*",
              "textract:*",
              "transcribe:*",
              "transfer:*",
              "translate:*",
              "waf:*",
              "waf-regional:*",
              "wafv2:*",
              "workdocs:*",
              "worklink:*",
              "workspaces:*",
              "xray:*"
          ],
          "Resource": "*"
      }
  }
  ```

  </details>



  * You can also specify the `--table` option to output the results in a Markdown Table format, as shown below:

  ```
  aws-allowlister generate --pci --table
  ```

  The results will look like this:

  <details>
  <summary>Example AllowList Policy</summary>

  ```
  | Service Prefix          | Service Name                                    |
  |-------------------------|-------------------------------------------------|
  | account                 | AWS Accounts                                    |
  | acm                     | AWS Certificate Manager                         |
  | amplify                 | AWS Amplify                                     |
  | amplifybackend          | AWS Amplify Admin                               |
  | apigateway              | Manage Amazon API Gateway                       |
  | application-autoscaling | Application Auto Scaling                        |
  | appmesh                 | AWS App Mesh                                    |
  | appstream               | Amazon AppStream 2.0                            |
  | appsync                 | AWS AppSync                                     |
  | athena                  | Amazon Athena                                   |
  | autoscaling             | Amazon EC2 Auto Scaling                         |
  | autoscaling-plans       | AWS Auto Scaling                                |
  | aws-portal              | AWS Billing                                     |
  | backup                  | AWS Backup                                      |
  | batch                   | AWS Batch                                       |
  | cassandra               | AWS Managed Apache Cassandra Service            |
  | chatbot                 | AWS Chatbot                                     |
  | clouddirectory          | Amazon Cloud Directory                          |
  | cloudformation          | AWS CloudFormation                              |
  | cloudfront              | Amazon CloudFront                               |
  | cloudhsm                | AWS CloudHSM                                    |
  | cloudtrail              | AWS CloudTrail                                  |
  | cloudwatch              | Amazon CloudWatch                               |
  | codebuild               | AWS CodeBuild                                   |
  | codecommit              | AWS CodeCommit                                  |
  | codedeploy              | AWS CodeDeploy                                  |
  | codepipeline            | AWS CodePipeline                                |
  | cognito-identity        | Amazon Cognito Identity                         |
  | cognito-idp             | Amazon Cognito User Pools                       |
  | cognito-sync            | Amazon Cognito Sync                             |
  | comprehend              | Amazon Comprehend                               |
  | comprehendmedical       | Comprehend Medical                              |
  | config                  | AWS Config                                      |
  | connect                 | Amazon Connect                                  |
  | databrew                | AWS Glue DataBrew                               |
  | dataexchange            | AWS Data Exchange                               |
  | datasync                | DataSync                                        |
  | directconnect           | AWS Direct Connect                              |
  | dms                     | AWS Database Migration Service                  |
  | ds                      | AWS Directory Service                           |
  | dynamodb                | Amazon DynamoDB                                 |
  | ebs                     | Amazon Elastic Block Store                      |
  | ec2                     | Amazon EC2                                      |
  | ec2messages             | Amazon Message Delivery Service                 |
  | ecr                     | Amazon Elastic Container Registry               |
  | ecs                     | Amazon Elastic Container Service                |
  | eks                     | Amazon Elastic Container Service for Kubernetes |
  | elasticache             | Amazon ElastiCache                              |
  | elasticbeanstalk        | AWS Elastic Beanstalk                           |
  | elasticfilesystem       | Amazon Elastic File System                      |
  | elasticloadbalancing    | Elastic Load Balancing V2                       |
  | elasticmapreduce        | Amazon Elastic MapReduce                        |
  | es                      | Amazon Elasticsearch Service                    |
  | events                  | Amazon EventBridge                              |
  | execute-api             | Amazon API Gateway                              |
  | firehose                | Amazon Kinesis Firehose                         |
  | fms                     | AWS Firewall Manager                            |
  | forecast                | Amazon Forecast                                 |
  | freertos                | Amazon FreeRTOS                                 |
  | fsx                     | Amazon FSx                                      |
  | glacier                 | Amazon Glacier                                  |
  | globalaccelerator       | AWS Global Accelerator                          |
  | glue                    | AWS Glue                                        |
  | greengrass              | AWS IoT Greengrass                              |
  | groundstation           | AWS Ground Station                              |
  | guardduty               | Amazon GuardDuty                                |
  | health                  | AWS Health APIs and Notifications               |
  | iam                     | Identity And Access Management                  |
  | importexport            | AWS Import Export Disk Service                  |
  | inspector               | Amazon Inspector                                |
  | iot                     | AWS IoT                                         |
  | iot-device-tester       | AWS IoT Device Tester                           |
  | iotdeviceadvisor        | AWS IoT Core Device Advisor                     |
  | iotevents               | AWS IoT Events                                  |
  | iotwireless             | AWS IoT Core for LoRaWAN                        |
  | kendra                  | Amazon Kendra                                   |
  | kinesis                 | Amazon Kinesis                                  |
  | kinesisanalytics        | Amazon Kinesis Analytics V2                     |
  | kinesisvideo            | Amazon Kinesis Video Streams                    |
  | kms                     | AWS Key Management Service                      |
  | lakeformation           | AWS Lake Formation                              |
  | lambda                  | AWS Lambda                                      |
  | lex                     | Amazon Lex                                      |
  | license-manager         | AWS License Manager                             |
  | logs                    | Amazon CloudWatch Logs                          |
  | macie                   | Amazon Macie Classic                            |
  | macie2                  | Amazon Macie                                    |
  | mediaconnect            | AWS Elemental MediaConnect                      |
  | mediaconvert            | AWS Elemental MediaConvert                      |
  | medialive               | AWS Elemental MediaLive                         |
  | mobiletargeting         | Amazon Pinpoint                                 |
  | mq                      | Amazon MQ                                       |
  | neptune-db              | Amazon Neptune                                  |
  | opsworks                | AWS OpsWorks                                    |
  | opsworks-cm             | AWS OpsWorks Configuration Management           |
  | organizations           | AWS Organizations                               |
  | outposts                | AWS Outposts                                    |
  | personalize             | Amazon Personalize                              |
  | polly                   | Amazon Polly                                    |
  | qldb                    | Amazon QLDB                                     |
  | quicksight              | Amazon QuickSight                               |
  | rds                     | Amazon RDS                                      |
  | rds-data                | Amazon RDS Data API                             |
  | rds-db                  | Amazon RDS IAM Authentication                   |
  | redshift                | Amazon Redshift                                 |
  | rekognition             | Amazon Rekognition                              |
  | resource-groups         | AWS Resource Groups                             |
  | robomaker               | AWS RoboMaker                                   |
  | route53                 | Amazon Route 53                                 |
  | route53domains          | Amazon Route53 Domains                          |
  | s3                      | Amazon S3                                       |
  | sagemaker               | Amazon SageMaker                                |
  | sdb                     | Amazon SimpleDB                                 |
  | secretsmanager          | AWS Secrets Manager                             |
  | securityhub             | AWS Security Hub                                |
  | serverlessrepo          | AWS Serverless Application Repository           |
  | servicecatalog          | AWS Service Catalog                             |
  | servicediscovery        | AWS Cloud Map                                   |
  | shield                  | AWS Shield                                      |
  | sms                     | AWS Server Migration Service                    |
  | sms-voice               | Amazon Pinpoint SMS and Voice Service           |
  | snowball                | AWS Snowball                                    |
  | sns                     | Amazon SNS                                      |
  | sqs                     | Amazon SQS                                      |
  | ssm                     | AWS Systems Manager                             |
  | ssmmessages             | Amazon Session Manager Message Gateway Service  |
  | states                  | AWS Step Functions                              |
  | storagegateway          | Amazon Storage Gateway                          |
  | sts                     | AWS Security Token Service                      |
  | support                 | AWS Support                                     |
  | swf                     | Amazon Simple Workflow Service                  |
  | textract                | Amazon Textract                                 |
  | timestream              | AWS Timestream                                  |
  | transcribe              | Amazon Transcribe                               |
  | transfer                | AWS Transfer for SFTP                           |
  | translate               | Amazon Translate                                |
  | trustedadvisor          | AWS Trusted Advisor                             |
  | waf                     | AWS WAF                                         |
  | waf-regional            | AWS WAF Regional                                |
  | wafv2                   | AWS WAF V2                                      |
  | workdocs                | Amazon WorkDocs                                 |
  | worklink                | Amazon WorkLink                                 |
  | workspaces              | Amazon WorkSpaces                               |
  | xray                    | AWS X-Ray                                       |
  ```

  </details>



  * Let's say you want to know which services are **excluded**, not just the ones that are **included**. In this case, you can specify the `--excluded-table` option to output the list of services that are not allowed.

  ```
  aws-allowlister generate --pci --excluded-table
  ```

  The results will look like this:


  <details>
  <summary>Example AllowList Policy</summary>

  ```
  | Service Prefix                | Service Name                                                                                                                                                                           |
  |-------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
  | a4b                           | [Alexa for Business](https://docs.aws.amazon.com/service-authorization/latest/reference/list_alexaforbusiness.html)                                                                    |
  | acm-pca                       | [AWS Certificate Manager Private Certificate Authority](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awscertificatemanagerprivatecertificateauthority.html) |
  | activate                      | [AWS Activate](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsactivate.html)                                                                               |
  | airflow                       | [Amazon Managed Workflows for Apache Airflow](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonmanagedworkflowsforapacheairflow.html)                     |
  | app-integrations              | [Amazon AppIntegrations](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonappintegrations.html)                                                           |
  | appconfig                     | [AWS AppConfig](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsappconfig.html)                                                                             |
  | appflow                       | [Amazon AppFlow](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonappflow.html)                                                                           |
  | applicationinsights           | [CloudWatch Application Insights](https://docs.aws.amazon.com/service-authorization/latest/reference/list_cloudwatchapplicationinsights.html)                                          |
  | appmesh                       | [AWS App Mesh](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsappmesh.html)                                                                                |
  | appmesh-preview               | [AWS App Mesh Preview](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsappmeshpreview.html)                                                                 |
  | aps                           | [Amazon Managed Service for Prometheus](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonmanagedserviceforprometheus.html)                                |
  | arsenal                       | [Application Discovery Arsenal](https://docs.aws.amazon.com/service-authorization/latest/reference/list_applicationdiscoveryarsenal.html)                                              |
  | artifact                      | [AWS Artifact](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsartifact.html)                                                                               |
  | auditmanager                  | [AWS Audit Manager](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsauditmanager.html)                                                                      |
  | aws-marketplace               | [AWS Private Marketplace](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsprivatemarketplace.html)                                                          |
  | aws-marketplace-management    | [AWS Marketplace Management Portal](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsmarketplacemanagementportal.html)                                       |
  | awsconnector                  | [AWS Connector Service](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsconnectorservice.html)                                                              |
  | braket                        | [Amazon Braket](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonbraket.html)                                                                             |
  | budgets                       | [AWS Budget Service](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsbudgetservice.html)                                                                    |
  | cassandra                     | [AWS Managed Apache Cassandra Service](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsmanagedapachecassandraservice.html)                                  |
  | ce                            | [AWS Cost Explorer Service](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awscostexplorerservice.html)                                                       |
  | chatbot                       | [AWS Chatbot](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awschatbot.html)                                                                                 |
  | chime                         | [Amazon Chime](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonchime.html)                                                                               |
  | cloud9                        | [AWS Cloud9](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awscloud9.html)                                                                                   |
  | cloudsearch                   | [Amazon CloudSearch](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazoncloudsearch.html)                                                                   |
  | cloudshell                    | [AWS CloudShell](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awscloudshell.html)                                                                           |
  | codeartifact                  | [AWS CodeArtifact](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awscodeartifact.html)                                                                       |
  | codeguru                      | [Amazon CodeGuru](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazoncodeguru.html)                                                                         |
  | codeguru-profiler             | [Amazon CodeGuru Profiler](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazoncodeguruprofiler.html)                                                        |
  | codeguru-reviewer             | [Amazon CodeGuru Reviewer](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazoncodegurureviewer.html)                                                        |
  | codestar                      | [AWS CodeStar](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awscodestar.html)                                                                               |
  | codestar-connections          | [AWS CodeStar Connections](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awscodestarconnections.html)                                                        |
  | codestar-notifications        | [AWS CodeStar Notifications](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awscodestarnotifications.html)                                                    |
  | compute-optimizer             | [Compute Optimizer](https://docs.aws.amazon.com/service-authorization/latest/reference/list_computeoptimizer.html)                                                                     |
  | cur                           | [AWS Cost and Usage Report](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awscostandusagereport.html)                                                        |
  | databrew                      | [AWS Glue DataBrew](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsgluedatabrew.html)                                                                      |
  | datapipeline                  | [Data Pipeline](https://docs.aws.amazon.com/service-authorization/latest/reference/list_datapipeline.html)                                                                             |
  | dax                           | [Amazon DynamoDB Accelerator (DAX)](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazondynamodbacceleratordax.html)                                         |
  | dbqms                         | [Database Query Metadata Service](https://docs.aws.amazon.com/service-authorization/latest/reference/list_databasequerymetadataservice.html)                                           |
  | deepcomposer                  | [AWS DeepComposer](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsdeepcomposer.html)                                                                       |
  | deeplens                      | [AWS DeepLens](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsdeeplens.html)                                                                               |
  | deepracer                     | [AWS DeepRacer](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsdeepracer.html)                                                                             |
  | detective                     | [Amazon Detective](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazondetective.html)                                                                       |
  | devicefarm                    | [AWS Device Farm](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsdevicefarm.html)                                                                          |
  | devops-guru                   | [Amazon DevOps Guru](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazondevopsguru.html)                                                                    |
  | discovery                     | [Application Discovery](https://docs.aws.amazon.com/service-authorization/latest/reference/list_applicationdiscovery.html)                                                             |
  | dlm                           | [Amazon Data Lifecycle Manager](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazondatalifecyclemanager.html)                                               |
  | ec2-instance-connect          | [Amazon EC2 Instance Connect](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonec2instanceconnect.html)                                                   |
  | ecr-public                    | [Amazon Elastic Container Registry Public](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonelasticcontainerregistrypublic.html)                          |
  | elastic-inference             | [Amazon Elastic Inference](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonelasticinference.html)                                                        |
  | elastictranscoder             | [Amazon Elastic Transcoder](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonelastictranscoder.html)                                                      |
  | elemental-activations         | [Elemental Activations](https://docs.aws.amazon.com/service-authorization/latest/reference/list_elementalactivations.html)                                                             |
  | elemental-appliances-software | [AWS Elemental Appliances and Software](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awselementalappliancesandsoftware.html)                                |
  | elemental-support-cases       | [Elemental Support Cases](https://docs.aws.amazon.com/service-authorization/latest/reference/list_elementalsupportcases.html)                                                          |
  | elemental-support-content     | [Elemental Support Content](https://docs.aws.amazon.com/service-authorization/latest/reference/list_elementalsupportcontent.html)                                                      |
  | emr-containers                | [Amazon EMR on EKS (EMR Containers)](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonemroneksemrcontainers.html)                                         |
  | fis                           | [AWS Fault Injection Simulator](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsfaultinjectionsimulator.html)                                               |
  | frauddetector                 | [Amazon Fraud Detector](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonfrauddetector.html)                                                              |
  | gamelift                      | [Amazon GameLift](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazongamelift.html)                                                                         |
  | geo                           | [Amazon Location](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonlocation.html)                                                                         |
  | grafana                       | [Amazon Managed Service for Grafana](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonmanagedserviceforgrafana.html)                                      |
  | groundstation                 | [AWS Ground Station](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsgroundstation.html)                                                                    |
  | groundtruthlabeling           | [Amazon GroundTruth Labeling](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazongroundtruthlabeling.html)                                                  |
  | healthlake                    | [Amazon HealthLake](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonhealthlake.html)                                                                     |
  | honeycode                     | [Amazon Honeycode](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonhoneycode.html)                                                                       |
  | identitystore                 | [AWS Identity Store](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsidentitystore.html)                                                                    |
  | imagebuilder                  | [Amazon EC2 Image Builder](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonec2imagebuilder.html)                                                         |
  | iot1click                     | [AWS IoT 1-Click](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot1-click.html)                                                                          |
  | iotanalytics                  | [AWS IoT Analytics](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiotanalytics.html)                                                                      |
  | iotfleethub                   | [Fleet Hub for AWS IoT Device Management](https://docs.aws.amazon.com/service-authorization/latest/reference/list_fleethubforawsiotdevicemanagement.html)                              |
  | iotsitewise                   | [AWS IoT SiteWise](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiotsitewise.html)                                                                        |
  | iotthingsgraph                | [AWS IoT Things Graph](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiotthingsgraph.html)                                                                 |
  | iq                            | [AWS IQ](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiq.html)                                                                                           |
  | iq-permission                 | [AWS IQ Permissions](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiqpermissions.html)                                                                    |
  | ivs                           | [Amazon Interactive Video Service](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazoninteractivevideoservice.html)                                         |
  | kendra                        | [Amazon Kendra](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonkendra.html)                                                                             |
  | launchwizard                  | [Launch Wizard](https://docs.aws.amazon.com/service-authorization/latest/reference/list_launchwizard.html)                                                                             |
  | lex                           | [Amazon Lex V2](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonlexv2.html)                                                                              |
  | license-manager               | [AWS License Manager](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awslicensemanager.html)                                                                  |
  | lightsail                     | [Amazon Lightsail](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonlightsail.html)                                                                       |
  | lookoutequipment              | [Amazon Lookout for Equipment](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonlookoutforequipment.html)                                                 |
  | lookoutmetrics                | [Amazon Lookout for Metrics](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonlookoutformetrics.html)                                                     |
  | lookoutvision                 | [Amazon Lookout for Vision](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonlookoutforvision.html)                                                       |
  | machinelearning               | [Amazon Machine Learning](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonmachinelearning.html)                                                          |
  | managedblockchain             | [Amazon Managed Blockchain](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonmanagedblockchain.html)                                                      |
  | marketplacecommerceanalytics  | [AWS Marketplace Commerce Analytics Service](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsmarketplacecommerceanalyticsservice.html)                      |
  | mechanicalturk                | [Amazon Mechanical Turk](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonmechanicalturk.html)                                                            |
  | mediapackage                  | [AWS Elemental MediaPackage](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awselementalmediapackage.html)                                                    |
  | mediapackage-vod              | [AWS Elemental MediaPackage VOD](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awselementalmediapackagevod.html)                                             |
  | mediastore                    | [AWS Elemental MediaStore](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awselementalmediastore.html)                                                        |
  | mediatailor                   | [AWS Elemental MediaTailor](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awselementalmediatailor.html)                                                      |
  | mgh                           | [AWS Migration Hub](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsmigrationhub.html)                                                                      |
  | mobileanalytics               | [Amazon Mobile Analytics](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonmobileanalytics.html)                                                          |
  | mobilehub                     | [AWS Mobile Hub](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsmobilehub.html)                                                                            |
  | monitron                      | [Amazon Monitron](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonmonitron.html)                                                                         |
  | network-firewall              | [AWS Network Firewall](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsnetworkfirewall.html)                                                                |
  | networkmanager                | [Network Manager](https://docs.aws.amazon.com/service-authorization/latest/reference/list_networkmanager.html)                                                                         |
  | panorama                      | [AWS Panorama](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awspanorama.html)                                                                               |
  | pi                            | [AWS Performance Insights](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsperformanceinsights.html)                                                        |
  | pricing                       | [AWS Price List](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awspricelist.html)                                                                            |
  | profile                       | [Amazon Connect Customer Profiles](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonconnectcustomerprofiles.html)                                         |
  | proton                        | [AWS Proton](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsproton.html)                                                                                   |
  | purchase-orders               | [AWS Purchase Orders Console](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awspurchaseordersconsole.html)                                                   |
  | ram                           | [AWS Resource Access Manager](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsresourceaccessmanager.html)                                                   |
  | redshift-data                 | [Amazon Redshift Data API](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonredshiftdataapi.html)                                                         |
  | resource-explorer             | [AWS Tag Editor](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awstageditor.html)                                                                            |
  | resource-groups               | [AWS Resource Groups](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsresourcegroups.html)                                                                  |
  | s3-object-lambda              | [Amazon S3 Object Lambda](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazons3objectlambda.html)                                                           |
  | s3-outposts                   | [Amazon S3 on Outposts](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazons3onoutposts.html)                                                               |
  | savingsplans                  | [AWS Savings Plans](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssavingsplans.html)                                                                      |
  | schemas                       | [Amazon EventBridge Schemas](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazoneventbridgeschemas.html)                                                    |
  | sdb                           | [Amazon SimpleDB](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonsimpledb.html)                                                                         |
  | servicediscovery              | [AWS Cloud Map](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awscloudmap.html)                                                                              |
  | servicequotas                 | [Service Quotas](https://docs.aws.amazon.com/service-authorization/latest/reference/list_servicequotas.html)                                                                           |
  | ses                           | [Amazon Simple Email Service v2](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonsimpleemailservicev2.html)                                              |
  | signer                        | [AWS Signer](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssigner.html)                                                                                   |
  | sms-voice                     | [Amazon Pinpoint SMS and Voice Service](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonpinpointsmsandvoiceservice.html)                                 |
  | sso                           | [AWS SSO](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssso.html)                                                                                         |
  | sso-directory                 | [AWS SSO Directory](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsssodirectory.html)                                                                      |
  | sumerian                      | [Amazon Sumerian](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonsumerian.html)                                                                         |
  | synthetics                    | [Amazon CloudWatch Synthetics](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazoncloudwatchsynthetics.html)                                                |
  | tag                           | [Amazon Resource Group Tagging API](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonresourcegrouptaggingapi.html)                                        |
  | timestream                    | [AWS Timestream](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awstimestream.html)                                                                           |
  | tiros                         | [AWS Tiros](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awstiros.html)                                                                                     |
  | trustedadvisor                | [AWS Trusted Advisor](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awstrustedadvisor.html)                                                                  |
  | wam                           | [Amazon WorkSpaces Application Manager](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonworkspacesapplicationmanager.html)                               |
  | wellarchitected               | [AWS Well-Architected Tool](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awswell-architectedtool.html)                                                      |
  | workmail                      | [Amazon WorkMail](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonworkmail.html)                                                                         |
  | workmailmessageflow           | [Amazon WorkMail Message Flow](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonworkmailmessageflow.html)                                                 |
  ```

  </details>



  * You can also specify the `--json-list` option to output the results in JSON, as shown below:

  ```
  aws-allowlister generate --pci --json-list
  ```

  The results will look like this:

  <details>
  <summary>Example AllowList JSON list</summary>

  ```
  {
    "access-analyzer": {
      "service_name": "IAM Access Analyzer",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_iamaccessanalyzer.html"
    },
    "account": {
      "service_name": "AWS Accounts",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsaccounts.html"
    },
    "acm": {
      "service_name": "AWS Certificate Manager",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awscertificatemanager.html"
    },
    "amplify": {
      "service_name": "AWS Amplify",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsamplify.html"
    },
    "amplifybackend": {
      "service_name": "AWS Amplify Admin",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsamplifyadmin.html"
    },
    "apigateway": {
      "service_name": "Manage Amazon API Gateway",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_manageamazonapigateway.html"
    },
    "application-autoscaling": {
      "service_name": "Application Auto Scaling",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_applicationautoscaling.html"
    },
    "appmesh": {
      "service_name": "AWS App Mesh",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsappmesh.html"
    },
    "appstream": {
      "service_name": "Amazon AppStream 2.0",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonappstream2.0.html"
    },
    "appsync": {
      "service_name": "AWS AppSync",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsappsync.html"
    },
    "athena": {
      "service_name": "Amazon Athena",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonathena.html"
    },
    "autoscaling": {
      "service_name": "Amazon EC2 Auto Scaling",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonec2autoscaling.html"
    },
    "autoscaling-plans": {
      "service_name": "AWS Auto Scaling",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsautoscaling.html"
    },
    "aws-portal": {
      "service_name": "AWS Billing",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsbilling.html"
    },
    "backup": {
      "service_name": "AWS Backup",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsbackup.html"
    },
    "backup-storage": {
      "service_name": "AWS Backup storage",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsbackupstorage.html"
    },
    "batch": {
      "service_name": "AWS Batch",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsbatch.html"
    },
    "cassandra": {
      "service_name": "AWS Managed Apache Cassandra Service",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsmanagedapachecassandraservice.html"
    },
    "chatbot": {
      "service_name": "AWS Chatbot",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awschatbot.html"
    },
    "clouddirectory": {
      "service_name": "Amazon Cloud Directory",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonclouddirectory.html"
    },
    "cloudformation": {
      "service_name": "AWS CloudFormation",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awscloudformation.html"
    },
    "cloudfront": {
      "service_name": "Amazon CloudFront",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazoncloudfront.html"
    },
    "cloudhsm": {
      "service_name": "AWS CloudHSM",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awscloudhsm.html"
    },
    "cloudtrail": {
      "service_name": "AWS CloudTrail",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awscloudtrail.html"
    },
    "cloudwatch": {
      "service_name": "Amazon CloudWatch",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazoncloudwatch.html"
    },
    "codebuild": {
      "service_name": "AWS CodeBuild",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awscodebuild.html"
    },
    "codecommit": {
      "service_name": "AWS CodeCommit",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awscodecommit.html"
    },
    "codedeploy": {
      "service_name": "AWS CodeDeploy",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awscodedeploy.html"
    },
    "codepipeline": {
      "service_name": "AWS CodePipeline",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awscodepipeline.html"
    },
    "cognito-identity": {
      "service_name": "Amazon Cognito Identity",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazoncognitoidentity.html"
    },
    "cognito-idp": {
      "service_name": "Amazon Cognito User Pools",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazoncognitouserpools.html"
    },
    "cognito-sync": {
      "service_name": "Amazon Cognito Sync",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazoncognitosync.html"
    },
    "comprehend": {
      "service_name": "Amazon Comprehend",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazoncomprehend.html"
    },
    "comprehendmedical": {
      "service_name": "Comprehend Medical",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_comprehendmedical.html"
    },
    "config": {
      "service_name": "AWS Config",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsconfig.html"
    },
    "connect": {
      "service_name": "Amazon Connect",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonconnect.html"
    },
    "databrew": {
      "service_name": "AWS Glue DataBrew",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsgluedatabrew.html"
    },
    "dataexchange": {
      "service_name": "AWS Data Exchange",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsdataexchange.html"
    },
    "datasync": {
      "service_name": "DataSync",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_datasync.html"
    },
    "directconnect": {
      "service_name": "AWS Direct Connect",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsdirectconnect.html"
    },
    "dms": {
      "service_name": "AWS Database Migration Service",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsdatabasemigrationservice.html"
    },
    "ds": {
      "service_name": "AWS Directory Service",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsdirectoryservice.html"
    },
    "dynamodb": {
      "service_name": "Amazon DynamoDB",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazondynamodb.html"
    },
    "ebs": {
      "service_name": "Amazon Elastic Block Store",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonelasticblockstore.html"
    },
    "ec2": {
      "service_name": "Amazon EC2",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonec2.html"
    },
    "ec2messages": {
      "service_name": "Amazon Message Delivery Service",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonmessagedeliveryservice.html"
    },
    "ecr": {
      "service_name": "Amazon Elastic Container Registry",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonelasticcontainerregistry.html"
    },
    "ecs": {
      "service_name": "Amazon Elastic Container Service",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonelasticcontainerservice.html"
    },
    "eks": {
      "service_name": "Amazon Elastic Kubernetes Service",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonelastickubernetesservice.html"
    },
    "elasticache": {
      "service_name": "Amazon ElastiCache",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonelasticache.html"
    },
    "elasticbeanstalk": {
      "service_name": "AWS Elastic Beanstalk",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awselasticbeanstalk.html"
    },
    "elasticfilesystem": {
      "service_name": "Amazon Elastic File System",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonelasticfilesystem.html"
    },
    "elasticloadbalancing": {
      "service_name": "Elastic Load Balancing V2",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_elasticloadbalancingv2.html"
    },
    "elasticmapreduce": {
      "service_name": "Amazon Elastic MapReduce",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonelasticmapreduce.html"
    },
    "es": {
      "service_name": "Amazon Elasticsearch Service",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonelasticsearchservice.html"
    },
    "events": {
      "service_name": "Amazon EventBridge",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazoneventbridge.html"
    },
    "execute-api": {
      "service_name": "Amazon API Gateway",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonapigateway.html"
    },
    "firehose": {
      "service_name": "Amazon Kinesis Firehose",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonkinesisfirehose.html"
    },
    "fms": {
      "service_name": "AWS Firewall Manager",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsfirewallmanager.html"
    },
    "forecast": {
      "service_name": "Amazon Forecast",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonforecast.html"
    },
    "freertos": {
      "service_name": "Amazon FreeRTOS",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonfreertos.html"
    },
    "fsx": {
      "service_name": "Amazon FSx",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonfsx.html"
    },
    "glacier": {
      "service_name": "Amazon Glacier",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonglacier.html"
    },
    "globalaccelerator": {
      "service_name": "AWS Global Accelerator",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsglobalaccelerator.html"
    },
    "glue": {
      "service_name": "AWS Glue",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsglue.html"
    },
    "greengrass": {
      "service_name": "AWS IoT Greengrass V2",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiotgreengrassv2.html"
    },
    "groundstation": {
      "service_name": "AWS Ground Station",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsgroundstation.html"
    },
    "guardduty": {
      "service_name": "Amazon GuardDuty",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonguardduty.html"
    },
    "health": {
      "service_name": "AWS Health APIs and Notifications",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awshealthapisandnotifications.html"
    },
    "iam": {
      "service_name": "Identity And Access Management",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_identityandaccessmanagement.html"
    },
    "importexport": {
      "service_name": "AWS Import Export Disk Service",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsimportexportdiskservice.html"
    },
    "inspector": {
      "service_name": "Amazon Inspector",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazoninspector.html"
    },
    "iot": {
      "service_name": "AWS IoT",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html"
    },
    "iot-device-tester": {
      "service_name": "AWS IoT Device Tester",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiotdevicetester.html"
    },
    "iotdeviceadvisor": {
      "service_name": "AWS IoT Core Device Advisor",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiotcoredeviceadvisor.html"
    },
    "iotevents": {
      "service_name": "AWS IoT Events",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiotevents.html"
    },
    "iotwireless": {
      "service_name": "AWS IoT Core for LoRaWAN",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiotcoreforlorawan.html"
    },
    "kafka": {
      "service_name": "Amazon Managed Streaming for Kafka",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonmanagedstreamingforkafka.html"
    },
    "kendra": {
      "service_name": "Amazon Kendra",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonkendra.html"
    },
    "kinesis": {
      "service_name": "Amazon Kinesis",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonkinesis.html"
    },
    "kinesisanalytics": {
      "service_name": "Amazon Kinesis Analytics V2",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonkinesisanalyticsv2.html"
    },
    "kinesisvideo": {
      "service_name": "Amazon Kinesis Video Streams",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonkinesisvideostreams.html"
    },
    "kms": {
      "service_name": "AWS Key Management Service",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awskeymanagementservice.html"
    },
    "lakeformation": {
      "service_name": "AWS Lake Formation",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awslakeformation.html"
    },
    "lambda": {
      "service_name": "AWS Lambda",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awslambda.html"
    },
    "lex": {
      "service_name": "Amazon Lex V2",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonlexv2.html"
    },
    "license-manager": {
      "service_name": "AWS License Manager",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awslicensemanager.html"
    },
    "logs": {
      "service_name": "Amazon CloudWatch Logs",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazoncloudwatchlogs.html"
    },
    "macie": {
      "service_name": "Amazon Macie Classic",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonmacieclassic.html"
    },
    "macie2": {
      "service_name": "Amazon Macie",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonmacie.html"
    },
    "mediaconnect": {
      "service_name": "AWS Elemental MediaConnect",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awselementalmediaconnect.html"
    },
    "mediaconvert": {
      "service_name": "AWS Elemental MediaConvert",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awselementalmediaconvert.html"
    },
    "medialive": {
      "service_name": "AWS Elemental MediaLive",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awselementalmedialive.html"
    },
    "mobiletargeting": {
      "service_name": "Amazon Pinpoint",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonpinpoint.html"
    },
    "mq": {
      "service_name": "Amazon MQ",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonmq.html"
    },
    "neptune-db": {
      "service_name": "Amazon Neptune",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonneptune.html"
    },
    "opsworks": {
      "service_name": "AWS OpsWorks",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsopsworks.html"
    },
    "opsworks-cm": {
      "service_name": "AWS OpsWorks Configuration Management",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsopsworksconfigurationmanagement.html"
    },
    "organizations": {
      "service_name": "AWS Organizations",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsorganizations.html"
    },
    "outposts": {
      "service_name": "AWS Outposts",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsoutposts.html"
    },
    "personalize": {
      "service_name": "Amazon Personalize",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonpersonalize.html"
    },
    "polly": {
      "service_name": "Amazon Polly",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonpolly.html"
    },
    "qldb": {
      "service_name": "Amazon QLDB",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonqldb.html"
    },
    "quicksight": {
      "service_name": "Amazon QuickSight",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonquicksight.html"
    },
    "rds": {
      "service_name": "Amazon RDS",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonrds.html"
    },
    "rds-data": {
      "service_name": "Amazon RDS Data API",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonrdsdataapi.html"
    },
    "rds-db": {
      "service_name": "Amazon RDS IAM Authentication",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonrdsiamauthentication.html"
    },
    "redshift": {
      "service_name": "Amazon Redshift",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonredshift.html"
    },
    "rekognition": {
      "service_name": "Amazon Rekognition",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonrekognition.html"
    },
    "resource-groups": {
      "service_name": "AWS Resource Groups",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsresourcegroups.html"
    },
    "robomaker": {
      "service_name": "AWS RoboMaker",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsrobomaker.html"
    },
    "route53": {
      "service_name": "Amazon Route 53",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonroute53.html"
    },
    "route53domains": {
      "service_name": "Amazon Route 53 Domains",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonroute53domains.html"
    },
    "route53resolver": {
      "service_name": "Amazon Route 53 Resolver",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonroute53resolver.html"
    },
    "s3": {
      "service_name": "Amazon S3",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazons3.html"
    },
    "sagemaker": {
      "service_name": "Amazon SageMaker",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonsagemaker.html"
    },
    "sdb": {
      "service_name": "Amazon SimpleDB",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonsimpledb.html"
    },
    "secretsmanager": {
      "service_name": "AWS Secrets Manager",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssecretsmanager.html"
    },
    "securityhub": {
      "service_name": "AWS Security Hub",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssecurityhub.html"
    },
    "serverlessrepo": {
      "service_name": "AWS Serverless Application Repository",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsserverlessapplicationrepository.html"
    },
    "servicecatalog": {
      "service_name": "AWS Service Catalog",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsservicecatalog.html"
    },
    "servicediscovery": {
      "service_name": "AWS Cloud Map",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awscloudmap.html"
    },
    "shield": {
      "service_name": "AWS Shield",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsshield.html"
    },
    "sms": {
      "service_name": "AWS Server Migration Service",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsservermigrationservice.html"
    },
    "sms-voice": {
      "service_name": "Amazon Pinpoint SMS and Voice Service",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonpinpointsmsandvoiceservice.html"
    },
    "snowball": {
      "service_name": "AWS Snowball",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssnowball.html"
    },
    "sns": {
      "service_name": "Amazon SNS",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonsns.html"
    },
    "sqs": {
      "service_name": "Amazon SQS",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonsqs.html"
    },
    "ssm": {
      "service_name": "AWS Systems Manager",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssystemsmanager.html"
    },
    "ssmmessages": {
      "service_name": "Amazon Session Manager Message Gateway Service",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonsessionmanagermessagegatewayservice.html"
    },
    "states": {
      "service_name": "AWS Step Functions",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsstepfunctions.html"
    },
    "storagegateway": {
      "service_name": "Amazon Storage Gateway",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonstoragegateway.html"
    },
    "sts": {
      "service_name": "AWS Security Token Service",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssecuritytokenservice.html"
    },
    "support": {
      "service_name": "AWS Support",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssupport.html"
    },
    "swf": {
      "service_name": "Amazon Simple Workflow Service",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonsimpleworkflowservice.html"
    },
    "textract": {
      "service_name": "Amazon Textract",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazontextract.html"
    },
    "timestream": {
      "service_name": "AWS Timestream",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awstimestream.html"
    },
    "transcribe": {
      "service_name": "Amazon Transcribe",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazontranscribe.html"
    },
    "transfer": {
      "service_name": "AWS Transfer for SFTP",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awstransferforsftp.html"
    },
    "translate": {
      "service_name": "Amazon Translate",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazontranslate.html"
    },
    "trustedadvisor": {
      "service_name": "AWS Trusted Advisor",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awstrustedadvisor.html"
    },
    "waf": {
      "service_name": "AWS WAF",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awswaf.html"
    },
    "waf-regional": {
      "service_name": "AWS WAF Regional",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awswafregional.html"
    },
    "wafv2": {
      "service_name": "AWS WAF V2",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awswafv2.html"
    },
    "workdocs": {
      "service_name": "Amazon WorkDocs",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonworkdocs.html"
    },
    "worklink": {
      "service_name": "Amazon WorkLink",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonworklink.html"
    },
    "workspaces": {
      "service_name": "Amazon WorkSpaces",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonworkspaces.html"
    },
    "xray": {
      "service_name": "AWS X-Ray",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsx-ray.html"
    }
  }
  ```

  </details>



  * As with the Markdown Table output, you can specify the `--excluded-json-list` option to output the list of excluded services in JSON, as shown below:

  ```
  aws-allowlister generate --pci --excluded-json-list
  ```

  The results will look like this:

  <details>
  <summary>Example AllowList JSON list</summary>

  ```
  {
    "a4b": {
      "service_name": "Alexa for Business",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_alexaforbusiness.html"
    },
    "acm-pca": {
      "service_name": "AWS Certificate Manager Private Certificate Authority",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awscertificatemanagerprivatecertificateauthority.html"
    },
    "activate": {
      "service_name": "AWS Activate",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsactivate.html"
    },
    "airflow": {
      "service_name": "Amazon Managed Workflows for Apache Airflow",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonmanagedworkflowsforapacheairflow.html"
    },
    "app-integrations": {
      "service_name": "Amazon AppIntegrations",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonappintegrations.html"
    },
    "appconfig": {
      "service_name": "AWS AppConfig",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsappconfig.html"
    },
    "appflow": {
      "service_name": "Amazon AppFlow",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonappflow.html"
    },
    "application-cost-profiler": {
      "service_name": "AWS Application Cost Profiler Service",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsapplicationcostprofilerservice.html"
    },
    "applicationinsights": {
      "service_name": "CloudWatch Application Insights",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_cloudwatchapplicationinsights.html"
    },
    "appmesh-preview": {
      "service_name": "AWS App Mesh Preview",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsappmeshpreview.html"
    },
    "apprunner": {
      "service_name": "AWS App Runner",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsapprunner.html"
    },
    "aps": {
      "service_name": "Amazon Managed Service for Prometheus",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonmanagedserviceforprometheus.html"
    },
    "arsenal": {
      "service_name": "Application Discovery Arsenal",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_applicationdiscoveryarsenal.html"
    },
    "artifact": {
      "service_name": "AWS Artifact",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsartifact.html"
    },
    "auditmanager": {
      "service_name": "AWS Audit Manager",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsauditmanager.html"
    },
    "aws-marketplace": {
      "service_name": "AWS Private Marketplace",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsprivatemarketplace.html"
    },
    "aws-marketplace-management": {
      "service_name": "AWS Marketplace Management Portal",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsmarketplacemanagementportal.html"
    },
    "awsconnector": {
      "service_name": "AWS Connector Service",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsconnectorservice.html"
    },
    "braket": {
      "service_name": "Amazon Braket",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonbraket.html"
    },
    "budgets": {
      "service_name": "AWS Budget Service",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsbudgetservice.html"
    },
    "ce": {
      "service_name": "AWS Cost Explorer Service",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awscostexplorerservice.html"
    },
    "chime": {
      "service_name": "Amazon Chime",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonchime.html"
    },
    "cloud9": {
      "service_name": "AWS Cloud9",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awscloud9.html"
    },
    "cloudsearch": {
      "service_name": "Amazon CloudSearch",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazoncloudsearch.html"
    },
    "cloudshell": {
      "service_name": "AWS CloudShell",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awscloudshell.html"
    },
    "codeartifact": {
      "service_name": "AWS CodeArtifact",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awscodeartifact.html"
    },
    "codeguru": {
      "service_name": "Amazon CodeGuru",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazoncodeguru.html"
    },
    "codeguru-profiler": {
      "service_name": "Amazon CodeGuru Profiler",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazoncodeguruprofiler.html"
    },
    "codeguru-reviewer": {
      "service_name": "Amazon CodeGuru Reviewer",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazoncodegurureviewer.html"
    },
    "codestar": {
      "service_name": "AWS CodeStar",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awscodestar.html"
    },
    "codestar-connections": {
      "service_name": "AWS CodeStar Connections",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awscodestarconnections.html"
    },
    "codestar-notifications": {
      "service_name": "AWS CodeStar Notifications",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awscodestarnotifications.html"
    },
    "compute-optimizer": {
      "service_name": "Compute Optimizer",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_computeoptimizer.html"
    },
    "controltower": {
      "service_name": "AWS Control Tower",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awscontroltower.html"
    },
    "cur": {
      "service_name": "AWS Cost and Usage Report",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awscostandusagereport.html"
    },
    "datapipeline": {
      "service_name": "Data Pipeline",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_datapipeline.html"
    },
    "dax": {
      "service_name": "Amazon DynamoDB Accelerator (DAX)",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazondynamodbacceleratordax.html"
    },
    "dbqms": {
      "service_name": "Database Query Metadata Service",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_databasequerymetadataservice.html"
    },
    "deepcomposer": {
      "service_name": "AWS DeepComposer",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsdeepcomposer.html"
    },
    "deeplens": {
      "service_name": "AWS DeepLens",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsdeeplens.html"
    },
    "deepracer": {
      "service_name": "AWS DeepRacer",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsdeepracer.html"
    },
    "detective": {
      "service_name": "Amazon Detective",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazondetective.html"
    },
    "devicefarm": {
      "service_name": "AWS Device Farm",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsdevicefarm.html"
    },
    "devops-guru": {
      "service_name": "Amazon DevOps Guru",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazondevopsguru.html"
    },
    "discovery": {
      "service_name": "Application Discovery",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_applicationdiscovery.html"
    },
    "dlm": {
      "service_name": "Amazon Data Lifecycle Manager",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazondatalifecyclemanager.html"
    },
    "ec2-instance-connect": {
      "service_name": "Amazon EC2 Instance Connect",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonec2instanceconnect.html"
    },
    "ecr-public": {
      "service_name": "Amazon Elastic Container Registry Public",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonelasticcontainerregistrypublic.html"
    },
    "elastic-inference": {
      "service_name": "Amazon Elastic Inference",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonelasticinference.html"
    },
    "elastictranscoder": {
      "service_name": "Amazon Elastic Transcoder",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonelastictranscoder.html"
    },
    "elemental-activations": {
      "service_name": "Elemental Activations",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_elementalactivations.html"
    },
    "elemental-appliances-software": {
      "service_name": "AWS Elemental Appliances and Software",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awselementalappliancesandsoftware.html"
    },
    "elemental-support-cases": {
      "service_name": "Elemental Support Cases",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_elementalsupportcases.html"
    },
    "elemental-support-content": {
      "service_name": "Elemental Support Content",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_elementalsupportcontent.html"
    },
    "emr-containers": {
      "service_name": "Amazon EMR on EKS (EMR Containers)",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonemroneksemrcontainers.html"
    },
    "fis": {
      "service_name": "AWS Fault Injection Simulator",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsfaultinjectionsimulator.html"
    },
    "frauddetector": {
      "service_name": "Amazon Fraud Detector",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonfrauddetector.html"
    },
    "gamelift": {
      "service_name": "Amazon GameLift",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazongamelift.html"
    },
    "geo": {
      "service_name": "Amazon Location",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonlocation.html"
    },
    "grafana": {
      "service_name": "Amazon Managed Service for Grafana",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonmanagedserviceforgrafana.html"
    },
    "groundtruthlabeling": {
      "service_name": "Amazon GroundTruth Labeling",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazongroundtruthlabeling.html"
    },
    "healthlake": {
      "service_name": "Amazon HealthLake",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonhealthlake.html"
    },
    "honeycode": {
      "service_name": "Amazon Honeycode",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonhoneycode.html"
    },
    "identitystore": {
      "service_name": "AWS Identity Store",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsidentitystore.html"
    },
    "imagebuilder": {
      "service_name": "Amazon EC2 Image Builder",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonec2imagebuilder.html"
    },
    "iot1click": {
      "service_name": "AWS IoT 1-Click",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot1-click.html"
    },
    "iotanalytics": {
      "service_name": "AWS IoT Analytics",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiotanalytics.html"
    },
    "iotfleethub": {
      "service_name": "Fleet Hub for AWS IoT Device Management",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_fleethubforawsiotdevicemanagement.html"
    },
    "iotsitewise": {
      "service_name": "AWS IoT SiteWise",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiotsitewise.html"
    },
    "iotthingsgraph": {
      "service_name": "AWS IoT Things Graph",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiotthingsgraph.html"
    },
    "iq": {
      "service_name": "AWS IQ",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiq.html"
    },
    "iq-permission": {
      "service_name": "AWS IQ Permissions",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiqpermissions.html"
    },
    "ivs": {
      "service_name": "Amazon Interactive Video Service",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazoninteractivevideoservice.html"
    },
    "kafka-cluster": {
      "service_name": "Apache Kafka APIs for Amazon MSK clusters",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_apachekafkaapisforamazonmskclusters.html"
    },
    "launchwizard": {
      "service_name": "Launch Wizard",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_launchwizard.html"
    },
    "lightsail": {
      "service_name": "Amazon Lightsail",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonlightsail.html"
    },
    "lookoutequipment": {
      "service_name": "Amazon Lookout for Equipment",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonlookoutforequipment.html"
    },
    "lookoutmetrics": {
      "service_name": "Amazon Lookout for Metrics",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonlookoutformetrics.html"
    },
    "lookoutvision": {
      "service_name": "Amazon Lookout for Vision",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonlookoutforvision.html"
    },
    "machinelearning": {
      "service_name": "Amazon Machine Learning",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonmachinelearning.html"
    },
    "managedblockchain": {
      "service_name": "Amazon Managed Blockchain",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonmanagedblockchain.html"
    },
    "marketplacecommerceanalytics": {
      "service_name": "AWS Marketplace Commerce Analytics Service",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsmarketplacecommerceanalyticsservice.html"
    },
    "mechanicalturk": {
      "service_name": "Amazon Mechanical Turk",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonmechanicalturk.html"
    },
    "mediapackage": {
      "service_name": "AWS Elemental MediaPackage",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awselementalmediapackage.html"
    },
    "mediapackage-vod": {
      "service_name": "AWS Elemental MediaPackage VOD",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awselementalmediapackagevod.html"
    },
    "mediastore": {
      "service_name": "AWS Elemental MediaStore",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awselementalmediastore.html"
    },
    "mediatailor": {
      "service_name": "AWS Elemental MediaTailor",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awselementalmediatailor.html"
    },
    "mgh": {
      "service_name": "AWS Migration Hub",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsmigrationhub.html"
    },
    "mgn": {
      "service_name": "AWS Application Migration Service",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsapplicationmigrationservice.html"
    },
    "mobileanalytics": {
      "service_name": "Amazon Mobile Analytics",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonmobileanalytics.html"
    },
    "mobilehub": {
      "service_name": "AWS Mobile Hub",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsmobilehub.html"
    },
    "monitron": {
      "service_name": "Amazon Monitron",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonmonitron.html"
    },
    "network-firewall": {
      "service_name": "AWS Network Firewall",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsnetworkfirewall.html"
    },
    "networkmanager": {
      "service_name": "Network Manager",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_networkmanager.html"
    },
    "nimble": {
      "service_name": "Amazon Nimble Studio",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonnimblestudio.html"
    },
    "panorama": {
      "service_name": "AWS Panorama",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awspanorama.html"
    },
    "pi": {
      "service_name": "AWS Performance Insights",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsperformanceinsights.html"
    },
    "pricing": {
      "service_name": "AWS Price List",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awspricelist.html"
    },
    "profile": {
      "service_name": "Amazon Connect Customer Profiles",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonconnectcustomerprofiles.html"
    },
    "proton": {
      "service_name": "AWS Proton",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsproton.html"
    },
    "purchase-orders": {
      "service_name": "AWS Purchase Orders Console",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awspurchaseordersconsole.html"
    },
    "ram": {
      "service_name": "AWS Resource Access Manager",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsresourceaccessmanager.html"
    },
    "redshift-data": {
      "service_name": "Amazon Redshift Data API",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonredshiftdataapi.html"
    },
    "resource-explorer": {
      "service_name": "AWS Tag Editor",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awstageditor.html"
    },
    "s3-object-lambda": {
      "service_name": "Amazon S3 Object Lambda",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazons3objectlambda.html"
    },
    "s3-outposts": {
      "service_name": "Amazon S3 on Outposts",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazons3onoutposts.html"
    },
    "savingsplans": {
      "service_name": "AWS Savings Plans",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssavingsplans.html"
    },
    "schemas": {
      "service_name": "Amazon EventBridge Schemas",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazoneventbridgeschemas.html"
    },
    "servicequotas": {
      "service_name": "Service Quotas",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_servicequotas.html"
    },
    "ses": {
      "service_name": "Amazon Simple Email Service v2",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonsimpleemailservicev2.html"
    },
    "signer": {
      "service_name": "AWS Signer",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssigner.html"
    },
    "ssm-contacts": {
      "service_name": "AWS Systems Manager Incident Manager Contacts",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssystemsmanagerincidentmanagercontacts.html"
    },
    "ssm-incidents": {
      "service_name": "AWS Systems Manager Incident Manager",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssystemsmanagerincidentmanager.html"
    },
    "sso": {
      "service_name": "AWS SSO",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssso.html"
    },
    "sso-directory": {
      "service_name": "AWS SSO Directory",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsssodirectory.html"
    },
    "sumerian": {
      "service_name": "Amazon Sumerian",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonsumerian.html"
    },
    "synthetics": {
      "service_name": "Amazon CloudWatch Synthetics",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazoncloudwatchsynthetics.html"
    },
    "tag": {
      "service_name": "Amazon Resource Group Tagging API",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonresourcegrouptaggingapi.html"
    },
    "tiros": {
      "service_name": "AWS Tiros",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awstiros.html"
    },
    "wam": {
      "service_name": "Amazon WorkSpaces Application Manager",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonworkspacesapplicationmanager.html"
    },
    "wellarchitected": {
      "service_name": "AWS Well-Architected Tool",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_awswell-architectedtool.html"
    },
    "workmail": {
      "service_name": "Amazon WorkMail",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonworkmail.html"
    },
    "workmailmessageflow": {
      "service_name": "Amazon WorkMail Message Flow",
      "service_authorization_url": "https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonworkmailmessageflow.html"
    }
  }
  ```

  </details>



  `aws-allowlister` supports different arguments to generate fine-grained compliance focused Service Control Policy (SCP) AllowLists. You can specify individual flags for the compliance frameworks you care about.

  ```
  Usage: aws-allowlister generate [OPTIONS]

  Options:
    Compliance Standard Selection:
      -a, --all                     SOC, PCI, ISO, HIPAA, FedRAMP_High, and
                                    FedRAMP_Moderate.
      -s, --soc                     Include SOC-compliant services
      -p, --pci                     Include PCI-compliant services
      -h, --hipaa                   Include HIPAA-compliant services
      -i, --iso                     Include ISO-compliant services
      -fh, --fedramp-high           Include FedRAMP High
      -fm, --fedramp-moderate       Include FedRAMP Moderate
      -d2e, --dodccsrg-il2-ew       Include DoD CC SRG IL2 (East/West)
      -d2g, --dodccsrg-il2-gc       Include DoD CC SRG IL2 (GovCloud)
      -d4g, --dodccsrg-il4-gc       Include DoD CC SRG IL4 (GovCloud)
      -d5g, --dodccsrg-il5-gc       Include DoD CC SRG IL5 (GovCloud)
    Forcibly Include AWS Services: [mutually_exclusive]
      --include TEXT                Include specific AWS IAM services, specified
                                    in a comma separated string.
      --include-file PATH           A YAML file that contains a list of AWS IAM
                                    services to include.
    Forcibly Exclude AWS Services: [mutually_exclusive]
      --exclude TEXT                Exclude specific AWS IAM services, specified
                                    in a comma separated string.
      --exclude-file PATH           A YAML file that contains a list of AWS IAM
                                    services to exclude.
    Output options: [mutually_exclusive]
      --table                       Output a markdown-formatted table of the
                                    Service Prefixes alongside Service Names.
      --json-list                   Output a JSON object of the service
                                    prefixes, service names, and authorization
                                    URLs.
      --excluded-table              Output a markdown-formatted table of
                                    *excluded* services.
      --excluded-json-list          Output a JSON object of *excluded* service
                                    prefixes, service names, and authorization
                                    URLs.
    -q, --quiet
    --help                          Show this message and exit.

  ```


  * For example, to generate a PCI only Service Control Policy and save it to JSON:

  ```bash
  aws-allowlister generate --pci --quiet > pci.json
  ```

  * You can also chain command flags together. For example, to generate a Policy for all the major compliance frameworks but FedRAMP:

  ```bash
  aws-allowlister generate -sphi --quiet
  ```

  * Let's say your organization is not subject to FedRAMP or HIPAA, but you want to create a Policy for SOC, ISO, and PCI:

  ```bash
  aws-allowlister generate -sip --quiet
  ```



  If you want to force-exclude or force-include a service, you have two options.
  1. Specify the exclusions in command line arguments
  2. Specify the exclusions in a YAML file and supply the file name



  For example, create a file that is called `exclusions.yml` with the following contents

  ```yaml

  - ec2
  - s3
  ```

  Now you can specify the following arguments to leverage this file:

  ```bash
  aws-allowlister generate --exclude-file exclusions.yml
  ```

  Alternatively, you can supply the argument inline like this:

  ```bash
  aws-allowlister generate ---exclude ec2,s3
  ```

  Notice how the output does not include `ec2` or `s3` in the output.


  <details>
  <summary>Exclude output</summary>

  ```
  {
      "Version": "2012-10-17",
          "Statement": {
              "Sid": "AllowList",
              "Effect": "Deny",
              "Resource": "*",
              "NotAction": ["access-analyzer:*", "account:*", "acm:*", "amplify:*", "amplifybackend:*", "apigateway:*", "application-autoscaling:*", "appstream:*", "appsync:*", "athena:*", "autoscaling:*", "autoscaling-plans:*", "aws-portal:*", "backup:*", "backup-storage:*", "batch:*", "clouddirectory:*", "cloudformation:*", "cloudfront:*", "cloudhsm:*", "cloudtrail:*", "cloudwatch:*", "codebuild:*", "codecommit:*", "codedeploy:*", "codepipeline:*", "cognito-identity:*", "cognito-idp:*", "cognito-sync:*", "comprehend:*", "comprehendmedical:*", "config:*", "connect:*", "dataexchange:*", "datasync:*", "directconnect:*", "dms:*", "ds:*", "dynamodb:*", "ebs:*", "ec2messages:*", "ecr:*", "ecs:*", "eks:*", "elasticache:*", "elasticbeanstalk:*", "elasticfilesystem:*", "elasticloadbalancing:*", "elasticmapreduce:*", "es:*", "events:*", "execute-api:*", "firehose:*", "fms:*", "forecast:*", "freertos:*", "fsx:*", "glacier:*", "globalaccelerator:*", "glue:*", "greengrass:*", "guardduty:*", "health:*", "iam:*", "importexport:*", "inspector:*", "iot:*", "iot-device-tester:*", "iotdeviceadvisor:*", "iotevents:*", "iotwireless:*", "kafka:*", "kinesis:*", "kinesisanalytics:*", "kinesisvideo:*", "kms:*", "lakeformation:*", "lambda:*", "logs:*", "macie:*", "macie2:*", "mediaconnect:*", "mediaconvert:*", "medialive:*", "mobiletargeting:*", "mq:*", "neptune-db:*", "opsworks:*", "opsworks-cm:*", "organizations:*", "outposts:*", "personalize:*", "polly:*", "qldb:*", "quicksight:*", "rds:*", "rds-data:*", "rds-db:*", "redshift:*", "rekognition:*", "robomaker:*", "route53:*", "route53domains:*", "route53resolver:*", "sagemaker:*", "secretsmanager:*", "securityhub:*", "serverlessrepo:*", "servicecatalog:*", "shield:*", "sms:*", "snowball:*", "sns:*", "sqs:*", "ssm:*", "ssmmessages:*", "states:*", "storagegateway:*", "sts:*", "support:*", "swf:*", "textract:*", "transcribe:*", "transfer:*", "translate:*", "waf:*", "waf-regional:*", "wafv2:*", "workdocs:*", "worklink:*", "workspaces:*", "xray:*"]
          }
  }
  ```

  </details>




  You can also use this approach for force-including services. Let's say that you want to include the AWS Managed BlockChain Services because your CEO is convinced you're going to the moon 🚀 (even though the AWS Managed BlockChain service does not meet any common compliance frameworks like PCI or HIPAA). You could create a file called `include.yml` with the contents:

  ```yaml
  - managedblockchain
  ```

  Then run the following command:

  ```bash
  aws-allowlister generate --include-file include.yml
  ```

  Alternatively, you can supply the argument inline like this:

  ```bash
  aws-allowlister generate --include managedblockchain
  ```

  Notice how the output includes the `managedblockchain` service.

  <details>
  <summary>Output with managed blockchain</summary>
  <p>

  ```
  {
      "Version": "2012-10-17",
          "Statement": {
              "Sid": "AllowList",
              "Effect": "Deny",
              "Resource": "*",
              "NotAction": ["access-analyzer:*", "account:*", "acm:*", "apigateway:*", "application-autoscaling:*", "appstream:*", "athena:*", "autoscaling:*", "autoscaling-plans:*", "aws-portal:*", "batch:*", "clouddirectory:*", "cloudformation:*", "cloudtrail:*", "cloudwatch:*", "codebuild:*", "codecommit:*", "codedeploy:*", "comprehend:*", "config:*", "datasync:*", "directconnect:*", "dms:*", "ds:*", "dynamodb:*", "ebs:*", "ec2:*", "ec2messages:*", "ecr:*", "ecs:*", "elasticache:*", "elasticbeanstalk:*", "elasticfilesystem:*", "elasticloadbalancing:*", "elasticmapreduce:*", "es:*", "events:*", "execute-api:*", "firehose:*", "glacier:*", "glue:*", "guardduty:*", "iam:*", "importexport:*", "inspector:*", "iot:*", "iot-device-tester:*", "iotdeviceadvisor:*", "iotwireless:*", "kinesis:*", "kms:*", "lakeformation:*", "lambda:*", "logs:*", "managedblockchain:*", "mediaconvert:*", "organizations:*", "polly:*", "rds:*", "rds-data:*", "rds-db:*", "redshift:*", "rekognition:*", "route53:*", "route53domains:*", "route53resolver:*", "s3:*", "sagemaker:*", "secretsmanager:*", "serverlessrepo:*", "servicecatalog:*", "sms:*", "snowball:*", "sns:*", "sqs:*", "ssm:*", "ssmmessages:*", "states:*", "sts:*", "support:*", "swf:*", "transcribe:*", "translate:*", "waf:*", "waf-regional:*", "wafv2:*", "workspaces:*"]
          }
  }
  ```
  </details>





  * Set up the virtual environment

  ```bash
  pipenv --python 3.7  # create the environment
  pipenv shell         # start the environment
  pipenv install       # install both development and production dependencies
  ```

  * Build the package

  ```bash

  make build


  make install


  make test


  make clean
  ```



  * Update with the latest AWS Compliance data

  ```bash
  make update-data
  ```



  * [Kinnaird McQuade (@kmcquade3)](https://twitter.com/kmcquade3), Salesforce - Author
  * [Jason Dyke (@jasonadyke)](https://twitter.com/jasonadyke), Square - Contributor



  The policies generated by `aws-allowlister` do not guarantee that your AWS accounts will be compliant or that you will become accredited with the supported compliance frameworks. These policies are intended to be a useful tool to assist with restricting which service can or cannot be leveraged.


pkgId: 0dc10745e9dc2b1001e099923684bbd2d10c9ef95da19ec0c04b7e142946c7fe
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_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/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: 1d34226ab447d8ea34456f8352b93340546081454f293c5239a4e5bd762b8e4d
name: python-aws-bunker
arch: src
version: 0.4.5
epoch: 0
release: 1
url: https://gitlab.com/shindagger/bunker
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aws-bunker-0.4.5-1.src.rpm
checksum_type: sha256
summary:
  bunker is a command line program for setting up an ec2 in AWS for remote development or as a backup. It can clone your git repos, and transfer ignored files from your machine to the ec2.

description:
  Bunker is a command line program for setting up an ec2 in AWS for remote development or as a backup. Among other things, it can clone your git repos and transfer ignored files from your machine to the ec2.

  Working remotely, using cellular networks has been possible for ~15 years. As networks have evolved, bandwidth has become less and less of an issue, but even on today's cellular networks it is both impractical and costly to download large files, like docker images, zip archives, etc. One solution is to ssh into a VM on the cloud, and work from there, but managing git repos and private or ignored files across several machines quickly becomes problematic.

  With bunker it is easier to automate this process. All you need is an instance ID for and AWS EC2 running ubuntu, and you can run shell scripts, source files to .profile, and copy over as many repos and ignored files as you want. Example:
  ```

  $ bunker init


  $ bunker ignore config.ini .env.production terraform.tfvars


  $ bunker install /home/ubuntu/install-things.sh


  $ bunker prompt /home/ubuntu/.prompt


  $ bunker build -r /path/to/local/repo
  ```

  When used with our sample Terraform files (https://gitlab.com/shindagger/bunker), you can spin up a brand new EC2, clone the repos you need, copy over the ignored files, and be working in ~5 minutes. Terraform will output an instance ID you can use for `bunker init`. Then you can do the rest with a single command like:
  ```
  $ bunker install -y && bunker prompt -y && bunker build -r /path/to/local/repo -y
  ```

  For more information see the Terraform and Usage sections below.



  - python
  - aws cli
  - (terraform)

  Also, you will need an EC2 instance on AWS, preferably running ubuntu>=18.04. This EC2 will need ssh (port 22) open and an attached SSM role (AmazonEC2RoleforSSM).
  For more information on creating the SSM role for EC2 see:
  https://docs.aws.amazon.com/systems-manager/latest/userguide/setup-instance-profile.html#instance-profile-add-permissions



  `$ pip intall aws-bunker`

  NOTE: see shell scripts, and terraform sections below:
  PROJECT HOME PAGE: https://gitlab.com/shindagger/bunker



  the `install` and `prompt` subcommands assume there will be shell scripts on the EC2. The default names (without positional arguments) are: `install-essentials.sh`, and `.prompt.sh` respectively.

  the first shell script is intended for essential software (like python, pip, node, and npm). If the script is not already executable, use the \[-e\] flag. `prompt` simply sources a file in ~/.profile on the EC2.

  See example scripts here (https://gitlab.com/shindagger/bunker) as well as the terraform section below:



  We have also included terraform files (https://gitlab.com/shindagger/bunker) which, when configured will spin up an EC2 instance you can use for bunker, with all the example shell scripts and your `.vimrc` provisioned. Of course you're encouraged to change these files according to preference. Terraform will output an instance ID you can use to init bunker with.

  To configure and use these terraform files:

  1. Clone this repo (https://gitlab.com/shindagger/bunker.git)

  2. cd into the repo dir and `ls *.default`. These are the files you will need to edit before you init terraform. Each one of these files will need the extension `.tf.default` changed to `.tf`.

  3. Edit `alfa.tf` and ensure that the region is correct.

  4. Edit `beta.tf` and change the s3 bucket to a bucket you own. Also ensure the region is correct.

  5. Edit `terraform.tfvars` with your AWS SDK access id and key. Also make sure you are configured to this account with `aws configure`

  6. Edit `variables.tf` and change the default values to reflect your wishes. NOTE: if you don't have them already, you will need to create your own ssm role, and ssh key file manually. `ec2_key_name` is just the name of the keypair in AWS, while `ssh_private_key` is the full (absolute) path to your .pem file on your local machine.

  7. `terraform init`

  8. `terraform plan && terraform apply`



  1. You have an EC2 instance ID. (see "terraform" above)

  2. You have a directory (prefix) in which you will keep `repositories.txt` and `ignoredfiles.txt`. You can copy sample files from this repo, and edit them to reflect your repos and ignored files.

  3. You have a .pem file and you know the path to its location. You have a keypair name set for your EC2, which uses this .pem file.

  4. You know the username for the EC2 \(should be "ubuntu"\). We may choose to support other OSs in future versions.

  5. You have created a private key for your git provider, and you added the public key in your git provider settings. Also, you have configured your local ssh to use this key and tested or used it at least once.



  `$ bunker -h`

  **Show main bunker help page and exit**

  `$ bunker build -h`

  **Show help page for the subcommand `build` and exit.** This will work with any available subcommand

  `$ bunker init`

  **Write the bunker config file `~/.config-bunker.ini`.** If the file exists already, answers will be populated with existing values \[underlined\], and only overwritten if you offer a replacement value.

  example `~/.config-bunker.ini`:
  ```
  [default]
  prefix = /Users/username/bunker-config
  repos = repositories.txt
  ignored = ignoredfiles.txt
  pem = /Users/username/somename.pem
  instance_id = i-04xxxxxxxxxxxx148
  username = ubuntu
  gitkeys = /Users/username/.ssh/git_rsa
  ```

  `$ bunker repo path/to/repo /absolute/path/to/another-repo ../somerepo`

  **Add or remove repo directories to/from repo file.** Use relative or absolute paths.

  `$ bunker ignore .env.local config.ini terraform.tfvars`

  **Add or remove filenames to/from ignore file.**

  `$ bunker install`
  `$ bunker install /home/ubuntu/script.sh`

  **Install essential software on your EC2 instance.** This command will run an executable shell script on your EC2. The default script (without defining the positional argument) is named `/home/ubuntu/install-essentials.sh`. This is intended to install any software essential to using your EC2. In an effort to stay agnostic about what software users want on their EC2, bunker does not install with included shell scripts. We do however provide example shell scripts \(as well as terraform for the EC2\) at the project homepage:
  https://gitlab.com/shindagger/bunker

  `$ bunker prompt`
  `$ bunker prompt /home/ubuntu/another-prompt.sh`

  **Source a custom prompt file in `/home/ubuntu/.profile`.** This command will source a file in `/home/ubuntu/.profile`. The default name is: `/home/ubuntu/.prompt.sh`.

  `$ bunker build`

  **Clone list of git repos \(repositories.txt\) on your EC2 and then rsync list of ignored files \(ignoredfiles.txt\) from your local repos to the EC2 repos.** `git clone` will use ssh, assuming you have a public key setup at your git provider, a working `~/.ssh/config` tested at least once with `ssh -T git@PROVIDERURL`, and the associated private key set using `bunker init`.


pkgId: 8b4b36b98be0bf6d233fe5bda9b8b5519b3411e95b2f885adf21c652e7b5d305
name: python-aws-cdk-common
arch: src
version: 0.1.20
epoch: 0
release: 1
summary: A shared package for common modules and constants for AWS Lambda applications
url: https://pypi.org/project/aws-cdk-common/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aws-cdk-common-0.1.20-1.src.rpm
checksum_type: sha256
description:
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)

  `aws-cdk-common` is a shared package for common modules and constants for AWS Lambda applications based on AWS CDK.



  [Poetry](https://python-poetry.org/) is a tool to manage Python projects in a deterministic way.


  `pipx` installs and run Python applications in isolated environment. Follow the instructions listed in [pipx documentation](https://github.com/pypa/pipx) for your specific environment.



  ```bash
  pipx install poetry
  ```


  To install required modules, run:

  ```bash
  poetry install --no-root
  ```

  To install required modules for development, run:
  ```bash
  poetry install --with dev --no-root
  ```

  We use `pre-commit` to ensure consistent code quality. Install the pre-commit hooks by running:
  ```bash
  poetry run pre-commit install
  ```

  - To format code with **Black**:
  ```bash
  poetry run black .
  ```
  - To sort imports with **isort**:
  ```bash
  pipenv run isort .
  ```
  - To check code quality with **Flake8**:
  ```bash
  poetry run flake8 .
  ```
  These tools help maintain code quality and consistency across the project.




  To run unit tests, after installing required modules for development, run:
  ```bash
  poetry shell
  pytest tests/unit
  ```


  To run unit tests, after installing required modules for development, run:
  ```bash
  poetry shell
  pytest tests/integration
  ```


  You can also run all tests (unit and integration) by running:
  ```bash
  poetry shell
  pytest
  ```


pkgId: 64d578ab0e505ddd82d7fb74d91796196eed6d78ed7850779293f4a7ce4337fe
name: python-aws-cdk-constructs
arch: src
version: 2.32.0.post0
epoch: 0
release: 1
summary: AWS CDK constructs
url: https://bitbucket.org/cioapps/aws-cdk-constructs
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aws-cdk-constructs-2.32.0.post0-1.src.rpm
checksum_type: sha256
description:
  FAO AWS CDK is library to build FAO-compliant AWS infrastructure in near-zero time-to-market.

  CSI Cloud Team developed a set of highly reusable AWS infrastructural building-blocks in collaboration with the Unix Admin Team and Statistical Working System (SWS) development team.

  To adopt FAO AWS CDK enhances the projects' robustness over the time as they will inherit the benefits of a centralized infrastructural development, they can keep the focus on application features development.

  These shared infrastructural building-blocks natively implement FAO AWS best practices and abstract low-level technical details, while enabling AWS developers to focus on code production.

  As a major positive side effect, the overal sustainability of the FAO AWS cloud environment reaches the stars 🚀.

  - [Python package index of FAO AWS CDK](https://pypi.org/project/aws-cdk-constructs/)
  - [Source on Bitbucket of FAO AWS CDK](https://bitbucket.org/cioapps/aws-cdk-constructs)


  Make sure your local machine is configured to meet the [FAO AWS prerequisites](https://aws.fao.org/docs/cdk/introduction/#prerequisites)
  and you have a general undestanding of what AWS CDK is and how to use it.

  - [AWS CDK introuction](https://aws.amazon.com/cdk/)
  - [AWS CDK - YouTube video](https://www.youtube.com/watch?time_continue=1&v=bz4jTx4v-l8)
  - [AWS CDK Workshop - Python](https://cdkworkshop.com/30-python.html)



  CSI Cloud Team produced extensive documentation about FAO AWS CDK (and FAO AWS in general).
  - [FAO CDK intro](https://aws.fao.org/docs/cdk/introduction/).
  - [FAO CDK project structure](https://aws.fao.org/docs/cdk/project_structure/).
  - [FAO CDK reference architectures, ready to be copied](https://aws.fao.org/docs/cdk/reference_architectures/).
  - [Common issues and troubleshooting with FAO CDK](https://aws.fao.org/docs/cdk/troubleshooting/).
  - [Video tutorials](https://aws.fao.org/docs/tutorials/video_tutorials/).





   - If you project is officially started, you can request a new Bitbucket.org repo for you cloud infrastructure
   - CSI Cloud Team created a [skeleon project](https://bitbucket.org/cioapps/aws-cdk-template-iac) to simplify the onboarding to FAO CDK and what the repository will contains will be identical to [this](https://bitbucket.org/cioapps/aws-cdk-template-iac). The repository will be already configured to implement CD/CI;
   - Browser the `app.py` file to examples of how to intantiate FAO CDK resources with relative explainations
   - Follow the [FAO Development lifecycle](https://aws.fao.org/docs/csi_managed/development_lifecycle/) to release your cloud solution in the development environment;
   - [Your path towards production](https://aws.fao.org/docs/csi_managed/your_path_towards_production/) describes how to release your solution in the production environment;
   - [The FAO AWS automation](https://aws.fao.org/docs/csi_managed/automation/) website describes in depth how the automation is implemented in the FAO AWS environment.



  `<ENV>` possible values: `development`, `qa`, `production`.

  Kindly note, that the correspondent `.env.<ENV>-iac` file must exist to run a given command. For more information please refer to [How to configure your FAO CDK stack](https://aws.fao.org/docs/cdk/cd_ci/#how-to-configure-your-fao-cdk-stack)

   - `ENVIRONMENT=<ENV> cdk ls`          list all stacks in the app
   - `ENVIRONMENT=<ENV> cdk synth`       emits the synthesized CloudFormation template
   - `ENVIRONMENT=<ENV> cdk deploy`      deploy this stack to your default AWS account/region
   - `ENVIRONMENT=<ENV> cdk diff`        compare deployed stack with current state
   - `ENVIRONMENT=<ENV> cdk docs`        open CDK documentation
   - `ENVIRONMENT=<ENV> cdk ls`: to list the available stacks in the projects
   - `ENVIRONMENT=<ENV> cdk synth MY_STACK --profile my-dev`: to synthetize (generate) the cloud formation template of MY_STACK stack
   - `ENVIRONMENT=<ENV> cdk deploy MY_STACK --profile my-dev`: to deploy the MY_STACK stack



  The documentation follows Google format.

   * Browse the `./docs` directory
   * Run the `make html` to generate the static HTML documentation in the  `/docs/_build/` directory

  The documentation release is scripted in the pipeline. So you will simply need to release your code in the `master` branch of the repository to see the FAO CDK documentation published.



  The release of the constructs in `pypi` is automated in the CD/CI pipeline. So you will simply need to release your code in the `master` branch of the repository to see the FAO CDK documentation published and your constructs available on `pypi`.
  Before to move your code in the `master` branch, remember to upgrade the version of the constructs as following:
  - Commit your changes, each commit in the repository should follow the convention: [https://www.conventionalcommits.org/en/v1.0.0/](https://www.conventionalcommits.org/en/v1.0.0/)
  - Run `npm run release` to auto generate the `CHANGELOG.md` file and upgrade the constructs version.
  - Pull request the code to the master branch of the repo

  If you try to release a version already published (i.e. you forget to upgrade the package version in the mentioned file) the release will fail.
  Check out the CD/CI pipeline for additional information.



  - Open the `IAC` project you are working on, and create a `git` branch for the feature you are developing
  - Install the project dependencies using `pip install -r requirements.txt`
  - Locally install the `FAO CDK` constructs using `pip install -e ../../cdk/aws-cdk-constructs/` (NB: the path in your file system may vary). This implies that you cloned the `FAO CDK` repository on your local machine, and the repository is configured to use the `develop` branch
  - Modify in the local `FAO CDK` repo the code to implement the desired infrastructural resources
  - You can test the `FAO CDK` deployment from the `IAC` repository, using the `CDK CLI` (e.g. `cdk deploy YOUR_STACK --profile YOUR_PROFILE`). This will read from your local `FAO CDK` repository the new modifications you just developed to include them in the deployement
  - Once the `FAO CDK` development is completed, release the new `FAO CDK` version as described above and update the `requirements.txt` files in the `IAC` repository
  - Once the `IAC` repository is pushed on Bitbucket, it'll download the newly release `FAO CDK` version during the CD/CI pipeline execution.



  There is a check on the pipeline to ensure the code and tests pass the blue linting, to ensure the code is properly formatted you can add the (pre-commit)[./.pre-commit-config.yaml] hook to your local repository.
  ```
  pip install -r requirements-dev.txt
  pre-commit install
  ```
  This will run the linter and lint all the files under aws_cdk_constructs and tests before each commit. If you see that some files failed the tests, blue will automatically fix them for you. You will only have to stage those files back and commit again.


pkgId: 841b4bbeb537cc6cf1dd7269a3729626b8aa08d1fcd99977902bf77b557ba833
name: python-aws-cdk-constructs-config-provider
arch: src
version: 0.1.0
epoch: 0
release: 1
summary: please add a summary manually as the author left a blank one
url: https://pypi.org/project/aws-cdk-constructs-config-provider/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aws-cdk-constructs-config-provider-0.1.0-1.src.rpm
checksum_type: sha256
description:
  ```python
  from .environments_parameters import environments_parameters
  from ..models.app_settings import AppSettings
  from aws_cdk_constructs_config_provider import DefaultAccount, ConfigProvider

  appConfig = ConfigProvider[AppSettings, DefaultAccount](environments_parameters=environments_parameters, settings=AppSettings, relative_path='.')
  ```



  **Please follow the semantic release commit message format.**




  The `develop` branhces is the main branch for development. All feature branches should be created from this branch any commit to the development branch will create an `alpha` version.


  The `feature/*` branches are the branches for new features. Any commit to a feature branch will create a `beta` version.


  The `main` branch is the production branch. Any commit to the main branch will create a `release` version.


pkgId: 6e2b6eb6fb54a926d5d5f068f6188a030f5b68759fb7f73bfc17da1534419aa6
name: python-aws-cdk-lib
arch: src
version: 2.159.0
epoch: 0
release: 1
summary: Version 2 of the AWS Cloud Development Kit library
url: https://github.com/aws/aws-cdk
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aws-cdk-lib-2.159.0-1.src.rpm
checksum_type: sha256
description:
  The AWS CDK construct library provides APIs to define your CDK application and add
  CDK constructs to the application.





  When upgrading from CDK 1.x, remove all dependencies to individual CDK packages
  from your dependencies file and follow the rest of the sections.



  To use this package, you need to declare this package and the `constructs` package as
  dependencies.

  According to the kind of project you are developing:

  For projects that are CDK libraries in NPM, declare them both under the `devDependencies` **and** `peerDependencies` sections.
  To make sure your library is compatible with the widest range of CDK versions: pick the minimum `aws-cdk-lib` version
  that your library requires; declare a range dependency with a caret on that version in peerDependencies, and declare a
  point version dependency on that version in devDependencies.

  For example, let's say the minimum version your library needs is `2.38.0`. Your `package.json` should look like this:

  ```javascript
  {
    "peerDependencies": {
      "aws-cdk-lib": "^2.38.0",
      "constructs": "^10.0.0"
    },
    "devDependencies": {
      /* Install the oldest version for testing so we don't accidentally use features from a newer version than we declare */
      "aws-cdk-lib": "2.38.0"
    }
  }
  ```

  For CDK apps, declare them under the `dependencies` section. Use a caret so you always get the latest version:

  ```json
  {
    "dependencies": {
      "aws-cdk-lib": "^2.38.0",
      "constructs": "^10.0.0"
    }
  }
  ```





  You can use a classic import to get access to each service namespaces:

  ```python
  from aws_cdk import Stack, App, aws_s3 as s3

  app = App()
  stack = Stack(app, "TestStack")

  s3.Bucket(stack, "TestBucket")
  ```



  Alternatively, you can use "barrel" imports:

  ```python
  from aws_cdk import App, Stack
  from aws_cdk.aws_s3 import Bucket

  app = App()
  stack = Stack(app, "TestStack")

  Bucket(stack, "TestBucket")
  ```

  <!--BEGIN CORE DOCUMENTATION-->



  A `Stack` is the smallest physical unit of deployment, and maps directly onto
  a CloudFormation Stack. You define a Stack by defining a subclass of `Stack`
  -- let's call it `MyStack` -- and instantiating the constructs that make up
  your application in `MyStack`'s constructor. You then instantiate this stack
  one or more times to define different instances of your application. For example,
  you can instantiate it once using few and cheap EC2 instances for testing,
  and once again using more and bigger EC2 instances for production.

  When your application grows, you may decide that it makes more sense to split it
  out across multiple `Stack` classes. This can happen for a number of reasons:

  * You could be starting to reach the maximum number of resources allowed in a single
    stack (this is currently 500).
  * You could decide you want to separate out stateful resources and stateless resources
    into separate stacks, so that it becomes easy to tear down and recreate the stacks
    that don't have stateful resources.
  * There could be a single stack with resources (like a VPC) that are shared
    between multiple instances of other stacks containing your applications.

  As soon as your conceptual application starts to encompass multiple stacks,
  it is convenient to wrap them in another construct that represents your
  logical application. You can then treat that new unit the same way you used
  to be able to treat a single stack: by instantiating it multiple times
  for different instances of your application.

  You can define a custom subclass of `Stage`, holding one or more
  `Stack`s, to represent a single logical instance of your application.

  As a final note: `Stack`s are not a unit of reuse. They describe physical
  deployment layouts, and as such are best left to application builders to
  organize their deployments with. If you want to vend a reusable construct,
  define it as a subclasses of `Construct`: the consumers of your construct
  will decide where to place it in their own stacks.



  Each Stack has a *synthesizer*, an object that determines how and where
  the Stack should be synthesized and deployed. The synthesizer controls
  aspects like:

  * How does the stack reference assets? (Either through CloudFormation
    parameters the CLI supplies, or because the Stack knows a predefined
    location where assets will be uploaded).
  * What roles are used to deploy the stack? These can be bootstrapped
    roles, roles created in some other way, or just the CLI's current
    credentials.

  The following synthesizers are available:

  * `DefaultStackSynthesizer`: recommended. Uses predefined asset locations and
    roles created by the modern bootstrap template. Access control is done by
    controlling who can assume the deploy role. This is the default stack
    synthesizer in CDKv2.
  * `LegacyStackSynthesizer`: Uses CloudFormation parameters to communicate
    asset locations, and the CLI's current permissions to deploy stacks. This
    is the default stack synthesizer in CDKv1.
  * `CliCredentialsStackSynthesizer`: Uses predefined asset locations, and the
    CLI's current permissions.

  Each of these synthesizers takes configuration arguments. To configure
  a stack with a synthesizer, pass it as one of its properties:

  ```python
  MyStack(app, "MyStack",
      synthesizer=DefaultStackSynthesizer(
          file_assets_bucket_name="my-orgs-asset-bucket"
      )
  )
  ```

  For more information on bootstrapping accounts and customizing synthesis,
  see [Bootstrapping in the CDK Developer Guide](https://docs.aws.amazon.com/cdk/latest/guide/bootstrapping.html).



  [Nested stacks](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html) are stacks created as part of other stacks. You create a nested stack within another stack by using the `NestedStack` construct.

  As your infrastructure grows, common patterns can emerge in which you declare the same components in multiple templates. You can separate out these common components and create dedicated templates for them. Then use the resource in your template to reference other templates, creating nested stacks.

  For example, assume that you have a load balancer configuration that you use for most of your stacks. Instead of copying and pasting the same configurations into your templates, you can create a dedicated template for the load balancer. Then, you just use the resource to reference that template from within other templates.

  The following example will define a single top-level stack that contains two nested stacks: each one with a single Amazon S3 bucket:

  ```python
  class MyNestedStack(cfn.NestedStack):
      def __init__(self, scope, id, *, parameters=None, timeout=None, notifications=None):
          super().__init__(scope, id, parameters=parameters, timeout=timeout, notifications=notifications)

          s3.Bucket(self, "NestedBucket")

  class MyParentStack(Stack):
      def __init__(self, scope, id, *, description=None, env=None, stackName=None, tags=None, synthesizer=None, terminationProtection=None, analyticsReporting=None, crossRegionReferences=None, permissionsBoundary=None, suppressTemplateIndentation=None):
          super().__init__(scope, id, description=description, env=env, stackName=stackName, tags=tags, synthesizer=synthesizer, terminationProtection=terminationProtection, analyticsReporting=analyticsReporting, crossRegionReferences=crossRegionReferences, permissionsBoundary=permissionsBoundary, suppressTemplateIndentation=suppressTemplateIndentation)

          MyNestedStack(self, "Nested1")
          MyNestedStack(self, "Nested2")
  ```

  Resources references across nested/parent boundaries (even with multiple levels of nesting) will be wired by the AWS CDK
  through CloudFormation parameters and outputs. When a resource from a parent stack is referenced by a nested stack,
  a CloudFormation parameter will automatically be added to the nested stack and assigned from the parent; when a resource
  from a nested stack is referenced by a parent stack, a CloudFormation output will be automatically be added to the
  nested stack and referenced using `Fn::GetAtt "Outputs.Xxx"` from the parent.

  Nested stacks also support the use of Docker image and file assets.



  You can access resources in a different stack, as long as they are in the
  same account and AWS Region (see [next section](#accessing-resources-in-a-different-stack-and-region) for an exception).
  The following example defines the stack `stack1`,
  which defines an Amazon S3 bucket. Then it defines a second stack, `stack2`,
  which takes the bucket from stack1 as a constructor property.

  ```python
  prod = {"account": "123456789012", "region": "us-east-1"}

  stack1 = StackThatProvidesABucket(app, "Stack1", env=prod)


  stack2 = StackThatExpectsABucket(app, "Stack2",
      bucket=stack1.bucket,
      env=prod
  )
  ```

  If the AWS CDK determines that the resource is in the same account and
  Region, but in a different stack, it automatically synthesizes AWS
  CloudFormation
  [Exports](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-exports.html)
  in the producing stack and an
  [Fn::ImportValue](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-importvalue.html)
  in the consuming stack to transfer that information from one stack to the
  other.



  > **This feature is currently experimental**

  You can enable the Stack property `crossRegionReferences`
  in order to access resources in a different stack *and* region. With this feature flag
  enabled it is possible to do something like creating a CloudFront distribution in `us-east-2` and
  an ACM certificate in `us-east-1`.

  ```python
  stack1 = Stack(app, "Stack1",
      env=Environment(
          region="us-east-1"
      ),
      cross_region_references=True
  )
  cert = acm.Certificate(stack1, "Cert",
      domain_name="*.example.com",
      validation=acm.CertificateValidation.from_dns(route53.PublicHostedZone.from_hosted_zone_id(stack1, "Zone", "Z0329774B51CGXTDQV3X"))
  )

  stack2 = Stack(app, "Stack2",
      env=Environment(
          region="us-east-2"
      ),
      cross_region_references=True
  )
  cloudfront.Distribution(stack2, "Distribution",
      default_behavior=cloudfront.BehaviorOptions(
          origin=origins.HttpOrigin("example.com")
      ),
      domain_names=["dev.example.com"],
      certificate=cert
  )
  ```

  When the AWS CDK determines that the resource is in a different stack *and* is in a different
  region, it will "export" the value by creating a custom resource in the producing stack which
  creates SSM Parameters in the consuming region for each exported value. The parameters will be
  created with the name '/cdk/exports/${consumingStackName}/${export-name}'.
  In order to "import" the exports into the consuming stack a [SSM Dynamic reference](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references.html#dynamic-references-ssm)
  is used to reference the SSM parameter which was created.

  In order to mimic strong references, a Custom Resource is also created in the consuming
  stack which marks the SSM parameters as being "imported". When a parameter has been successfully
  imported, the producing stack cannot update the value.

  > [!NOTE]
  > As a consequence of this feature being built on a Custom Resource, we are restricted to a
  > CloudFormation response body size limitation of [4096 bytes](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/crpg-ref-responses.html).
  > To prevent deployment errors related to the Custom Resource Provider response body being too
  > large, we recommend limiting the use of nested stacks and minimizing the length of stack names.
  > Doing this will prevent SSM parameter names from becoming too long which will reduce the size of the
  > response body.

  See the [adr](https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/core/adr/cross-region-stack-references.md)
  for more details on this feature.



  The automatic references created by CDK when you use resources across stacks
  are convenient, but may block your deployments if you want to remove the
  resources that are referenced in this way. You will see an error like:

  ```text
  Export Stack1:ExportsOutputFnGetAtt-****** cannot be deleted as it is in use by Stack1
  ```

  Let's say there is a Bucket in the `stack1`, and the `stack2` references its
  `bucket.bucketName`. You now want to remove the bucket and run into the error above.

  It's not safe to remove `stack1.bucket` while `stack2` is still using it, so
  unblocking yourself from this is a two-step process. This is how it works:

  DEPLOYMENT 1: break the relationship

  * Make sure `stack2` no longer references `bucket.bucketName` (maybe the consumer
    stack now uses its own bucket, or it writes to an AWS DynamoDB table, or maybe you just
    remove the Lambda Function altogether).
  * In the `stack1` class, call `this.exportValue(this.bucket.bucketName)`. This
    will make sure the CloudFormation Export continues to exist while the relationship
    between the two stacks is being broken.
  * Deploy (this will effectively only change the `stack2`, but it's safe to deploy both).

  DEPLOYMENT 2: remove the resource

  * You are now free to remove the `bucket` resource from `stack1`.
  * Don't forget to remove the `exportValue()` call as well.
  * Deploy again (this time only the `stack1` will be changed -- the bucket will be deleted).



  To make specifications of time intervals unambiguous, a single class called
  `Duration` is used throughout the AWS Construct Library by all constructs
  that that take a time interval as a parameter (be it for a timeout, a
  rate, or something else).

  An instance of Duration is constructed by using one of the static factory
  methods on it:

  ```python
  Duration.seconds(300) # 5 minutes
  Duration.minutes(5) # 5 minutes
  Duration.hours(1) # 1 hour
  Duration.days(7) # 7 days
  Duration.parse("PT5M")
  ```

  Durations can be added or subtracted together:

  ```python
  Duration.minutes(1).plus(Duration.seconds(60)) # 2 minutes
  Duration.minutes(5).minus(Duration.seconds(10))
  ```



  To make specification of digital storage quantities unambiguous, a class called
  `Size` is available.

  An instance of `Size` is initialized through one of its static factory methods:

  ```python
  Size.kibibytes(200) # 200 KiB
  Size.mebibytes(5) # 5 MiB
  Size.gibibytes(40) # 40 GiB
  Size.tebibytes(200) # 200 TiB
  Size.pebibytes(3)
  ```

  Instances of `Size` created with one of the units can be converted into others.
  By default, conversion to a higher unit will fail if the conversion does not produce
  a whole number. This can be overridden by unsetting `integral` property.

  ```python
  Size.mebibytes(2).to_kibibytes() # yields 2048
  Size.kibibytes(2050).to_mebibytes(rounding=SizeRoundingBehavior.FLOOR)
  ```



  To help avoid accidental storage of secrets as plain text, we use the `SecretValue` type to
  represent secrets. Any construct that takes a value that should be a secret (such as
  a password or an access key) will take a parameter of type `SecretValue`.

  The best practice is to store secrets in AWS Secrets Manager and reference them using `SecretValue.secretsManager`:

  ```python
  secret = SecretValue.secrets_manager("secretId",
      json_field="password",  # optional: key of a JSON field to retrieve (defaults to all content),
      version_id="id",  # optional: id of the version (default AWSCURRENT)
      version_stage="stage"
  )
  ```

  Using AWS Secrets Manager is the recommended way to reference secrets in a CDK app.
  `SecretValue` also supports the following secret sources:

  * `SecretValue.unsafePlainText(secret)`: stores the secret as plain text in your app and the resulting template (not recommended).
  * `SecretValue.secretsManager(secret)`: refers to a secret stored in Secrets Manager
  * `SecretValue.ssmSecure(param, version)`: refers to a secret stored as a SecureString in the SSM
    Parameter Store. If you don't specify the exact version, AWS CloudFormation uses the latest
    version of the parameter.
  * `SecretValue.cfnParameter(param)`: refers to a secret passed through a CloudFormation parameter (must have `NoEcho: true`).
  * `SecretValue.cfnDynamicReference(dynref)`: refers to a secret described by a CloudFormation dynamic reference (used by `ssmSecure` and `secretsManager`).
  * `SecretValue.resourceAttribute(attr)`: refers to a secret returned from a CloudFormation resource creation.

  `SecretValue`s should only be passed to constructs that accept properties of type
  `SecretValue`. These constructs are written to ensure your secrets will not be
  exposed where they shouldn't be. If you try to use a `SecretValue` in a
  different location, an error about unsafe secret usage will be thrown at
  synthesis time.

  If you rotate the secret's value in Secrets Manager, you must also change at
  least one property on the resource where you are using the secret, to force
  CloudFormation to re-read the secret.

  `SecretValue.ssmSecure()` is only supported for a limited set of resources.
  [Click here for a list of supported resources and properties](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references.html#template-parameters-dynamic-patterns-resources).



  Sometimes you will need to put together or pick apart Amazon Resource Names
  (ARNs). The functions `stack.formatArn()` and `stack.splitArn()` exist for
  this purpose.

  `formatArn()` can be used to build an ARN from components. It will automatically
  use the region and account of the stack you're calling it on:

  ```python




  stack.format_arn(
      service="lambda",
      resource="function",
      arn_format=ArnFormat.COLON_RESOURCE_NAME,
      resource_name="MyFunction"
  )
  ```

  `splitArn()` can be used to get a single component from an ARN. `splitArn()`
  will correctly deal with both literal ARNs and deploy-time values (tokens),
  but in case of a deploy-time value be aware that the result will be another
  deploy-time value which cannot be inspected in the CDK application.

  ```python




  arn_components = stack.split_arn(arn, ArnFormat.COLON_RESOURCE_NAME)
  function_name = arn_components.resource_name
  ```

  Note that the format of the resource separator depends on the service and
  may be any of the values supported by `ArnFormat`. When dealing with these
  functions, it is important to know the format of the ARN you are dealing with.

  For an exhaustive list of ARN formats used in AWS, see [AWS ARNs and
  Namespaces](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
  in the AWS General Reference.





  Sometimes AWS resources depend on other resources, and the creation of one
  resource must be completed before the next one can be started.

  In general, CloudFormation will correctly infer the dependency relationship
  between resources based on the property values that are used. In the cases where
  it doesn't, the AWS Construct Library will add the dependency relationship for
  you.

  If you need to add an ordering dependency that is not automatically inferred,
  you do so by adding a dependency relationship using
  `constructA.node.addDependency(constructB)`. This will add a dependency
  relationship between all resources in the scope of `constructA` and all
  resources in the scope of `constructB`.

  If you want a single object to represent a set of constructs that are not
  necessarily in the same scope, you can use a `DependencyGroup`. The
  following creates a single object that represents a dependency on two
  constructs, `constructB` and `constructC`:

  ```python

  b_and_c = DependencyGroup()
  b_and_c.add(construct_b)
  b_and_c.add(construct_c)


  construct_a.node.add_dependency(b_and_c)
  ```



  Two different stack instances can have a dependency on one another. This
  happens when an resource from one stack is referenced in another stack. In
  that case, CDK records the cross-stack referencing of resources,
  automatically produces the right CloudFormation primitives, and adds a
  dependency between the two stacks. You can also manually add a dependency
  between two stacks by using the `stackA.addDependency(stackB)` method.

  A stack dependency has the following implications:

  * Cyclic dependencies are not allowed, so if `stackA` is using resources from
    `stackB`, the reverse is not possible anymore.
  * Stacks with dependencies between them are treated specially by the CDK
    toolkit:

    * If `stackA` depends on `stackB`, running `cdk deploy stackA` will also
      automatically deploy `stackB`.
    * `stackB`'s deployment will be performed *before* `stackA`'s deployment.



  To make declaring dependencies between `CfnResource` objects easier, you can declare dependencies from one `CfnResource` object on another by using the `cfnResource1.addDependency(cfnResource2)` method. This method will work for resources both within the same stack and across stacks as it detects the relative location of the two resources and adds the dependency either to the resource or between the relevant stacks, as appropriate. If more complex logic is in needed, you can similarly remove, replace, or view dependencies between `CfnResource` objects with the `CfnResource` `removeDependency`, `replaceDependency`, and `obtainDependencies` methods, respectively.



  Custom Resources are CloudFormation resources that are implemented by arbitrary
  user code. They can do arbitrary lookups or modifications during a
  CloudFormation deployment.

  Custom resources are backed by *custom resource providers*. Commonly, these are
  Lambda Functions that are deployed in the same deployment as the one that
  defines the custom resource itself, but they can also be backed by Lambda
  Functions deployed previously, or code responding to SNS Topic events running on
  EC2 instances in a completely different account. For more information on custom
  resource providers, see the next section.

  Once you have a provider, each definition of a `CustomResource` construct
  represents one invocation. A single provider can be used for the implementation
  of arbitrarily many custom resource definitions. A single definition looks like
  this:

  ```python
  CustomResource(self, "MyMagicalResource",
      resource_type="Custom::MyCustomResource",  # must start with 'Custom::'

      
      properties={
          "Property1": "foo",
          "Property2": "bar"
      },

      
      
      
      service_token="ARN"
  )
  ```



  Custom resources are backed by a **custom resource provider** which can be
  implemented in one of the following ways. The following table compares the
  various provider types (ordered from low-level to high-level):

  | Provider                                                             | Compute Type | Error Handling | Submit to CloudFormation |   Max Timeout   | Language | Footprint |
  | -------------------------------------------------------------------- | :----------: | :------------: | :----------------------: | :-------------: | :------: | :-------: |
  | [sns.Topic](#amazon-sns-topic)                                       | Self-managed |     Manual     |          Manual          |    Unlimited    |   Any    |  Depends  |
  | [lambda.Function](#aws-lambda-function)                              |  AWS Lambda  |     Manual     |          Manual          |      15min      |   Any    |   Small   |
  | [core.CustomResourceProvider](#the-corecustomresourceprovider-class) |  AWS Lambda  |      Auto      |           Auto           |      15min      | Node.js  |   Small   |
  | [custom-resources.Provider](#the-custom-resource-provider-framework) |  AWS Lambda  |      Auto      |           Auto           | Unlimited Async |   Any    |   Large   |

  Legend:

  * **Compute type**: which type of compute can be used to execute the handler.
  * **Error Handling**: whether errors thrown by handler code are automatically
    trapped and a FAILED response is submitted to CloudFormation. If this is
    "Manual", developers must take care of trapping errors. Otherwise, events
    could cause stacks to hang.
  * **Submit to CloudFormation**: whether the framework takes care of submitting
    SUCCESS/FAILED responses to CloudFormation through the event's response URL.
  * **Max Timeout**: maximum allows/possible timeout.
  * **Language**: which programming languages can be used to implement handlers.
  * **Footprint**: how many resources are used by the provider framework itself.

  **A NOTE ABOUT SINGLETONS**

  When defining resources for a custom resource provider, you will likely want to
  define them as a *stack singleton* so that only a single instance of the
  provider is created in your stack and which is used by all custom resources of
  that type.

  Here is a basic pattern for defining stack singletons in the CDK. The following
  examples ensures that only a single SNS topic is defined:

  ```python
  def get_or_create(self, scope):
      stack = Stack.of(scope)
      uniqueid = "GloballyUniqueIdForSingleton" # For example, a UUID from `uuidgen`
      existing = stack.node.try_find_child(uniqueid)
      if existing:
          return existing
      return sns.Topic(stack, uniqueid)
  ```



  Every time a resource event occurs (CREATE/UPDATE/DELETE), an SNS notification
  is sent to the SNS topic. Users must process these notifications (e.g. through a
  fleet of worker hosts) and submit success/failure responses to the
  CloudFormation service.

  > You only need to use this type of provider if your custom resource cannot run on AWS Lambda, for reasons other than the 15
  > minute timeout. If you are considering using this type of provider because you want to write a custom resource provider that may need
  > to wait for more than 15 minutes for the API calls to stabilize, have a look at the [`custom-resources`](#the-custom-resource-provider-framework) module first.
  >
  > Refer to the [CloudFormation Custom Resource documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-custom-resources.html) for information on the contract your custom resource needs to adhere to.

  Set `serviceToken` to `topic.topicArn`  in order to use this provider:

  ```python
  topic = sns.Topic(self, "MyProvider")

  CustomResource(self, "MyResource",
      service_token=topic.topic_arn
  )
  ```



  An AWS lambda function is called *directly* by CloudFormation for all resource
  events. The handler must take care of explicitly submitting a success/failure
  response to the CloudFormation service and handle various error cases.

  > **We do not recommend you use this provider type.** The CDK has wrappers around Lambda Functions that make them easier to work with.
  >
  > If you do want to use this provider, refer to the [CloudFormation Custom Resource documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-custom-resources.html) for information on the contract your custom resource needs to adhere to.

  Set `serviceToken` to `lambda.functionArn` to use this provider:

  ```python
  fn = lambda_.SingletonFunction(self, "MyProvider", function_props)

  CustomResource(self, "MyResource",
      service_token=fn.function_arn
  )
  ```



  The class [`@aws-cdk/core.CustomResourceProvider`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_core.CustomResourceProvider.html) offers a basic low-level
  framework designed to implement simple and slim custom resource providers. It
  currently only supports Node.js-based user handlers, represents permissions as raw
  JSON blobs instead of `iam.PolicyStatement` objects, and it does not have
  support for asynchronous waiting (handler cannot exceed the 15min lambda
  timeout). The `CustomResourceProviderRuntime` supports runtime `nodejs12.x`,
  `nodejs14.x`, `nodejs16.x`, `nodejs18.x`.

  > **As an application builder, we do not recommend you use this provider type.** This provider exists purely for custom resources that are part of the AWS Construct Library.
  >
  > The [`custom-resources`](#the-custom-resource-provider-framework) provider is more convenient to work with and more fully-featured.

  The provider has a built-in singleton method which uses the resource type as a
  stack-unique identifier and returns the service token:

  ```python
  service_token = CustomResourceProvider.get_or_create(self, "Custom::MyCustomResourceType",
      code_directory=f"{__dirname}/my-handler",
      runtime=CustomResourceProviderRuntime.NODEJS_18_X,
      description="Lambda function created by the custom resource provider"
  )

  CustomResource(self, "MyResource",
      resource_type="Custom::MyCustomResourceType",
      service_token=service_token
  )
  ```

  The directory (`my-handler` in the above example) must include an `index.js` file. It cannot import
  external dependencies or files outside this directory. It must export an async
  function named `handler`. This function accepts the CloudFormation resource
  event object and returns an object with the following structure:

  ```js
  exports.handler = async function(event) {
    const id = event.PhysicalResourceId; // only for "Update" and "Delete"
    const props = event.ResourceProperties;
    const oldProps = event.OldResourceProperties; // only for "Update"s

    switch (event.RequestType) {
      case "Create":
        // ...

      case "Update":
        // ...

        // if an error is thrown, a FAILED response will be submitted to CFN
        throw new Error('Failed!');

      case "Delete":
        // ...
    }

    return {
      // (optional) the value resolved from `resource.ref`
      // defaults to "event.PhysicalResourceId" or "event.RequestId"
      PhysicalResourceId: "REF",

      // (optional) calling `resource.getAtt("Att1")` on the custom resource in the CDK app
      // will return the value "BAR".
      Data: {
        Att1: "BAR",
        Att2: "BAZ"
      },

      // (optional) user-visible message
      Reason: "User-visible message",

      // (optional) hides values from the console
      NoEcho: true
    };
  }
  ```

  Here is an complete example of a custom resource that summarizes two numbers:

  `sum-handler/index.js`:

  ```js
  exports.handler = async (e) => {
    return {
      Data: {
        Result: e.ResourceProperties.lhs + e.ResourceProperties.rhs,
      },
    };
  };
  ```

  `sum.ts`:

  ```python
  from constructs import Construct
  from aws_cdk import CustomResource, CustomResourceProvider, CustomResourceProviderRuntime, Token

  class Sum(Construct):

      def __init__(self, scope, id, *, lhs, rhs):
          super().__init__(scope, id)

          resource_type = "Custom::Sum"
          service_token = CustomResourceProvider.get_or_create(self, resource_type,
              code_directory=f"{__dirname}/sum-handler",
              runtime=CustomResourceProviderRuntime.NODEJS_18_X
          )

          resource = CustomResource(self, "Resource",
              resource_type=resource_type,
              service_token=service_token,
              properties={
                  "lhs": lhs,
                  "rhs": rhs
              }
          )

          self.result = Token.as_number(resource.get_att("Result"))
  ```

  Usage will look like this:

  ```python
  sum = Sum(self, "MySum", lhs=40, rhs=2)
  CfnOutput(self, "Result", value=Token.as_string(sum.result))
  ```

  To access the ARN of the provider's AWS Lambda function role, use the `getOrCreateProvider()`
  built-in singleton method:

  ```python
  provider = CustomResourceProvider.get_or_create_provider(self, "Custom::MyCustomResourceType",
      code_directory=f"{__dirname}/my-handler",
      runtime=CustomResourceProviderRuntime.NODEJS_18_X
  )

  role_arn = provider.role_arn
  ```

  This role ARN can then be used in resource-based IAM policies.

  To add IAM policy statements to this role, use `addToRolePolicy()`:

  ```python
  provider = CustomResourceProvider.get_or_create_provider(self, "Custom::MyCustomResourceType",
      code_directory=f"{__dirname}/my-handler",
      runtime=CustomResourceProviderRuntime.NODEJS_18_X
  )
  provider.add_to_role_policy({
      "Effect": "Allow",
      "Action": "s3:GetObject",
      "Resource": "*"
  })
  ```

  Note that `addToRolePolicy()` uses direct IAM JSON policy blobs, *not* a
  `iam.PolicyStatement` object like you will see in the rest of the CDK.



  The [`@aws-cdk/custom-resources`](https://docs.aws.amazon.com/cdk/api/latest/docs/custom-resources-readme.html) module includes an advanced framework for
  implementing custom resource providers.

  Handlers are implemented as AWS Lambda functions, which means that they can be
  implemented in any Lambda-supported runtime. Furthermore, this provider has an
  asynchronous mode, which means that users can provide an `isComplete` lambda
  function which is called periodically until the operation is complete. This
  allows implementing providers that can take up to two hours to stabilize.

  Set `serviceToken` to `provider.serviceToken` to use this type of provider:

  ```python
  provider = customresources.Provider(self, "MyProvider",
      on_event_handler=on_event_handler,
      is_complete_handler=is_complete_handler
  )

  CustomResource(self, "MyResource",
      service_token=provider.service_token
  )
  ```

  See the [documentation](https://docs.aws.amazon.com/cdk/api/latest/docs/aws-cdk-lib.custom_resources-readme.html) for more details.



  A CDK stack synthesizes to an AWS CloudFormation Template. This section
  explains how this module allows users to access low-level CloudFormation
  features when needed.



  CloudFormation [stack outputs](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/outputs-section-structure.html) and exports are created using
  the `CfnOutput` class:

  ```python
  CfnOutput(self, "OutputName",
      value=my_bucket.bucket_name,
      description="The name of an S3 bucket",  # Optional
      export_name="TheAwesomeBucket"
  )
  ```



  CloudFormation templates support the use of [Parameters](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html) to
  customize a template. They enable CloudFormation users to input custom values to
  a template each time a stack is created or updated. While the CDK design
  philosophy favors using build-time parameterization, users may need to use
  CloudFormation in a number of cases (for example, when migrating an existing
  stack to the AWS CDK).

  Template parameters can be added to a stack by using the `CfnParameter` class:

  ```python
  CfnParameter(self, "MyParameter",
      type="Number",
      default=1337
  )
  ```

  The value of parameters can then be obtained using one of the `value` methods.
  As parameters are only resolved at deployment time, the values obtained are
  placeholder tokens for the real value (`Token.isUnresolved()` would return `true`
  for those):

  ```python
  param = CfnParameter(self, "ParameterName")


  param.value_as_string


  param.value_as_number


  param.value_as_list
  ```



  CloudFormation supports a number of [pseudo parameters](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/pseudo-parameter-reference.html),
  which resolve to useful values at deployment time. CloudFormation pseudo
  parameters can be obtained from static members of the `Aws` class.

  It is generally recommended to access pseudo parameters from the scope's `stack`
  instead, which guarantees the values produced are qualifying the designated
  stack, which is essential in cases where resources are shared cross-stack:

  ```python

  stack = Stack.of(self)

  stack.account # Returns the AWS::AccountId for this stack (or the literal value if known)
  stack.region # Returns the AWS::Region for this stack (or the literal value if known)
  stack.partition
  ```



  CloudFormation resources can also specify [resource
  attributes](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-product-attribute-reference.html). The `CfnResource` class allows
  accessing those through the `cfnOptions` property:

  ```python
  raw_bucket = s3.CfnBucket(self, "Bucket")

  raw_bucket_alt = my_bucket.node.default_child


  raw_bucket.cfn_options.condition = CfnCondition(self, "EnableBucket")
  raw_bucket.cfn_options.metadata = {
      "metadata_key": "MetadataValue"
  }
  ```

  Resource dependencies (the `DependsOn` attribute) is modified using the
  `cfnResource.addDependency` method:

  ```python
  resource_a = CfnResource(self, "ResourceA", resource_props)
  resource_b = CfnResource(self, "ResourceB", resource_props)

  resource_b.add_dependency(resource_a)
  ```



  Some resources support a [CreationPolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-creationpolicy.html) to be specified as a CfnOption.

  The creation policy is invoked only when AWS CloudFormation creates the associated resource. Currently, the only AWS CloudFormation resources that support creation policies are `CfnAutoScalingGroup`, `CfnInstance`, `CfnWaitCondition` and `CfnFleet`.

  The `CfnFleet` resource from the `aws-appstream` module supports specifying `startFleet` as
  a property of the creationPolicy on the resource options. Setting it to true will make AWS CloudFormation wait until the fleet is started before continuing with the creation of
  resources that depend on the fleet resource.

  ```python
  fleet = appstream.CfnFleet(self, "Fleet",
      instance_type="stream.standard.small",
      name="Fleet",
      compute_capacity=appstream.CfnFleet.ComputeCapacityProperty(
          desired_instances=1
      ),
      image_name="AppStream-AmazonLinux2-09-21-2022"
  )
  fleet.cfn_options.creation_policy = CfnCreationPolicy(
      start_fleet=True
  )
  ```

  The properties passed to the level 2 constructs `AutoScalingGroup` and `Instance` from the
  `aws-ec2` module abstract what is passed into the `CfnOption` properties `resourceSignal` and
  `autoScalingCreationPolicy`, but when using level 1 constructs you can specify these yourself.

  The CfnWaitCondition resource from the `aws-cloudformation` module suppports the `resourceSignal`.
  The format of the timeout is `PT#H#M#S`. In the example below AWS Cloudformation will wait for
  3 success signals to occur within 15 minutes before the status of the resource will be set to
  `CREATE_COMPLETE`.

  ```python



  resource.cfn_options.creation_policy = CfnCreationPolicy(
      resource_signal=CfnResourceSignal(
          count=3,
          timeout="PR15M"
      )
  )
  ```



  CloudFormation supports [intrinsic functions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference.html). These functions
  can be accessed from the `Fn` class, which provides type-safe methods for each
  intrinsic function as well as condition expressions:

  ```python





  Fn.base64("SGVsbG8gQ0RLIQo=")


  environment_parameter = CfnParameter(self, "Environment")
  Fn.condition_and(
      
      Fn.condition_equals("Production", environment_parameter),
      
      Fn.condition_not(Fn.condition_equals("us-east-1", Aws.REGION)))


  Fn.to_json_string(my_object_or_array)


  Fn.len(Fn.split(",", my_array))
  ```

  When working with deploy-time values (those for which `Token.isUnresolved`
  returns `true`), idiomatic conditionals from the programming language cannot be
  used (the value will not be known until deployment time). When conditional logic
  needs to be expressed with un-resolved values, it is necessary to use
  CloudFormation conditions by means of the `CfnCondition` class:

  ```python
  environment_parameter = CfnParameter(self, "Environment")
  is_prod = CfnCondition(self, "IsProduction",
      expression=Fn.condition_equals("Production", environment_parameter)
  )


  stage = Fn.condition_if(is_prod.logical_id, "Beta", "Prod").to_string()



  bucket = s3.Bucket(self, "Bucket")
  cfn_bucket = my_bucket.node.default_child
  cfn_bucket.cfn_options.condition = is_prod
  ```



  CloudFormation [mappings](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/mappings-section-structure.html) are created and queried using the
  `CfnMappings` class:

  ```python
  region_table = CfnMapping(self, "RegionTable",
      mapping={
          "us-east-1": {
              "region_name": "US East (N. Virginia)"
          },
          "us-east-2": {
              "region_name": "US East (Ohio)"
          }
      }
  )

  region_table.find_in_map(Aws.REGION, "regionName")
  ```

  This will yield the following template:

  ```yaml
  Mappings:
    RegionTable:
      us-east-1:
        regionName: US East (N. Virginia)
      us-east-2:
        regionName: US East (Ohio)
  ```

  Mappings can also be synthesized "lazily"; lazy mappings will only render a "Mappings"
  section in the synthesized CloudFormation template if some `findInMap` call is unable to
  immediately return a concrete value due to one or both of the keys being unresolved tokens
  (some value only available at deploy-time).

  For example, the following code will not produce anything in the "Mappings" section. The
  call to `findInMap` will be able to resolve the value during synthesis and simply return
  `'US East (Ohio)'`.

  ```python
  region_table = CfnMapping(self, "RegionTable",
      mapping={
          "us-east-1": {
              "region_name": "US East (N. Virginia)"
          },
          "us-east-2": {
              "region_name": "US East (Ohio)"
          }
      },
      lazy=True
  )

  region_table.find_in_map("us-east-2", "regionName")
  ```

  On the other hand, the following code will produce the "Mappings" section shown above,
  since the top-level key is an unresolved token. The call to `findInMap` will return a token that resolves to
  `{ "Fn::FindInMap": [ "RegionTable", { "Ref": "AWS::Region" }, "regionName" ] }`.

  ```python



  region_table.find_in_map(Aws.REGION, "regionName")
  ```

  An optional default value can also be passed to `findInMap`. If either key is not found in the map and the mapping is lazy, `findInMap` will return the default value and not render the mapping.
  If the mapping is not lazy or either key is an unresolved token, the call to `findInMap` will return a token that resolves to
  `{ "Fn::FindInMap": [ "MapName", "TopLevelKey", "SecondLevelKey", { "DefaultValue": "DefaultValue" } ] }`, and the mapping will be rendered.
  Note that the `AWS::LanguageExtentions` transform is added to enable the default value functionality.

  For example, the following code will again not produce anything in the "Mappings" section. The
  call to `findInMap` will be able to resolve the value during synthesis and simply return
  `'Region not found'`.

  ```python
  region_table = CfnMapping(self, "RegionTable",
      mapping={
          "us-east-1": {
              "region_name": "US East (N. Virginia)"
          },
          "us-east-2": {
              "region_name": "US East (Ohio)"
          }
      },
      lazy=True
  )

  region_table.find_in_map("us-west-1", "regionName", "Region not found")
  ```



  CloudFormation supports [dynamically resolving](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references.html) values
  for SSM parameters (including secure strings) and Secrets Manager. Encoding such
  references is done using the `CfnDynamicReference` class:

  ```python
  CfnDynamicReference(CfnDynamicReferenceService.SECRETS_MANAGER, "secret-id:secret-string:json-key:version-stage:version-id")
  ```



  CloudFormation templates support a number of options, including which Macros or
  [Transforms](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-section-structure.html) to use when deploying the stack. Those can be
  configured using the `stack.templateOptions` property:

  ```python
  stack = Stack(app, "StackName")

  stack.template_options.description = "This will appear in the AWS console"
  stack.template_options.transforms = ["AWS::Serverless-2016-10-31"]
  stack.template_options.metadata = {
      "metadata_key": "MetadataValue"
  }
  ```



  The `CfnResource` class allows emitting arbitrary entries in the
  [Resources](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/resources-section-structure.html) section of the CloudFormation template.

  ```python
  CfnResource(self, "ResourceId",
      type="AWS::S3::Bucket",
      properties={
          "BucketName": "bucket-name"
      }
  )
  ```

  As for any other resource, the logical ID in the CloudFormation template will be
  generated by the AWS CDK, but the type and properties will be copied verbatim in
  the synthesized template.



  When migrating a CloudFormation stack to the AWS CDK, it can be useful to
  include fragments of an existing template verbatim in the synthesized template.
  This can be achieved using the `CfnInclude` class.

  ```python
  CfnInclude(self, "ID",
      template={
          "Resources": {
              "Bucket": {
                  "Type": "AWS::S3::Bucket",
                  "Properties": {
                      "BucketName": "my-shiny-bucket"
                  }
              }
          }
      }
  )
  ```



  You can prevent a stack from being accidentally deleted by enabling termination
  protection on the stack. If a user attempts to delete a stack with termination
  protection enabled, the deletion fails and the stack--including its status--remains
  unchanged. Enabling or disabling termination protection on a stack sets it for any
  nested stacks belonging to that stack as well. You can enable termination protection
  on a stack by setting the `terminationProtection` prop to `true`.

  ```python
  stack = Stack(app, "StackName",
      termination_protection=True
  )
  ```

  You can also set termination protection with the setter after you've instantiated the stack.

  ```python
  stack = Stack(app, "StackName")
  stack.termination_protection = True
  ```

  By default, termination protection is disabled.



  You can add a description of the stack in the same way as `StackProps`.

  ```python
  stack = Stack(app, "StackName",
      description="This is a description."
  )
  ```



  `CfnJson` allows you to postpone the resolution of a JSON blob from
  deployment-time. This is useful in cases where the CloudFormation JSON template
  cannot express a certain value.

  A common example is to use `CfnJson` in order to render a JSON map which needs
  to use intrinsic functions in keys. Since JSON map keys must be strings, it is
  impossible to use intrinsics in keys and `CfnJson` can help.

  The following example defines an IAM role which can only be assumed by
  principals that are tagged with a specific tag.

  ```python
  tag_param = CfnParameter(self, "TagName")

  string_equals = CfnJson(self, "ConditionJson",
      value={
          "f"aws:PrincipalTag/{tagParam.valueAsString}"": True
      }
  )

  principal = iam.AccountRootPrincipal().with_conditions({
      "StringEquals": string_equals
  })

  iam.Role(self, "MyRole", assumed_by=principal)
  ```

  **Explanation**: since in this example we pass the tag name through a parameter, it
  can only be resolved during deployment. The resolved value can be represented in
  the template through a `{ "Ref": "TagName" }`. However, since we want to use
  this value inside a [`aws:PrincipalTag/TAG-NAME`](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-principaltag)
  IAM operator, we need it in the *key* of a `StringEquals` condition. JSON keys
  *must be* strings, so to circumvent this limitation, we use `CfnJson`
  to "delay" the rendition of this template section to deploy-time. This means
  that the value of `StringEquals` in the template will be `{ "Fn::GetAtt": [ "ConditionJson", "Value" ] }`, and will only "expand" to the operator we synthesized during deployment.



  When deploying to AWS CloudFormation, it needs to keep in check the amount of resources being added inside a Stack. Currently it's possible to check the limits in the [AWS CloudFormation quotas](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cloudformation-limits.html) page.

  It's possible to synthesize the project with more Resources than the allowed (or even reduce the number of Resources).

  Set the context key `@aws-cdk/core:stackResourceLimit` with the proper value, being 0 for disable the limit of resources.



  The AWS CloudFormation templates generated by CDK include indentation by default.
  Indentation makes the templates more readable, but also increases their size,
  and CloudFormation templates cannot exceed 1MB.

  It's possible to reduce the size of your templates by suppressing indentation.

  To do this for all templates, set the context key `@aws-cdk/core:suppressTemplateIndentation` to `true`.

  To do this for a specific stack, add a `suppressTemplateIndentation: true` property to the
  stack's `StackProps` parameter. You can also set this property to `false` to override
  the context key setting.



  [Context values](https://docs.aws.amazon.com/cdk/v2/guide/context.html) are key-value pairs that can be associated with an app, stack, or construct.
  One common use case for context is to use it for enabling/disabling [feature flags](https://docs.aws.amazon.com/cdk/v2/guide/featureflags.html). There are several places
  where context can be specified. They are listed below in the order they are evaluated (items at the
  top take precedence over those below).

  * The `node.setContext()` method
  * The `postCliContext` prop when you create an `App`
  * The CLI via the `--context` CLI argument
  * The `cdk.json` file via the `context` key:
  * The `cdk.context.json` file:
  * The `~/.cdk.json` file via the `context` key:
  * The `context` prop when you create an `App`



  ```python
  App(
      context={
          "@aws-cdk/core:newStyleStackSynthesis": True
      }
  )
  ```

  ```python
  app = App()
  app.node.set_context("@aws-cdk/core:newStyleStackSynthesis", True)
  ```

  ```python
  App(
      post_cli_context={
          "@aws-cdk/core:newStyleStackSynthesis": True
      }
  )
  ```

  ```console
  cdk synth --context @aws-cdk/core:newStyleStackSynthesis=true
  ```

  *cdk.json*

  ```json
  {
    "context": {
      "@aws-cdk/core:newStyleStackSynthesis": true
    }
  }
  ```

  *cdk.context.json*

  ```json
  {
    "@aws-cdk/core:newStyleStackSynthesis": true
  }
  ```

  *~/.cdk.json*

  ```json
  {
    "context": {
      "@aws-cdk/core:newStyleStackSynthesis": true
    }
  }
  ```



  It is possible to apply an [IAM permissions boundary](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html)
  to all roles within a specific construct scope. The most common use case would
  be to apply a permissions boundary at the `Stage` level.

  ```python
  prod_stage = Stage(app, "ProdStage",
      permissions_boundary=PermissionsBoundary.from_name("cdk-${Qualifier}-PermissionsBoundary")
  )
  ```

  Any IAM Roles or Users created within this Stage will have the default
  permissions boundary attached.

  For more details see the [Permissions Boundary](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iam-readme.html#permissions-boundaries) section in the IAM guide.



  If you or your organization use (or would like to use) any policy validation tool, such as
  [CloudFormation
  Guard](https://docs.aws.amazon.com/cfn-guard/latest/ug/what-is-guard.html) or
  [OPA](https://www.openpolicyagent.org/), to define constraints on your
  CloudFormation template, you can incorporate them into the CDK application.
  By using the appropriate plugin, you can make the CDK application check the
  generated CloudFormation templates against your policies immediately after
  synthesis. If there are any violations, the synthesis will fail and a report
  will be printed to the console or to a file (see below).

  > **Note**
  > This feature is considered experimental, and both the plugin API and the
  > format of the validation report are subject to change in the future.



  To use one or more validation plugins in your application, use the
  `policyValidationBeta1` property of `Stage`:

  ```python

  app = App(
      policy_validation_beta1=[
          
          ThirdPartyPluginX(),
          ThirdPartyPluginY()
      ]
  )


  prod_stage = Stage(app, "ProdStage",
      policy_validation_beta1=[
          ThirdPartyPluginX()
      ]
  )
  ```

  Immediately after synthesis, all plugins registered this way will be invoked to
  validate all the templates generated in the scope you defined. In particular, if
  you register the templates in the `App` object, all templates will be subject to
  validation.

  > **Warning**
  > Other than modifying the cloud assembly, plugins can do anything that your CDK
  > application can. They can read data from the filesystem, access the network
  > etc. It's your responsibility as the consumer of a plugin to verify that it is
  > secure to use.

  By default, the report will be printed in a human readable format. If you want a
  report in JSON format, enable it using the `@aws-cdk/core:validationReportJson`
  context passing it directly to the application:

  ```python
  app = App(
      context={"@aws-cdk/core:validationReportJson": True}
  )
  ```

  Alternatively, you can set this context key-value pair using the `cdk.json` or
  `cdk.context.json` files in your project directory (see
  [Runtime context](https://docs.aws.amazon.com/cdk/v2/guide/context.html)).

  If you choose the JSON format, the CDK will print the policy validation report
  to a file called `policy-validation-report.json` in the cloud assembly
  directory. For the default, human-readable format, the report will be printed to
  the standard output.



  The communication protocol between the CDK core module and your policy tool is
  defined by the `IPolicyValidationPluginBeta1` interface. To create a new plugin you must
  write a class that implements this interface. There are two things you need to
  implement: the plugin name (by overriding the `name` property), and the
  `validate()` method.

  The framework will call `validate()`, passing an `IPolicyValidationContextBeta1` object.
  The location of the templates to be validated is given by `templatePaths`. The
  plugin should return an instance of `PolicyValidationPluginReportBeta1`. This object
  represents the report that the user wil receive at the end of the synthesis.

  ```python
  @jsii.implements(IPolicyValidationPluginBeta1)
  class MyPlugin:

      def validate(self, context):
          

          
          
          return PolicyValidationPluginReportBeta1(
              success=False,
              violations=[PolicyViolationBeta1(
                  rule_name="CKV_AWS_117",
                  description="Ensure that AWS Lambda function is configured inside a VPC",
                  fix="https://docs.bridgecrew.io/docs/ensure-that-aws-lambda-function-is-configured-inside-a-vpc-1",
                  violating_resources=[PolicyViolatingResourceBeta1(
                      resource_logical_id="MyFunction3BAA72D1",
                      template_path="/home/johndoe/myapp/cdk.out/MyService.template.json",
                      locations=["Properties/VpcConfig"]
                  )]
              )]
          )
  ```

  In addition to the name, plugins may optionally report their version (`version`
  property ) and a list of IDs of the rules they are going to evaluate (`ruleIds`
  property).

  Note that plugins are not allowed to modify anything in the cloud assembly. Any
  attempt to do so will result in synthesis failure.

  If your plugin depends on an external tool, keep in mind that some developers may
  not have that tool installed in their workstations yet. To minimize friction, we
  highly recommend that you provide some installation script along with your
  plugin package, to automate the whole process. Better yet, run that script as
  part of the installation of your package. With `npm`, for example, you can run
  add it to the `postinstall`
  [script](https://docs.npmjs.com/cli/v9/using-npm/scripts) in the `package.json`
  file.



  Construct authors can add annotations to constructs to report at three different
  levels: `ERROR`, `WARN`, `INFO`.

  Typically warnings are added for things that are important for the user to be
  aware of, but will not cause deployment errors in all cases. Some common
  scenarios are (non-exhaustive list):

  * Warn when the user needs to take a manual action, e.g. IAM policy should be
    added to an referenced resource.
  * Warn if the user configuration might not follow best practices (but is still
    valid)
  * Warn if the user is using a deprecated API



  If you would like to run with `--strict` mode enabled (warnings will throw
  errors) it is possible to `acknowledge` warnings to make the warning go away.

  For example, if > 10 IAM managed policies are added to an IAM Group, a warning
  will be created:

  ```text
  IAM:Group:MaxPoliciesExceeded: You added 11 to IAM Group my-group. The maximum number of managed policies attached to an IAM group is 10.
  ```

  If you have requested a [quota increase](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-quotas-entities)
  you may have the ability to add > 10 managed policies which means that this
  warning does not apply to you. You can acknowledge this by `acknowledging` the
  warning by the `id`.

  ```python
  Annotations.of(self).acknowledge_warning("IAM:Group:MaxPoliciesExceeded", "Account has quota increased to 20")
  ```

  <!--END CORE DOCUMENTATION-->


