Skip to main content

Python client and CLI for Insight

Project description

Insight client

Python client & command line interface for Insight

Client Configuration

Before use, insight-client has to be configured. Configuration includes information about the OIDC provider, insight API and S3 storage backend. When you provide the client with a oidc.client-secret, the client will assume it's being used with a Service Account Role OIDC configuration. When no secret is provided it will try to authenticate using a Device Authorization Grant.

insight configure --help

The insight configuration file can be found $XDG_CONFIG_HOME/insight.conf (default ~/.config/insight.conf)

It is also possible to configure the client through environment variables:

INSIGHT_API_ENDPOINT
INSIGHT_OIDC_ENDPOINT
INSIGHT_OIDC_CLIENT_ID
INSIGHT_OIDC_CLIENT_SECRET
INSIGHT_STORAGE_STS_ENDPOINT
INSIGHT_STORAGE_IDENTITY_ROLE
INSIGHT_STORAGE_ENDPOINT
INSIGHT_STORAGE_BUCKET
INSIGHT_STORAGE_REGION

Development

You can configure the CLI for the default development setup like so, this will make use of the Device Authorization Grant:

poetry run insight configure \
    --api-endpoint=http://localhost:8080 \
    --oidc-endpoint=https://localhost:8000/realms/insight/protocol/openid-connect \
    --oidc-client-id=insight \
    --storage-sts-endpoint=http://localhost:9000 \
    --storage-endpoint=http://localhost:9000 \
    --storage-bucket=insight \
    --storage-region=insight

OAuth2Session does not trust our development certificates and doesn't connect to insecure endpoints be default. We can overload that behaviour like so:

OAUTHLIB_INSECURE_TRANSPORT=1 REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt poetry run insight file list

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

insightclient-0.4.0.tar.gz (20.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

insightclient-0.4.0-py3-none-any.whl (23.3 kB view details)

Uploaded Python 3

File details

Details for the file insightclient-0.4.0.tar.gz.

File metadata

  • Download URL: insightclient-0.4.0.tar.gz
  • Upload date:
  • Size: 20.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for insightclient-0.4.0.tar.gz
Algorithm Hash digest
SHA256 1d29ccacc0d0d2f05ae3a3859ebe40c0fa1229a815e1f48ffe1cecdb42e7276f
MD5 14547140cdf1aa3a6f701019596a5a4f
BLAKE2b-256 893c2a81d56ec493827ceff78ae7bb465ba7afeabdd21b51f7b6590599761e96

See more details on using hashes here.

Provenance

The following attestation bundles were made for insightclient-0.4.0.tar.gz:

Publisher: publish.yml on resolve-works/insight-client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file insightclient-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: insightclient-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 23.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for insightclient-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e6088d5247d1fb0f182e8eb7166c5b96dfe3d4ed7e9e315e103a524c4e29621d
MD5 2bcfdba30be572d67bc617b180ddd243
BLAKE2b-256 f6cd6feec0e5bca758aa86fbf615555a9a7a02d6e8c7ee6099fbf8ae0d8aa768

See more details on using hashes here.

Provenance

The following attestation bundles were made for insightclient-0.4.0-py3-none-any.whl:

Publisher: publish.yml on resolve-works/insight-client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page