scope-pm4py
Small Python adapter package for loading Scope OCPT and OCPN JSON exports into PM4Py runtime objects.
Install locally
From this directory:
python -m pip install -e .
Usage
from scope_pm4py import load_ocpt, load_ocpn
import pm4py
tree = load_ocpt(r"C:\Users\Postb\Downloads\scope_ocpt_example_pm4py.json")
pm4py.view_process_tree(tree)
ocpn = load_ocpn(r"C:\Users\Postb\Downloads\scope_ocpn_example_pm4py.json")
pm4py.view_ocpn(ocpn, format="svg")
Expected JSON
The loader accepts files with a top-level payload object or files where the
payload is the top-level object.
OCPT exports should contain:
{
"schema": "scope.pm4py.ocpt",
"schema_version": "1.0.0",
"payload": {
"tree": {
"type": "operator",
"operator": "sequence",
"children": [
{ "type": "activity", "label": "Create Order" },
{ "type": "tau" }
]
}
}
}
OCPN exports should contain:
{
"schema": "scope.pm4py.ocpn",
"schema_version": "1.0.0",
"payload": {
"object_types": ["order"],
"activities": ["Create Order"],
"petri_nets": {
"order": {
"places": [
{ "id": "p1", "name": "source", "initial": true },
{ "id": "p2", "name": "sink", "final": true }
],
"transitions": [
{ "id": "t1", "name": "Create Order", "label": "Create Order" }
],
"arcs": [
{ "source": "p1", "target": "t1" },
{ "source": "t1", "target": "p2" }
]
}
}
}
}
The OCPN loader reconstructs PM4Py PetriNet and Marking objects. A plain
json.load() result is not enough for PM4Py visualization and analysis.
Build
From this directory:
python -m pip install build
python -m build
This creates:
dist/
scope_pm4py-0.1.0-py3-none-any.whl
scope_pm4py-0.1.0.tar.gz
Publish to PyPI
Create accounts on:
- TestPyPI: https://test.pypi.org/
- PyPI: https://pypi.org/
Create an API token in the account settings. Then install Twine:
python -m pip install twine
Validate the build artifacts:
python -m twine check dist/*
Upload to TestPyPI first:
python -m twine upload --repository testpypi dist/*
Install from TestPyPI in a clean environment:
python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ scope-pm4py
If that works, upload to the real PyPI:
python -m twine upload dist/*
After publishing, users install it with:
python -m pip install scope-pm4py
Metadata
Release files for scope-pm4py 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| scope_pm4py-0.1.0.tar.gz | 7.2 kB | Without provenance | Details for scope_pm4py-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| scope_pm4py-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for scope_pm4py-0.1.0-py3-none-any.whl |
Total release size: 13.0 kB
Release files / scope_pm4py-0.1.0.tar.gz
| Download URL | scope_pm4py-0.1.0.tar.gz |
|---|---|
| Size | 7.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d2f8f63a2c98fdcacf62508fdd070b16e452f1d51d306cf067044697321dea5d
|
|
BLAKE2b-256 checksum How to use checksums |
200a4a326975de6b251ee9ca7a783f2f0fdba286e070307d74b56d7161e0f0d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.0
|
Release files / scope_pm4py-0.1.0-py3-none-any.whl
| Download URL | scope_pm4py-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2386649cc02cc2bb0a89d89ed1c8cb187c5b4001252d9473e35ae7b52d9869a3
|
|
BLAKE2b-256 checksum How to use checksums |
452e7b790109bbc4cc60c13adf5a0ac1a5a9ce0d2d77a05a880d1321c03b7f08
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.0
|
Security for scope-pm4py 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.