Skip to main content

idem-aiohttp

aiohttp provider for Idem

DEVELOPMENT

Clone the idem-aiohttp repository and install with pip.

git clone git@gitlab.com:saltstack/idem/idem-aiohttp.git
pip install -e idem-aiohttp

ACCT

After installation aiohttp Idem Provider execution and state modules will be accessible to the pop hub. In order to use them we need to set up our credentials.

Create a new file called credentials.yaml and populate it with profiles. The default profile will be used automatically by idem unless you specify one with –acct-profile=profile_name on the cli.

acct backends provide alternate methods for storing profiles.

A profile needs to specify the authentication parameters for aiohttp. Every one of the parameters is optional. Here, all available options are shown with their defaults:

credentials.yaml

request.basic_auth:
  default:
    auth:
      # aiohttp.BasicAuth options
      login:
      password:
      encoding: latin1
    connector:
      # aiohttp.connector.TCPConnector options
      verify_ssl: True,
      fingerprint:
      use_dns_cache: True
      ttl_dns_cache: 10
      family: 0
      ssl_context:
      ssl:
      local_addr:
      keepalive_timeout:
      force_close: False
      limit: 100
      limit_per_host: 0
      enable_cleanup_closed: False
    resolver:
      # aiodns.DNSResolver options
      nameservers:
      # pycares.Channel options
      flags:
      timeout:
      tries:
      ndots:
      tcp_port:
      udp_port:
      servers:
      domains:
      lookups:
      sock_state_cb:
      socket_send_buffer_size:
      socket_receive_buffer_size:
      rotate:
      local_ip:
      local_dev:
      resolvconf_path:
    session:
      # aiohttp.ClientSession options
      cookies:
      headers:
      skip_auto_headers:
      version: http_version
      connector_owner: True
      raise_for_status: False
      conn_timeout:
      auto_decompress: True
      trust_env: False
      requote_redirect_url: True
      trace_configs:
      read_bufsize: 65536
    cookie_jar:
      quote_cookie=False
      unsafe=True

Now encrypt the credentials file and add the encryption key and encrypted file path to the ENVIRONMENT.

The acct command should be available as it is a requisite of idem and idem_aiohttp. Encrypt the the credential file.

acct encrypt credentials.yaml

output:

-A9ZkiCSOjWYG_lbGmmkVh4jKLFDyOFH4e4S1HNtNwI=

Add these to your environment:

export ACCT_KEY="-A9ZkiCSOjWYG_lbGmmkVh4jKLFDyOFH4e4S1HNtNwI="
export ACCT_FILE=$PWD/credentials.yaml.fernet

USAGE

If no profile is specified, the profile called “default”, if one exists, will be used. A profile can be specified from the command line when calling an exec module directly.

idem exec --acct-profile my-staging-env request.raw.get https://my-url.com

Metadata

Release files for idem-aiohttp 3.0.1

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

Source distribution (sdist)

Source distribution for idem-aiohttp 3.0.1
File Size Uploaded Provenance Actions
idem-aiohttp-3.0.1.tar.gz 12.7 kB Without provenance Details for idem-aiohttp-3.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for idem-aiohttp 3.0.1
File Interpreter ABI Platform Actions
idem_aiohttp-3.0.1-py3-none-any.whl Python 3 none any Details for idem_aiohttp-3.0.1-py3-none-any.whl

Total release size: 26.2 kB

Release files / idem-aiohttp-3.0.1.tar.gz

Download URL idem-aiohttp-3.0.1.tar.gz
Size 12.7 kB
Tags Source
SHA-256 checksum
How to use checksums
9c6b8967a45887c012ec31b97fde9dc4a23b02944759ac95936224bf8850e06f
BLAKE2b-256 checksum
How to use checksums
cbec8e18afcc6525df0aca3e16e4e41d3b8700e575a3740465066a5127e78d2d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.9.6 readme-renderer/41.0 requests/2.31.0 requests-toolbelt/1.0.0 urllib3/2.0.5 tqdm/4.66.1 importlib-metadata/6.8.0 keyring/24.2.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.9.18

Release files / idem_aiohttp-3.0.1-py3-none-any.whl

Download URL idem_aiohttp-3.0.1-py3-none-any.whl
Size 13.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c3304b61af83db2da43c0265c2aed70e2f6a48cec8ae8ee3c2f7089c3501e683
BLAKE2b-256 checksum
How to use checksums
72f6b5648ee3e4288f3706111f3137ef260100c099cdcbe700298fdf0952173d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.9.6 readme-renderer/41.0 requests/2.31.0 requests-toolbelt/1.0.0 urllib3/2.0.5 tqdm/4.66.1 importlib-metadata/6.8.0 keyring/24.2.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.9.18

Security for idem-aiohttp 3.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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