Another important concept to understand is the use of Assistants.
Assistants are based on an Assistant Definition, though you create an instance of the assistant on a specific project.
The assistant is responsible for handling events that occur within the scope of the project and its resources. It will then return pipelines that can be processed to effect change in the project.
In [1]:
from kodexa.platform import KodexaClient
client = KodexaClient()
client.organizations.list(query='Philip').to_df()
philips_organization = client.organizations.find_by_slug('philips-world')
philips_organization.projects.list().to_df()
Out[1]:
id | uuid | created_on | updated_on | organization | name | description | metadata | show_tasks | show_thumbnails | ... | show_search | show_tooltips_on_labeling | has_image | project_template_ref | memory | document_statuses | attribute_statuses | status | owner | client | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 6d33f7b9-f072-4593-988e-15865999e9b5 | 06fe6eb8a18b4ad4a9369896a0ee8f03 | 2022-12-20 17:27:16.462000+00:00 | 2022-12-20 17:27:16.462000+00:00 | {'id': 'f89d51f5-4905-4bd9-ab06-6ba61f3e7891',... | BARRO54812A | A project for extracting data from invoices | None | False | True | ... | False | False | False | kodexa/azure-invoice-project-template:1.0.0 | {'recent_filters': {}} | [] | [] | None | None | <kodexa.platform.client.KodexaClient object at... |
1 | 4dce973d-0420-413f-9027-1d83606d9085 | f1f240ac7fb74ce09a7094583cfd5dcf | 2022-12-14 00:48:28.868000+00:00 | 2022-12-14 00:48:28.868000+00:00 | {'id': 'f89d51f5-4905-4bd9-ab06-6ba61f3e7891',... | Dae Similar Formats | A basic project outline with process and train... | None | False | True | ... | False | False | False | kodexa/empty-project:6.0.0-3594945030 | {'recent_filters': {}} | [] | [] | None | None | <kodexa.platform.client.KodexaClient object at... |
2 rows × 22 columns
We can find a project by its name or ID, then we will be able to work with the project endpoint
In [2]:
my_project = philips_organization.projects.find_by_name('Dae Similar Formats')
my_project.assistants.list()[0].name
Out[2]:
'Pipeline Assistant'