Skip to main content

Dapla Auth Client

Project description

Dapla Auth Client

PyPI Status Python Version License

Documentation Tests Coverage Quality Gate Status

pre-commit Black Ruff Poetry

Features

  • Detects Dapla environment, service, and region via environment variables
  • Retrieves current Dapla region (e.g., checks for DAPLA_LAB)
  • Reads Kubernetes service-account token from filesystem
  • Exchanges Kubernetes token for Keycloak token in Dapla Lab
  • Overrides Google-Auth refresh handler to use custom token fetch logic
  • Fetches Google ADC credentials

Requirements

Installation

You can install Dapla Auth Client via pip from PyPI:

pip install dapla-auth-client

Usage

# This code snippet demonstrates how to use the Dapla Auth Client to fetch a personal token.

from dapla_auth_client import AuthClient

print(AuthClient.fetch_personal_token())

Contributing

Contributions are very welcome. To learn more, see the Contributor Guide.

License

Distributed under the terms of the MIT license, Dapla Auth Client is free and open source software.

Issues

If you encounter any problems, please file an issue along with a detailed description.

Credits

This project was generated from Statistics Norway's SSB PyPI Template.

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

dapla_auth_client-0.0.3.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

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

dapla_auth_client-0.0.3-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file dapla_auth_client-0.0.3.tar.gz.

File metadata

  • Download URL: dapla_auth_client-0.0.3.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for dapla_auth_client-0.0.3.tar.gz
Algorithm Hash digest
SHA256 d3a18edc504365e52c4e5d65fbef6b8ecdd3f4682c049d9dc03c919a1fb53e4b
MD5 44e2d6a8ee472a066dac6e3b9b68f1f8
BLAKE2b-256 8bbdcdeed2b29cc8e5e7a91d737e3944c541b29921d572c543b5571724abcee5

See more details on using hashes here.

Provenance

The following attestation bundles were made for dapla_auth_client-0.0.3.tar.gz:

Publisher: release.yml on statisticsnorway/dapla-auth-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 dapla_auth_client-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for dapla_auth_client-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8e0b14e0d01abea8d4cfcdaacd663c582f01df59bb1432cc4a0863eec690479c
MD5 d486e83d53211821f1a34dfceceac92f
BLAKE2b-256 42e861dface8c3bffa3f2717d1cc6c1df06339be40b4ff5b8867cef0ec274fdd

See more details on using hashes here.

Provenance

The following attestation bundles were made for dapla_auth_client-0.0.3-py3-none-any.whl:

Publisher: release.yml on statisticsnorway/dapla-auth-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