Metadata-Version: 2.4
Name: dcm-processor-utils
Version: 0.0.1
Summary: A Command line tool for the dicom processor library
Home-page: https://github.com/giesekow/dcm-processor-utils
Author: Giles Tetteh
Author-email: giles.tetteh@tum.de
Keywords: orthanc,dicom,worker,processor,translation,medical
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests==2.32.4
Dynamic: license-file

# dcm-processor-utils

`dcm-processor-utils` contains the shared helper functionality used across the dcm-processor platform.

It is the lowest-level common utility package among the modules we scanned.

## Role In The Bigger Picture

This module is not a user-facing runtime on its own. Its value is that it keeps duplicated low-level logic out of the higher-level packages.

It currently provides shared behavior for things like:

- device identification
- archive and file handling
- downloader/path classification logic
- constants and settings enums

Other modules depend on it so they can share the same basic contracts and helper implementations.

## Main Responsibilities

### 1. Archive And File Helpers

The module provides the shared file and archive handling logic used by other packages.

This includes:

- zipping directories
- extracting archives
- safe archive extraction checks

### 2. Shared Downloader Helpers

The module now also owns the shared downloader logic for:

- path classification
- web and git download handling
- archive extraction after download
- locating `dcm-processor.json`
- splitting version expressions

This keeps the CLI and DB-provider modules from carrying separate copies of the same download/extraction logic.

### 3. Device Identity

The package provides device identity helpers used by runtime modules to identify the local machine in a stable way where possible.

### 4. Shared Constants

The module exports shared constant types and app setting identifiers used throughout the platform.

## Key Internal Areas

- `dcm_processor_utils/file_manager.py`
  - zip and unzip helpers
- `dcm_processor_utils/downloaders.py`
  - shared downloader and path classification logic
- `dcm_processor_utils/device_info.py`
  - device identification helpers
- `dcm_processor_utils/constants.py`
  - shared settings and constant values

## Dependencies On Other Modules

This package is intentionally low in the dependency graph.

It is used by:

- `dcm-processor-cli`
- `dcm-processor-db-provider`
- `dcm-processor-job-scheduler`
- `dcm-processor-worker`
- `dcm-processor-service`

## What This Module Is Not

This package is not:

- an application runtime
- a worker
- a scheduler
- a DICOM server
- a persistence layer

It is the shared infrastructure support package for the rest of the system.

## Summary

Use this module for reusable low-level behavior that should stay consistent across the platform.

It exists to reduce duplication and keep the higher-level modules aligned on common helper logic.
