Skip to main content

General tools for working with Object-Centric Event Logs and building Ocelescope plugins

Project description

ocelescope

General tools and building blocks for working with Object-Centric Event Logs (OCEL) and for building plugins for the Ocelescope framework.

Installation

pip install ocelescope

To also install the optional dependencies used by plugins:

pip install "ocelescope[plugin]"

Usage

Loading an OCEL

OCEL.read loads an OCEL 2.0 log from a .sqlite, .xml or .json file:

from ocelescope import OCEL

ocel = OCEL.read("order-management.sqlite")

# Structured access to the log via managers (each exposes a pandas DataFrame):
print(ocel.events.df.head())
print(ocel.objects.df.head())
print(ocel.e2o.df.head())   # event-to-object relations
print(ocel.o2o.df.head())   # object-to-object relations

Filtering

OCEL.filter applies a pipeline of filters and returns a new, filtered OCEL:

from ocelescope import OCEL, EventTypeFilter, ObjectTypeFilter

ocel = OCEL.read("order-management.sqlite")

filtered = ocel.filter(
    [
        EventTypeFilter(event_types=["place order", "pay order"], mode="include"),
        ObjectTypeFilter(object_types=["items"], mode="exclude"),
    ]
)

filtered.write("filtered.sqlite")

Command line

The package also ships an ocelescope command-line entry point:

ocelescope --help

Typing

This package is fully type-hinted and ships a PEP 561 py.typed marker, so type checkers such as mypy, pyright and ty pick up its types automatically — no extra stubs required.

About

Part of Ocelescope, a framework for working with Object-Centric Event Logs developed at the Chair of Process and Data Science (PADS), RWTH Aachen University.

📖 Documentation: https://www.ocelescope.org

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ocelescope-0.3.1.tar.gz (50.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ocelescope-0.3.1-py3-none-any.whl (78.9 kB view details)

Uploaded Python 3

File details

Details for the file ocelescope-0.3.1.tar.gz.

File metadata

  • Download URL: ocelescope-0.3.1.tar.gz
  • Upload date:
  • Size: 50.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.25 {"installer":{"name":"uv","version":"0.11.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for ocelescope-0.3.1.tar.gz
Algorithm Hash digest
SHA256 5f2940353df8e4b29e1bbe93e524cfe3915870946086e6fbcf1b6a78205f4393
MD5 98546e3011d00ed7d95c9563fa8b917a
BLAKE2b-256 5618511981b900cfe9e21237a93325e89f08334d75e4d01a7710e8d85bf4ff8a

See more details on using hashes here.

File details

Details for the file ocelescope-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: ocelescope-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 78.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.25 {"installer":{"name":"uv","version":"0.11.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for ocelescope-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b4b291baf85fed499e6ec8ffe3ad1745edd6b7e6cc42ec3ea7cd64fb4349fb5a
MD5 e2cec8525c254586cd751209346d50bc
BLAKE2b-256 e8612617b41d4cac4ab12be0f7f4c0e2c868e4a45716b75fa9634394045bfd37

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page