Skip to main content

Dapla CLI

Project description

Dapla CLI

PyPI Status Python Version License

Documentation Tests Coverage Quality Gate Status

pre-commit Black Ruff Poetry

Installation

Install with pipx from pypi:

pipx install dapla-cli

Alternatively you can build dapla-cli using the provided nix flake:

$ nix build .#dapla-cli
$ ./result/bin/dp --version

or open the provided nix shell:

$ nix develop .#
$ dp --version

Usage

Starting point: dp --help

Auth

This tool uses a device flow to authenticate against a Keycloak client.

Keycloak clients

By default it will use a client called dapla-cli, but this may be customized by providing a value --client my-client.

Any client used by this tool needs to have the device flow activated. Refer here for an example client configuration.

Login

Run the command and then follow the instructions to

dp auth login
dp auth login --client my-client --env test

Show token

Once logged in, the access token can be accessed.

dp auth show-access-token
dp auth show-access-token --client my-client --env test --to-clipboard

Logout

dp auth logout

API reference

Please see the Reference Guide for details.

Development

Install a local development edition with pipx from the source code:

pipx install --editable .

Alternatively, use make help for other options, such as running Dapla CLI in an isolated environment:

run-isolated       Run Dapla CLI in isolated environment (Docker container) using latest release from PyPI
run-isolated-dev   Run Dapla CLI in isolated environment (Docker container) using latest release from local source (in editable mode)
pipx-install       Install with pipx from PyPI
pipx-install-dev   Install with pipx from the source code in editable mode
build-docker       Build local Docker image for testing in an isolated environment

Contributing

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

License

Distributed under the terms of the MIT license, Dapla CLI 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_cli-0.3.0.tar.gz (15.9 kB view details)

Uploaded Source

Built Distribution

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

dapla_cli-0.3.0-py3-none-any.whl (16.2 kB view details)

Uploaded Python 3

File details

Details for the file dapla_cli-0.3.0.tar.gz.

File metadata

  • Download URL: dapla_cli-0.3.0.tar.gz
  • Upload date:
  • Size: 15.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for dapla_cli-0.3.0.tar.gz
Algorithm Hash digest
SHA256 2303bdef44d4667b5cf33b0f05c004a8f6ff2362eb3591cd666e8af5c6cba28d
MD5 123805843ec26041fa39ae8cec4c3fdf
BLAKE2b-256 8837d8f58c3c66fe6ba5d79aee1b1cabe3676d74edec5e30b77f3b0318dac7c2

See more details on using hashes here.

Provenance

The following attestation bundles were made for dapla_cli-0.3.0.tar.gz:

Publisher: release.yml on statisticsnorway/dapla-cli

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_cli-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: dapla_cli-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 16.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for dapla_cli-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b6b3ea9c959533987afcc557e7a33e2ed2624ce33d29c1c3b42e3424ae6224ac
MD5 f9c948c6f5a9e2b6046d5e7f0e2aa156
BLAKE2b-256 7c7895834118e78787f70dbd23f7e8e480d0ef175ec5f6c20597b1feddaef2f1

See more details on using hashes here.

Provenance

The following attestation bundles were made for dapla_cli-0.3.0-py3-none-any.whl:

Publisher: release.yml on statisticsnorway/dapla-cli

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