BPMN Process Navigation Library
Project description
bpmn-lib
A Python library for navigating BPMN (Business Process Model and Notation) element hierarchies and managing in-memory process data. Designed for use in Python-based process automation and tooling pipelines.
What it does
bpmn-lib lets you load a BPMN process model from markdown-defined schemas and data files, then navigate it programmatically:
- Traverse parent-child element hierarchies (e.g.
bpmn_element → activity → task → user_task) - Navigate sequence flows forward and backward
- Query element attributes across inheritance chains
- Resolve data associations (inputs/outputs)
- Validate element type specificity and FK constraints
Installation
pip install bpmn-lib
Install with dev dependencies (for development):
pip install -e ".[dev]"
Quick Start
from bpmn_lib.navigator.navigator_factory import create_navigator
navigator = create_navigator(
schema_file="path/to/schema.md",
data_file="path/to/data.md",
hierarchy_file="path/to/hierarchy.md",
log_dir="path/to/logs",
schema_name="My BPMN Schema"
)
# Navigate sequence flows
next_elements = navigator.next_elements_in_flow(element_id)
# Get all elements in a process
elements = navigator.get_process_elements(process_id)
# Read an attribute (traverses inheritance chain)
value = navigator.get_element_attribute(element_id, "attribute_name")
Architecture
┌─────────────────────────────────────┐
│ Navigation Layer │ ← BPMNHierarchyNavigator
├─────────────────────────────────────┤
│ Database Instance Layer │ ← DatabaseInstance, DatabaseBuilder
├─────────────────────────────────────┤
│ Database Schema Layer │ ← DatabaseSchema, TableDefinition
├─────────────────────────────────────┤
│ Parsing Layer │ ← DatabaseSchemaParser, MarkdownDocument
└─────────────────────────────────────┘
Schema definitions and instance data are loaded from markdown files. The factory function orchestrates the full pipeline: parse schema → load data → validate constraints → build indexes → create navigator.
Testing
pytest tests/ -v
pytest tests/unit/ -v
pytest tests/integration/ -v
pytest tests/ --cov=bpmn_lib --cov-report=term-missing
License
MIT — see LICENSE
Project details
Release history Release notifications | RSS feed
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 bpmn_lib-4.0.5.tar.gz.
File metadata
- Download URL: bpmn_lib-4.0.5.tar.gz
- Upload date:
- Size: 45.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c0428de2bc44d9f3c28177fa41e0855199d4efcbe6f5f18564b5eb785a9e728
|
|
| MD5 |
4a923b815bc6769926756f035ba11951
|
|
| BLAKE2b-256 |
d6c46d34aabeb27452ffa556d56414833ef8a6299de2e56631992d8cf1e3799d
|
Provenance
The following attestation bundles were made for bpmn_lib-4.0.5.tar.gz:
Publisher:
publish.yml on hennig-ai/bpmn-lib
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bpmn_lib-4.0.5.tar.gz -
Subject digest:
0c0428de2bc44d9f3c28177fa41e0855199d4efcbe6f5f18564b5eb785a9e728 - Sigstore transparency entry: 1280639295
- Sigstore integration time:
-
Permalink:
hennig-ai/bpmn-lib@4d3c9091b35b4347f7537285d20314a8064e58ee -
Branch / Tag:
refs/heads/main - Owner: https://github.com/hennig-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4d3c9091b35b4347f7537285d20314a8064e58ee -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file bpmn_lib-4.0.5-py3-none-any.whl.
File metadata
- Download URL: bpmn_lib-4.0.5-py3-none-any.whl
- Upload date:
- Size: 55.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3dedf9060f7ad33150114b4bf1f0a445be09b2d73493dcedb3d988b06046a9f7
|
|
| MD5 |
2d4dc16ceafa08b86145926a8c56e711
|
|
| BLAKE2b-256 |
48e4eff06d98286b11d5c3fd7cfba0b2166e5f5feff57f5c9440f2e68b2193b2
|
Provenance
The following attestation bundles were made for bpmn_lib-4.0.5-py3-none-any.whl:
Publisher:
publish.yml on hennig-ai/bpmn-lib
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bpmn_lib-4.0.5-py3-none-any.whl -
Subject digest:
3dedf9060f7ad33150114b4bf1f0a445be09b2d73493dcedb3d988b06046a9f7 - Sigstore transparency entry: 1280639299
- Sigstore integration time:
-
Permalink:
hennig-ai/bpmn-lib@4d3c9091b35b4347f7537285d20314a8064e58ee -
Branch / Tag:
refs/heads/main - Owner: https://github.com/hennig-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4d3c9091b35b4347f7537285d20314a8064e58ee -
Trigger Event:
workflow_dispatch
-
Statement type: