Skip to main content

Dapla Auth Client

PyPI Status Python Version License

Documentation Tests Coverage Quality Gate Status

pre-commit Black Ruff Uv

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

  • Python 3.11+
  • uv, install via curl -LsSf https://astral.sh/uv/install.sh | sh

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.

Metadata

Release files for dapla-auth-client 2.0.0

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

Source distribution (sdist)

Source distribution for dapla-auth-client 2.0.0
File Size Uploaded Provenance Actions
dapla_auth_client-2.0.0.tar.gz 7.5 kB With provenance Details for dapla_auth_client-2.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dapla-auth-client 2.0.0
File Interpreter ABI Platform Actions
dapla_auth_client-2.0.0-py3-none-any.whl Python 3 none any Details for dapla_auth_client-2.0.0-py3-none-any.whl

Total release size: 14.1 kB

Release files / dapla_auth_client-2.0.0.tar.gz

Download URL dapla_auth_client-2.0.0.tar.gz
Size 7.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e17960f63e6c92bb661fe0b56815430e20990544bc0911352b3bb99a2b0c9e12
BLAKE2b-256 checksum
How to use checksums
da5546310ef076d4419e9ae14b3b253c82e39ceee641139a489febf3f65bb44a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

Release files / dapla_auth_client-2.0.0-py3-none-any.whl

Download URL dapla_auth_client-2.0.0-py3-none-any.whl
Size 6.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d61190db366f421674ba011ce857e7e3baf0f5d14f79d076e820c3dbae2dbff6
BLAKE2b-256 checksum
How to use checksums
3de5d85812578447c2197e46ce3a23f7f71e6424000688d7acb278a0fc6850ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

Security for dapla-auth-client 2.0.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for dapla_auth_client-2.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

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