{"id":16489799,"url":"https://github.com/aarkue/rustxes","last_synced_at":"2025-06-20T15:37:54.936Z","repository":{"id":204096131,"uuid":"709164231","full_name":"aarkue/rustxes","owner":"aarkue","description":"A Python package to efficiently import XES or OCEL2 event logs using Rust.","archived":false,"fork":false,"pushed_at":"2025-02-20T12:39:07.000Z","size":108,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-01T04:26:57.254Z","etag":null,"topics":["data-science","process-mining","rust","xes"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/rustxes/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aarkue.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-24T06:42:21.000Z","updated_at":"2025-02-20T12:39:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"3f724ed1-53f5-421d-bfb6-0c0dba6a8f54","html_url":"https://github.com/aarkue/rustxes","commit_stats":null,"previous_names":["aarkue/rustxes"],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/aarkue/rustxes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aarkue%2Frustxes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aarkue%2Frustxes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aarkue%2Frustxes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aarkue%2Frustxes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aarkue","download_url":"https://codeload.github.com/aarkue/rustxes/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aarkue%2Frustxes/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259293404,"owners_count":22835605,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-science","process-mining","rust","xes"],"created_at":"2024-10-11T13:45:27.939Z","updated_at":"2025-06-11T16:07:59.235Z","avatar_url":"https://github.com/aarkue.png","language":"Rust","readme":"# rustxes\nA Python package to efficiently import XES or OCEL2 event logs using Rust.\n\nFor traditional event data, it supports parsing data both from `.xes` XML files and `.xes.gz` archives (and also from strings directly if needed). \n\nFor object-centric event data, it supports parsing OCEL2 XML or JSON files (`.xml` or `.json`).\n\n\n\n## Usage\n### XES Import\n\nThe `import_xes` returns a tuple of 1) the XES log polars dataframe and 2) JSON-encoding of global log attributes.\n\n```python\nimport rustxes\n\n[xes,log_attrs_json] = rustxes.import_xes(\"path/to/file.xes\")\nprint(xes.shape)\n```\n\n#### Options\nThe following parameters can be passed to the `import_xes_rs` or the python wrapper (`import_xes`):\n- `path` - The filepath of the .xes or .xes.gz file to import\n- `date_format` - Optional date format to use for parsing `\u003cdate\u003e` tags (See https://docs.rs/chrono/latest/chrono/format/strftime/index.html)\n- `print_debug` - Optional flag to enable debug print outputs\n\n\n### XES Export\n\nThe `export_xes` exports the passed polars DataFrame to the given path (either `.xes` or `.xes.gz`).\n\n```python\nimport rustxes\n\n[xes,log_attrs_json] = rustxes.import_xes(\"path/to/file.xes\")\nrustxes.export_xes(xes,\"path/to/export-file.xes\")\n```\n\n#### Options\nThe following parameters can be passed to the `export_xes_rs` or the python wrapper (`export_xes`):\n- `df` - The polars DataFrame representing the event log\n- `path` - The filepath the .xes or .xes.gz file should be written to\n\n\n\n### OCEL Import\nThe `import_ocel_xml` and `import_ocel_json` functions return a dict of polars DataFrames with the following keys: 'objects', 'events', 'o2o', 'object_changes', 'relations'.\n\n```python\nimport rustxes\n\nocel = rustxes.import_ocel_xml(\"path/to/ocel.xml\")\nprint(ocel['objects'].shape)\n```\nIf you want to use PM4Py's OCEL data structure, you can use the `import_ocel_xml_pm4py` or `import_ocel_json_pm4py` functions, which return a `pm4py.ocel.OCEL` objects.\nNote: PM4Py must be installed for this to work!\n\n\n## Development\nThis package was scaffolded using [maturin](https://www.maturin.rs/).\nThe most important commands are:\n- `maturin build --release` Builds the Rust code and python package (in release mode), producing the build artifacts (wheels)\n- `maturin develop --release` Builds the Rust code and python package (in release mode) and automatically installs/updates it in the corresponding (virtual) python env\n\n  Building this package requires [Rust](https://www.rust-lang.org/), which can be installed using Rustup (see [https://www.rust-lang.org/learn/get-started](https://www.rust-lang.org/learn/get-started)).\n  The Rust part on its own can be build using `cargo build --release`.\n\n\n## LICENSE\nThis package is licensed under either Apache License Version 2.0 or MIT License at your option. ","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faarkue%2Frustxes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faarkue%2Frustxes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faarkue%2Frustxes/lists"}