Organizations
Once you have a client you can start to work with the resources that are available on the server.
The client object has a number of methods that allow you to work with the resources that are available on the server, for example if you want to work with organizations then you can use:
List Organizations¶
One of the first things typically is to understand how to work with a organizations.
Let's start by listing the organizations making a specific query
from kodexa.platform import KodexaClient
client = KodexaClient()
client.organizations.list(query='Philip').to_df()
client | id | uuid | created_on | updated_on | name | slug | public_access | description | has_image | |
---|---|---|---|---|---|---|---|---|---|---|
0 | <kodexa.platform.client.KodexaClient object at... | f89d51f5-4905-4bd9-ab06-6ba61f3e7891 | 5630a279802b4fa69fc4f675a6ac37f6 | 2022-12-14 00:48:03.264000+00:00 | 2022-12-14 00:48:03.264000+00:00 | Philips World | philips-world | False | None | False |
Creating an Organization¶
Next up we can see how we can create a new organization
from kodexa.model.objects import Organization
new_organization_object = Organization(name='Demo', slug='demo')
new_organization_endpoint = client.organizations.create(new_organization_object)
Note It is important to note from above that when we want to create an object in the platform we create an instance of the object and then pass that. However, note that when we look at the result of the creation we will get an endpoint for that object. The object on it own is only the metadata of the object, however the endpoint version of the object also allows us to interact with the organization.
This pattern is repeated within the client SDK.
Deleting an Organization¶
If we have an instance of the Organiation endpoint object then we can also delete the organization.
new_organization_endpoint.delete()
Organization Components¶
Within an organization we have access to the components that make up that organization. They are available as a property with the name of the type of components (ie. stores, taxonomies etc).
kodexa_organization = client.organizations.find_by_slug('kodexa')
kodexa_organization.stores.list().to_df()
ref | template | schema_version | org_slug | slug | type | name | description | version | deployed | ... | searchable | store_purpose | view_options | view_presets | show_thumbnails | showSearch | allowDataEditing | client | IMPLEMENTATION_PREFIX | TRAINED_MODELS_PREFIX | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | kodexa/kodexa-table-model:1.0.0 | False | 1 | kodexa | kodexa-table-model | store | Text Pattern Table | Allows labeling of table markers to find colum... | 1.0.0 | 2022-12-01 12:19:27.586000+00:00 | ... | False | None | None | None | None | None | False | <kodexa.platform.client.KodexaClient object at... | model_implementation/ | trained_models/ |
1 | kodexa/azure-form-model:1.0.0 | False | 1 | kodexa | azure-form-model | store | Azure Form Recognizer | Applies advanced machine learning to accuratel... | 1.0.0 | 2022-12-01 12:20:14.102000+00:00 | ... | False | None | None | None | None | None | False | <kodexa.platform.client.KodexaClient object at... | model_implementation/ | trained_models/ |
2 | kodexa/azure-read-api:1.0.0 | False | 1 | kodexa | azure-read-api | store | Azure Read API | Provides the ability for optical character rec... | 1.0.0 | 2022-12-01 12:19:46.672000+00:00 | ... | False | None | None | None | None | None | False | <kodexa.platform.client.KodexaClient object at... | model_implementation/ | trained_models/ |
3 | kodexa/azure-invoice-model:1.0.0 | False | 1 | kodexa | azure-invoice-model | store | Azure Invoice Recognizer | Applies advanced machine learning to accuratel... | 1.0.0 | 2022-12-01 12:19:39.518000+00:00 | ... | False | None | None | None | None | None | False | <kodexa.platform.client.KodexaClient object at... | model_implementation/ | trained_models/ |
4 | kodexa/data-helpers:1.0.0 | False | 1 | kodexa | data-helpers | store | Data Helpers | A collection of models that help you work with... | 1.0.0 | 2022-12-01 12:20:23.720000+00:00 | ... | False | None | None | None | None | None | False | <kodexa.platform.client.KodexaClient object at... | model_implementation/ | trained_models/ |
5 | kodexa/azure-custom-form-model:1.0.0 | True | 1 | kodexa | azure-custom-form-model | store | Azure Custom Form Recognizer | Applies advanced machine learning to accuratel... | 1.0.0 | 2022-12-01 12:19:53.242000+00:00 | ... | False | None | None | None | None | None | False | <kodexa.platform.client.KodexaClient object at... | model_implementation/ | trained_models/ |
6 | kodexa/azure-receipt-model:1.0.0 | False | 1 | kodexa | azure-receipt-model | store | Azure Receipt Recognizer | Applies advanced machine learning to accuratel... | 1.0.0 | 2022-12-01 12:20:06.820000+00:00 | ... | False | None | None | None | None | None | False | <kodexa.platform.client.KodexaClient object at... | model_implementation/ | trained_models/ |
7 | kodexa/kodexa-form-model:1.0.0 | False | 1 | kodexa | kodexa-form-model | store | Text Pattern Form | Allows labeling of common text to identify whe... | 1.0.0 | 2022-12-01 12:19:31.778000+00:00 | ... | False | None | None | None | None | None | False | <kodexa.platform.client.KodexaClient object at... | model_implementation/ | trained_models/ |
8 | kodexa/spacy-text-classifier:1.0.0 | True | 1 | kodexa | spacy-text-classifier | store | Spacy Text Classifier | A simple text classifier using Spacy | 1.0.0 | 2022-12-01 12:19:11.830000+00:00 | ... | False | None | None | None | None | None | False | <kodexa.platform.client.KodexaClient object at... | model_implementation/ | trained_models/ |
9 | kodexa/metadata-to-label:1.0.0 | False | 1 | kodexa | metadata-to-label | store | Metadata to Label | A simple model that looks for metadata on the ... | 1.0.0 | 2022-12-01 12:18:48.139000+00:00 | ... | False | None | None | None | None | None | False | <kodexa.platform.client.KodexaClient object at... | model_implementation/ | trained_models/ |
10 rows × 31 columns
kodexa_organization.taxonomies.list().to_df()
ref | template | schema_version | org_slug | slug | type | name | description | version | deployed | ... | provider | provider_url | provider_image_url | extension_pack_ref | taxonomy_type | enabled | taxons | overlays | total_taxons | client | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | kodexa/taxonomy-template:6.0.0-3857543294 | True | 1 | kodexa | taxonomy-template | taxonomy | Data Structure | A data structure used for labeling and extract... | 6.0.0-3857543294 | 2023-01-06 18:54:16.567000+00:00 | ... | Kodexa AI | https://kodexa.ai | https://images.kodexa.com/kodexa_square_200.png | kodexa/core:6.0.0-3857543294 | CONTENT | True | [] | [] | 0 | <kodexa.platform.client.KodexaClient object at... |
1 rows × 25 columns
kodexa_organization.project_templates.list(query='azure').to_df()
ref | template | schema_version | org_slug | slug | type | name | description | version | deployed | ... | stores | assistants | taxonomies | dashboards | help_url | category | document_statuses | attribute_statuses | options | client | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | kodexa/azure-receipt-project-template:1.0.0 | True | 1 | kodexa | azure-receipt-project-template | projectTemplate | Receipt Processing with Azure | A project for extracting data from receipts | 1.0.0 | 2023-01-08 17:11:18.774000+00:00 | ... | [{'slug': '${project.id}-processing', 'name': ... | [{'name': 'Azure Pipeline', 'description': 'In... | [{'slug': '${project.id}-content', 'name': '${... | None | None | None | None | None | None | <kodexa.platform.client.KodexaClient object at... |
1 | kodexa/azure-custom-form:1.0.0 | True | 1 | kodexa | azure-custom-form | projectTemplate | Trainable Invoice/Form Recognizer | Applies advanced machine learning to accuratel... | 1.0.0 | 2023-01-08 17:11:21.133000+00:00 | ... | [{'slug': '${project.id}-processing', 'name': ... | [{'name': 'Processing Assistant', 'description... | [{'slug': '${project.id}-content', 'name': '${... | [{'slug': '${project.id}-label-statistics', 'n... | None | None | [{'id': None, 'uuid': None, 'created_on': None... | None | None | <kodexa.platform.client.KodexaClient object at... |
2 | kodexa/azure-invoice-project-template:1.0.0 | True | 1 | kodexa | azure-invoice-project-template | projectTemplate | Invoice Processing with Azure | A project for extracting data from invoices | 1.0.0 | 2023-01-08 17:11:19.376000+00:00 | ... | [{'slug': '${project.id}-processing', 'name': ... | [{'name': 'Azure Pipeline', 'description': 'In... | [{'slug': '${project.id}-content', 'name': '${... | None | None | None | None | None | None | <kodexa.platform.client.KodexaClient object at... |
3 | kodexa/azure-ocr-project-template:1.0.0 | True | 1 | kodexa | azure-ocr-project-template | projectTemplate | OCR with Azure | A project for extracting data from receipts | 1.0.0 | 2023-01-08 17:11:20.494000+00:00 | ... | [{'slug': '${project.id}-processing', 'name': ... | [{'name': 'OCR Pipeline', 'description': 'Inte... | [{'slug': '${project.id}-content', 'name': '${... | None | None | None | None | None | None | <kodexa.platform.client.KodexaClient object at... |
4 rows × 29 columns