apm4py is a Python API for Appian Process Mining (APM)
Project description
apm4py
apm4py is Python API for Appian Process Mining. It focuses on resource management, but provides methods that can be used to access the processed data as well.
This package is still in initial development state. Anything may change at any time. The public API should not be considered stable.
Installation
You can install apm4py directly from PyPi with e.g.
$ pip install apm4py
How to get started
To connect with an api at e.g. 'https://cloud-backend.lanalabs.com', first create an API with
from apm4py import create_api
api = create_api('https', 'cloud-backend.lanalabs.com', API_KEY)
Using the Command Line
Command line currently only supports uploading event logs. Four files for the event log have to be in one folder and follow the convention:
- event log CSV has "event" in the file name
- case attribute CSV has "case" in the file name
- event log semantics json have "event" in the file name
- case attribute log semantics json have "case" in the file name
See ./tests/data/incident_management as an example.
To install the CLI globally, use pipx:
pipx install apm4py
apm upload --name "Incident Management" tests/data/incident_management
apm list-logs
It will prompt you for host settings on the first run and also supports having multiple profiles with different hosts. Similar as the aws-cli. Profiles are saved in ~/.apm/
.
If you want to run the command line client from source, you have to prepend poetry run
before any apm
command. For example poetry run apm list-logs
.
Growing event logs
apm4py comes with a utility called log grower
that allows to grow existing event logs by copying there content as many times as wanted. While copying the events and cases it makes sure to alter the CaseIDs so that new cases are created. Thereby, the structure of the event log is preserved. That is, the number of activities and the number of variants stay the same.
It expects an existing event log with four files in one folder as described above. In order to generate a 10 times larger event log from the incident management data set provided in the test data of this repository, you can run
apm grow-log ./tests/data/incident_management \
--csv-separator ";" \
--output-csv \
--growth-factor 10
Building and installing from source
poetry install
poetry build
pip install /dist/apm4py-0.X.Y-py3-none-any.whl
How to contribute
See the details in CONTRIBUTING.md.
License
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
Built Distribution
File details
Details for the file apm4py-0.1.14.tar.gz
.
File metadata
- Download URL: apm4py-0.1.14.tar.gz
- Upload date:
- Size: 24.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.11.3 Darwin/22.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8306a7c81a5361f7b3c4a8f09217a8e207dba6c41681155f78312fe0bd571eec |
|
MD5 | 93179395305fd4fa3dfbefc6616dd292 |
|
BLAKE2b-256 | 2baf7b08cb9a6b82a2f7cd9ab26c94f6a74b96b63076a56efa113889a8fd21c5 |
File details
Details for the file apm4py-0.1.14-py3-none-any.whl
.
File metadata
- Download URL: apm4py-0.1.14-py3-none-any.whl
- Upload date:
- Size: 29.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.11.3 Darwin/22.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2f6ccab2e6441735858e6dc97d1adcdc119bd5ec83988c0ce52ab39e0e12aac |
|
MD5 | da1805fb663aec9f41802ad5275750fa |
|
BLAKE2b-256 | 27754d7e29aaee43eaddf269ebf92ca9e9e84d5a7bd55ecf32314c3b89179311 |