pipx install dapla-cliAlternatively you can build dapla-cli using the provided nix flake:
$ nix build .#dapla-cli
$ ./result/bin/dp --versionor open the provided nix shell:
$ nix develop .#
$ dp --versionStarting point: dp --help
This tool uses a device flow to authenticate against a Keycloak client.
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.
Run the command and then follow the instructions to
dp auth logindp auth login --client my-client --env testOnce logged in, the access token can be accessed.
dp auth show-access-tokendp auth show-access-token --client my-client --env test --to-clipboarddp auth logoutPlease see the Reference Guide for details.
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 environmentContributions are very welcome. To learn more, see the Contributor Guide.
Distributed under the terms of the MIT license, Dapla CLI is free and open source software.
If you encounter any problems, please file an issue along with a detailed description.
This project was generated from Statistics Norway's SSB PyPI Template.