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.0.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.0-py3-none-any.whl (78.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ocelescope-0.3.0.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.0.tar.gz
Algorithm Hash digest
SHA256 06eceb239e0d95fc27f993d2e46793ddab779b7b7f5ca107a0e5e45d65f63878
MD5 49c2f77670d0c41b18ec73cc96fc2d7e
BLAKE2b-256 c5299099bdf35de7043007c9d47fce919a99d25d8b1ee53f65dc9eb0f5940ec7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ocelescope-0.3.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f22ea5a3b5ad0e26c40b9e424b489494df641358b588fd0240247476315f06f5
MD5 7c81d8246e8f86d4cadc941e6c40fb17
BLAKE2b-256 b31c3082274ffb3acfff5ca849b849e451596b612dd12659b9bb66525b3da1ef

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