Skip to content

Installation

Prerequisites

  • Python 3.8 or newer
  • Poetry (optional for CLI users, recommended for developers)

For Users of CLI Applications

  • Install with pip (recommended for CLI use):
pip install "git+https://github.com/dwikler/dcmspec.git@v0.1.0"
  • Alternatively, install with Poetry (requires cloning the repo):
git clone https://github.com/dwikler/dcmspec.git
cd dcmspec
poetry install
  • Run CLI applications (replace <script_name> with one of the following):
python -m dcmspec.cli.<script_name> --help

Examples:

python -m dcmspec.cli.iodattributes --help
python -m dcmspec.cli.tdwiimoddefinition --help

Or, if using Poetry:

poetry run python -m src.dcmspec.cli.<script_name> --help

See the CLI Applications for available scripts and usage examples.


For Developers Using the API

  • Add the following to your pyproject.toml (for Poetry-based projects):
[tool.poetry.dependencies]
dcmspec = { git = "https://github.com/dwikler/dcmspec.git", tag = "v0.1.0" }
  • Install the dependencies:
poetry install
  • (Optional) Activate the virtual environment:
poetry shell
  • Import and use the API in your Python code:
from dcmspec.spec_model import SpecModel

# ... your code here ...

See the API Reference for details on available classes.