DOORS-to-Python ORM
Highlights
- Automated ORM Generation: Dynamically maps DOORS formal modules into strictly typed Python objects.
- Pydantic Type Safety: Automatically converts DOORS drop-down choices into strict Python
Literaltypes, providing IDE autocomplete and validation. - Headless DXL Execution: Interacts directly with the DOORS database in batch mode (no GUI required) with built-in memory management.
- Agnostic Core Engine: Completely decouples project-specific business logic from the core DOORS extraction mechanics.
Overview
Integrating Python data pipelines with legacy IBM Rational DOORS databases is difficult. Developers are often forced to write raw DXL scripts or deal with fragile, untyped dictionaries.
This project acts as an automated Object-Relational Mapper (ORM) for DOORS. It uses headless DXL scripts to extract the attribute schema of any DOORS Formal Module, converts that schema into a standard JSON Schema, and leverages datamodel-codegen to build Pydantic models.
Usage
Generate models and extract data directly from the CLI using the newly installed terminal command:
# Extract the schema, generate models, and pull data using an absolute DOORS path
doors-client --profile all --module-path "/Project Name/System Subfolder/Requirements/Target Formal Module"
Once extracted, interact with your DOORS data natively in Python:
>>> from pathlib import Path
>>> from pydantic import TypeAdapter
>>> from generated.models import DoorsObject
# Load your extracted data natively
>>> adapter = TypeAdapter(list[DoorsObject])
>>> reqs = adapter.validate_json(Path("generated/module_data.json").read_text(encoding="cp1252"))
# Enjoy full IDE autocomplete and strict type validation!
>>> print(reqs[0].absolute_number)
155
>>> reqs[0].verification_status = "Invalid Status"
ValidationError: 1 validation error for DoorsObject
verification_status
Input should be 'Passed', 'Failed', 'Pending', or '' [type=literal_error, input_value='Invalid Status', input_type=str]
Installation
Ensure you have Python 3.10+ installed. You can install the package directly from PyPI:
pip install doors-client
To install the latest development version directly from GitHub:
pip install git+[https://github.com/prknezek/doors-client.git](https://github.com/prknezek/doors-client.git)
If you are cloning the repository for local development, install it in editable mode:
pip install -e .
System Requirements
- IBM Rational DOORS: The DOORS client must be installed on your local machine.
- DOORS Executable: Set the
DOORS_EXE_PATHenvironment variable to point to yourdoors.exeinstallation (e.g.,C:/Program Files/IBM/Rational/DOORS/9.7/bin/doors.exe), or explicitly pass the--doors-exeflag to the CLI when running the script.
License
doors-client is distributed under the MIT license. See the included LICENSE file for details.
I am providing code in the repository to you under an open source license. Because this is my personal repository, the license you receive to my code is from me and not my employer.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file doors_client-0.2.2.tar.gz.
File metadata
- Download URL: doors_client-0.2.2.tar.gz
- Upload date:
- Size: 11.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
65a5a8d4a97224acc091fb0509a8675f87d55bdde43011fb55f5713c16190cc5
|
|
| MD5 |
fff036856b8eed9fe1b221db6a12252a
|
|
| BLAKE2b-256 |
f54dad0171eb88d4b771e7ae7f5a6f85b47f69241e9e60219f32cafd0c54cc79
|
File details
Details for the file doors_client-0.2.2-py3-none-any.whl.
File metadata
- Download URL: doors_client-0.2.2-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d2d5b8657881962bd9e2b858e467bf70fc396fa0e05690fa0f3fa7ff9b7e696c
|
|
| MD5 |
436eb5734f7aeb935a3d67dad6d86921
|
|
| BLAKE2b-256 |
836ccde2c29bca10de290e18c47803b53968443d616bc0b553468486fe56c736
|