Skip to main content

Command-line interface for DICE

Project description

DICE Command Line Interface (CLI)

Actions Status Documentation Status Code style: black

PyPI version PyPI platforms

Installation

The best way to install dice-cli is via pipx. This will setup a separate virtualenv for dice-cli preventing interference with your normal Python setup.

pipx install dice-cli

For tab-completion of the DICE CLI, you can run

dice --install-completion

which will install the completion for your shell.

Should you be using a "non-standard" shell, you can check what will be installed through

dice --show-completion

Development

Development cycle

dice-cli has a direct, tight dependency on dice-lib. New features are usually developed within dice-cli first, and then common functionality is moved to dice-lib.

Code layout

CLI commands are currently grouped into two categories: admin and user. All categories, except for user need to be placed in their respective folders. Each category should use its own logging and error handling to allow for individual tuning.

Main commands are implemented directly into <category>/__init__.py, e.g. dice admin scan_groups_and_users, while subcommands should be placed in <category>/<command>/__init__.py, e.g. dice job why_is_my_job_not_running.

Should a command require extensive logic, it should be placed in its own file , e.g. admin/_print_used_id_ranges.py. This will be the main point of change when things move to dice-lib.

Snapshot (2022.02.17):

src/dice_cli/
├── __init__.py
├── _io
│   ├── __init__.py
│   └── _csv.py
├── admin # `dice admin` category   ├── __init__.py
│   ├── _print_unused_id_ranges.py # main command functionality for `dice admin print_unused_id_ranges`   ├── _print_used_id_ranges.py
│   ├── _scan_groups_and_users.py
│   └── report # all `dice admin report` commands       ├── __init__.py
│       ├── __pycache__
│       ├── _consistency_check_grid.py
│       ├── _inventory.py
│       ├── _network.py
│       └── _storage.py
├── benchmark
│   ├── __init__.py
├── docs
│   ├── __init__.py
├── fs # user command example: `dice fs`   ├── __init__.py
│   └── _copy_from_local.py
├── info
│   ├── __init__.py
├── job
│   ├── __init__.py
├── logger.py
├── main.py
└── py.typed

Local installation

conda create -n dice python=3.8
conda activate dice
# make sure to have the latst pip
pip install -U pip
# install dice-cli
pip install -e .

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

dice_cli-2025.3.1.tar.gz (25.4 kB view details)

Uploaded Source

Built Distribution

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

dice_cli-2025.3.1-py3-none-any.whl (29.3 kB view details)

Uploaded Python 3

File details

Details for the file dice_cli-2025.3.1.tar.gz.

File metadata

  • Download URL: dice_cli-2025.3.1.tar.gz
  • Upload date:
  • Size: 25.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.5

File hashes

Hashes for dice_cli-2025.3.1.tar.gz
Algorithm Hash digest
SHA256 59b63e77e49b5102d460b558a53506cf2f44d8a604599a02850e0a4fe871c1b6
MD5 8bd204485a7c4810e7a7970fb5ddd025
BLAKE2b-256 d034953cec4bebe8a4b7a8629f323d6128466f4d7aa5779193b83f36a21b12f1

See more details on using hashes here.

File details

Details for the file dice_cli-2025.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for dice_cli-2025.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7be611bec36e1b24404a0d590715fdd9547d1c69135d443d00f9e2de29b94b4c
MD5 81aca304ab9fa293af4a6a4a80488e70
BLAKE2b-256 5e6f31a2a759d2166239c3e58f8223860d6b102daa02f0e1538dde2148ef24f2

See more details on using hashes here.

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