kodexa.platform.client

Module Contents

Classes

OrganizationOwned

A base class for objects that are owned by an organization

ClientEndpoint

Represents a client endpoint

ProjectResourceEndpoint

Represents a project resource endpoint

ComponentEndpoint

Represents a component endpoint

EntityEndpoint

Represents an entity endpoint

EntitiesEndpoint

Represents an entities endpoint

OrganizationsEndpoint

Represents the organization endpoint

PageEndpoint

Represents a page endpoint

PageTaxonomyEndpoint

Represents a page endpoint

PageStoreEndpoint

Represents a page endpoint

PageModelRuntimeEndpoint

Represents a page endpoint

PageExtensionPackEndpoint

Represents a page endpoint

PageAssistantDefinitionEndpoint

Represents a page endpoint

PageCredentialEndpoint

Represents a page endpoint

PageUserEndpoint

Represents a page user endpoint

PageMembershipEndpoint

Represents a page membership endpoint

PageExecutionEndpoint

Represents a page membership endpoint

PageProjectEndpoint

Represents a page project endpoint

PageProjectTemplateEndpoint

Represents a page endpoint

PageOrganizationEndpoint

Represents a page organization endpoint

PageDocumentFamilyEndpoint

Represents a page document family endpoint

OrganizationEndpoint

Represents an organization endpoint

ComponentsEndpoint

Represents a components endpoint

ComponentInstanceEndpoint

Represents a component instance endpoint

AssistantEndpoint

Represents an assistant endpoint

ProjectAssistantsEndpoint

Represents a project assistants endpoint

ProjectDocumentStoresEndpoint

Represents a project document stores endpoint

ProjectTaxonomiesEndpoint

Represents a project taxonomies endpoint

ProjectStoresEndpoint

Represents a project stores endpoint

ProjectDataStoresEndpoint

Represents a project data stores endpoint

ProjectModelStoresEndpoint

Represents a project model stores endpoint

ProjectEndpoint

Represents a project endpoint

ProjectsEndpoint

Represents a projects endpoint

StoresEndpoint

Represents a stores endpoint

ExtensionPacksEndpoint

Represents an extension packs endpoint

ProjectTemplatesEndpoint

Represents a project templates endpoint

CredentialsEndpoint

Represents a credentials endpoint

DataFormsEndpoint

Represents a component endpoint

ModelRuntimesEndpoint

Represents a model runtimes endpoint

ProjectTemplateEndpoint

Represents a project template endpoint

PipelinesEndpoint

Represents a pipeline endpoint

AssistantDefinitionsEndpoint

Represents a assistant definition endpoint

ActionsEndpoint

Represents a pipeline endpoint

CredentialEndpoint

Represents a credential endpoint

DataFormEndpoint

Represents a component instance endpoint

AssistantDefinitionEndpoint

Represents an assistant definition endpoint

PipelineEndpoint

Represents a pipeline endpoint

ModelRuntimeEndpoint

Represents a model runtime endpoint

ExtensionPackEndpoint

Represents an extension pack endpoint

ActionEndpoint

Represents an action endpoint

TaxonomyEndpoint

Represents a taxonomy endpoint

MembershipEndpoint

Represents a membership endpoint

ExecutionEndpoint

Represents a execution endpoint

UserEndpoint

Represents a user endpoint

ExecutionsEndpoint

Represents a executions endpoint

MembershipsEndpoint

Represents a memberships endpoint

UsersEndpoint

Represents a users endpoint

DataAttributeEndpoint

Represents a data attribute endpoint

DataObjectEndpoint

Represents a data object endpoint

DocumentFamilyEndpoint

Represents a document family endpoint

StoreEndpoint

Represents a store endpoint

DataStoreEndpoint

Represents a data store endpoint

DocumentStoreEndpoint

Represents a document store that can be used to store files and then their related document representations

ModelStoreEndpoint

Represents a model store

TaxonomiesEndpoint

Represents a taxonomies endpoint

KodexaClient

Functions

process_response(→ requests.Response)

Process the response from the server

resolve_object_type(obj_type)

Takes part of an object type (ie. pipeline) and then resolves the object type (pipelines)

Attributes

logger

DEFAULT_COLUMNS

OBJECT_TYPES

kodexa.platform.client.logger
kodexa.platform.client.DEFAULT_COLUMNS
class kodexa.platform.client.OrganizationOwned

Bases: pydantic.BaseModel

A base class for objects that are owned by an organization

organization :Optional[OrganizationEndpoint]
set_organization(organization)

Set the organization that this object belongs to :param organization: :return:

class kodexa.platform.client.ClientEndpoint

Bases: pydantic_yaml.YamlModel

Represents a client endpoint

client :Optional[KodexaClient]
set_client(client)

Set the client that this endpoint is associated with :param client: The client to set :return: The endpoint

to_dict()

Convert the client endpoint to a dictionary :return: A dictionary representation of the endpoint

yaml(**kwargs)

Convert the client endpoint to a yaml string :return: A yaml string representation of the endpoint

detach()

Detach the client from the endpoint

class kodexa.platform.client.ProjectResourceEndpoint

Bases: ClientEndpoint

Represents a project resource endpoint

project :Optional[ProjectEndpoint]
set_project(project: ProjectEndpoint)

Set the project that this endpoint is associated with

get_type() str
get_instance_class(object_dict=None) Type[ClientEndpoint]
print_table(query='*', page=1, pagesize=10, sort=None, filters: List[str] = None, title: str = None)
list(query='*', page=1, pagesize=10, sort=None, filters: List[str] = None)
create(component)
get(component_id)
class kodexa.platform.client.ComponentEndpoint

Bases: ClientEndpoint, OrganizationOwned

Represents a component endpoint

get_type() str
get_instance_class(obj_dict=None) Type[pydantic.BaseModel]
get_page_class(obj_dict=None) Type[pydantic.BaseModel]
reindex()

Reindex the component :return:

find_by_slug(slug, version=None) Optional[Type[pydantic.BaseModel]]

Find a component by slug :param slug: :param version: :return:

list(query='*', page=1, pagesize=10, sort=None, filters: List[str] = None)
print_table(query='*', page=1, pagesize=10, sort=None, filters: List[str] = None, title: str = None)
create(component)
get_by_slug(slug, version=None)
class kodexa.platform.client.EntityEndpoint

Bases: kodexa.model.base.BaseEntity, ClientEndpoint

Represents an entity endpoint

reload()

Reload the entity :return:

abstract get_type() str
create()

Create the entity :return:

update()

Update the entity :return:

delete()

Delete the entity :return:

class kodexa.platform.client.EntitiesEndpoint(client: KodexaClient, organization: OrganizationEndpoint = None)

Represents an entities endpoint

abstract get_type() str
abstract get_instance_class(object_dict=None) Type[pydantic.BaseModel]
abstract get_page_class(object_dict=None) Type[pydantic.BaseModel]
list(query='*', page=1, pagesize=10, sort=None, filters: List[str] = None)
print_table(query='*', page=1, pagesize=10, sort=None, filters: List[str] = None, title: str = None)
find_by_organization(organization: kodexa.model.objects.Organization) kodexa.model.objects.PageProject

Find projects by organization

get(entity_id: str) EntityEndpoint

Get an entity by id

create(new_entity: EntityEndpoint) EntityEndpoint

Create an entity

delete(self_id: str) None

Delete an entity by id

class kodexa.platform.client.OrganizationsEndpoint(client: KodexaClient, organization: OrganizationEndpoint = None)

Bases: EntitiesEndpoint

Represents the organization endpoint

get_page_class(object_dict=None) Type[pydantic.BaseModel]
get_instance_class(object_dict=None) Type[pydantic.BaseModel]
get_type() str
find_by_slug(slug) Optional[OrganizationEndpoint]

Find an organization by slug :param slug: :return:

class kodexa.platform.client.PageEndpoint

Bases: ClientEndpoint

Represents a page endpoint

get_type() Optional[str]
to_df()

Convert the page to a dataframe :return:

get(index: int) ComponentInstanceEndpoint

Get a component by index :param index: :return:

set_client(client)

Set the client for the page :param client: :return:

to_endpoints()

Convert the page to endpoints :return:

class kodexa.platform.client.PageTaxonomyEndpoint

Bases: kodexa.model.objects.PageTaxonomy, PageEndpoint

Represents a page endpoint

class kodexa.platform.client.PageStoreEndpoint

Bases: kodexa.model.objects.PageStore, PageEndpoint

Represents a page endpoint

class kodexa.platform.client.PageModelRuntimeEndpoint

Bases: kodexa.model.objects.PageStore, PageEndpoint

Represents a page endpoint

class kodexa.platform.client.PageExtensionPackEndpoint

Bases: kodexa.model.objects.PageExtensionPack, PageEndpoint

Represents a page endpoint

class kodexa.platform.client.PageAssistantDefinitionEndpoint

Bases: kodexa.model.objects.PageAssistantDefinition, PageEndpoint

Represents a page endpoint

class kodexa.platform.client.PageCredentialEndpoint

Bases: kodexa.model.objects.PageCredential, PageEndpoint

Represents a page endpoint

class kodexa.platform.client.PageUserEndpoint

Bases: kodexa.model.objects.PageUser, PageEndpoint

Represents a page user endpoint

get_type() Optional[str]

Get the type of the page user

class kodexa.platform.client.PageMembershipEndpoint

Bases: kodexa.model.objects.PageMembership, PageEndpoint

Represents a page membership endpoint

get_type() Optional[str]

Get the type of the endpoint

class kodexa.platform.client.PageExecutionEndpoint

Bases: kodexa.model.objects.PageExecution, PageEndpoint

Represents a page membership endpoint

get_type() Optional[str]

Get the type of the endpoint

class kodexa.platform.client.PageProjectEndpoint

Bases: kodexa.model.objects.PageProject, PageEndpoint

Represents a page project endpoint

get_type() Optional[str]

Get the type of the endpoint

class kodexa.platform.client.PageProjectTemplateEndpoint

Bases: kodexa.model.objects.PageProjectTemplate, PageEndpoint

Represents a page endpoint

class kodexa.platform.client.PageOrganizationEndpoint

Bases: kodexa.model.objects.PageOrganization, PageEndpoint

Represents a page organization endpoint

get_type() Optional[str]

Get the type of the endpoint

class kodexa.platform.client.PageDocumentFamilyEndpoint

Bases: kodexa.model.objects.PageDocumentFamily, PageEndpoint

Represents a page document family endpoint

get_type() Optional[str]

Get the type of the endpoint

class kodexa.platform.client.OrganizationEndpoint

Bases: kodexa.model.objects.Organization, EntityEndpoint

Represents an organization endpoint

get_type() str

Get the type of the endpoint

property projects ProjectsEndpoint

Get the projects endpoint of the organization

suspend()
deploy(component: ComponentEndpoint) ComponentInstanceEndpoint

Deploy a component to the organization

property model_runtimes ModelRuntimesEndpoint

Get the model runtimes endpoint of the organization

property extension_packs ExtensionPacksEndpoint

Get the extension packs endpoint of the organization

property project_templates ProjectTemplatesEndpoint

Get the project templates endpoint of the organization

property credentials

Get the credentials endpoint of the organization

property dataForms
property stores

Get the stores endpoint of the organization

property taxonomies

Get the taxonomies endpoint of the organization

class kodexa.platform.client.ComponentsEndpoint(organization: OrganizationEndpoint)

Bases: ClientEndpoint

Represents a components endpoint

class kodexa.platform.client.ComponentInstanceEndpoint

Bases: ClientEndpoint, kodexa.model.objects.SlugBasedMetadata

Represents a component instance endpoint

abstract get_type() str
post_deploy() List[str]
create()

Create the component instance

update()

Update the component instance

delete()

Delete the component instance

deploy(update=False)

Deploy the component instance

class kodexa.platform.client.AssistantEndpoint

Bases: kodexa.model.objects.Assistant, ClientEndpoint

Represents an assistant endpoint

update() AssistantEndpoint

Update the assistant

delete()

Delete the assistant

activate()

Activate the assistant

deactivate()

Deactivate the assistant

schedule()

Schedule the assistant

set_stores(stores: List[DocumentStoreEndpoint])

Set the stores of the assistant

get_stores() List[DocumentStoreEndpoint]

Get the stores of the assistant

executions() List[kodexa.model.objects.Execution]

Get the executions of the assistant

send_event(event_object: dict)
class kodexa.platform.client.ProjectAssistantsEndpoint

Bases: ProjectResourceEndpoint

Represents a project assistants endpoint

get_type() str

Get the type of the endpoint

get_instance_class(object_dict=None) Type[pydantic.BaseModel]

Get the instance class of the project assistants endpoint

class kodexa.platform.client.ProjectDocumentStoresEndpoint

Bases: ProjectResourceEndpoint

Represents a project document stores endpoint

get_type() str

Get the type of the endpoint

get_instance_class(object_dict=None) Type[pydantic.BaseModel]

Get the instance class of the project document stores endpoint

class kodexa.platform.client.ProjectTaxonomiesEndpoint

Bases: ProjectResourceEndpoint

Represents a project taxonomies endpoint

get_type() str

Get the type of the endpoint

get_instance_class(object_dict=None) Type[pydantic.BaseModel]

Get the instance class of the project taxonomies endpoint

class kodexa.platform.client.ProjectStoresEndpoint

Bases: ProjectResourceEndpoint

Represents a project stores endpoint

get_type() str

Get the type of the endpoint

get_instance_class(object_dict=None) Type[pydantic.BaseModel]

Get the instance class of the project stores endpoint

class kodexa.platform.client.ProjectDataStoresEndpoint

Bases: ProjectResourceEndpoint

Represents a project data stores endpoint

get_type() str

Get the type of the endpoint

get_instance_class(object_dict=None) Type[pydantic.BaseModel]

Get the instance class of the project data stores endpoint

class kodexa.platform.client.ProjectModelStoresEndpoint

Bases: ProjectResourceEndpoint

Represents a project model stores endpoint

get_type() str

Get the type of the endpoint

get_instance_class(object_dict=None) Type[pydantic.BaseModel]

Get the instance class of the project model stores endpoint

class kodexa.platform.client.ProjectEndpoint

Bases: EntityEndpoint, kodexa.model.objects.Project

Represents a project endpoint

get_type() str

Get the type of the endpoint

update_resources(stores: List[StoreEndpoint] = None, taxonomies: List[TaxonomyEndpoint] = None) ProjectEndpoint

Update the resources of the project

property document_stores ProjectDocumentStoresEndpoint

Get the document stores endpoint of the project

property data_stores ProjectDataStoresEndpoint

Get the data stores endpoint of the project

property model_stores ProjectModelStoresEndpoint

Get the model stores endpoint of the project

property taxonomies ProjectTaxonomiesEndpoint

Get the taxonomies endpoint of the project

property assistants ProjectAssistantsEndpoint

Get the assistants endpoint of the project

class kodexa.platform.client.ProjectsEndpoint(client: KodexaClient, organization: OrganizationEndpoint = None)

Bases: EntitiesEndpoint

Represents a projects endpoint

get_type() str

Get the type of the endpoint

get_instance_class(object_dict=None) Type[pydantic.BaseModel]

Get the instance class of the endpoint

get_page_class(object_dict=None) Type[pydantic.BaseModel]

Get the page class of the endpoint

find_by_name(project_name: str) ProjectEndpoint

Find a project by name

create(project: kodexa.model.objects.Project, template_ref: str = None) kodexa.model.objects.Project

Create a project

class kodexa.platform.client.StoresEndpoint

Bases: ComponentEndpoint, ClientEndpoint, OrganizationOwned

Represents a stores endpoint

get_type() str

Get the type of the endpoint

get_page_class(object_dict=None) Type[pydantic.BaseModel]

Get the page class of the endpoint

get_instance_class(object_dict=None) Type[pydantic.BaseModel]

Get the instance class of the endpoint

class kodexa.platform.client.ExtensionPacksEndpoint

Bases: ComponentEndpoint, ClientEndpoint, OrganizationOwned

Represents an extension packs endpoint

get_type() str

Get the type of the endpoint

get_page_class(object_dict=None) Type[pydantic.BaseModel]

Get the page class of the endpoint

get_instance_class(object_dict=None) Type[pydantic.BaseModel]

Get the instance class of the endpoint

deploy_from_url(extension_pack_url: str, deployment_options: kodexa.model.objects.DeploymentOptions) ExtensionPackEndpoint

Deploy an extension pack from a url

class kodexa.platform.client.ProjectTemplatesEndpoint

Bases: ComponentEndpoint, ClientEndpoint, OrganizationOwned

Represents a project templates endpoint

get_type() str

Get the type of the endpoint

get_page_class(object_dict=None) Type[pydantic.BaseModel]

Get the page class of the endpoint

get_instance_class(object_dict=None) Type[pydantic.BaseModel]

Get the instance class of the endpoint

class kodexa.platform.client.CredentialsEndpoint

Bases: ComponentEndpoint, ClientEndpoint, OrganizationOwned

Represents a credentials endpoint

get_type() str

Get the type of the endpoint

get_page_class(object_dict=None) Type[pydantic.BaseModel]

Get the page class of the endpoint

get_instance_class(object_dict=None) Type[pydantic.BaseModel]

Get the instance class of the endpoint

class kodexa.platform.client.DataFormsEndpoint

Bases: ComponentEndpoint, ClientEndpoint, OrganizationOwned

Represents a component endpoint

get_type() str
get_page_class(object_dict=None) Type[pydantic.BaseModel]
get_instance_class(object_dict=None) Type[pydantic.BaseModel]
class kodexa.platform.client.ModelRuntimesEndpoint

Bases: ComponentEndpoint, ClientEndpoint, OrganizationOwned

Represents a model runtimes endpoint

get_type() str

Get the type of the endpoint

get_page_class(object_dict=None) Type[pydantic.BaseModel]

Get the page class of the endpoint

get_instance_class(object_dict=None) Type[pydantic.BaseModel]

Get the instance class of the endpoint

class kodexa.platform.client.ProjectTemplateEndpoint

Bases: ComponentInstanceEndpoint, kodexa.model.objects.ProjectTemplate

Represents a project template endpoint

get_type() str

Get the type of the endpoint

class kodexa.platform.client.PipelinesEndpoint

Bases: ComponentInstanceEndpoint, kodexa.model.objects.Credential

Represents a pipeline endpoint

get_type() str

Get the type of the endpoint

class kodexa.platform.client.AssistantDefinitionsEndpoint

Bases: ComponentInstanceEndpoint, kodexa.model.objects.Credential

Represents a assistant definition endpoint

get_type() str

Get the type of the endpoint

class kodexa.platform.client.ActionsEndpoint

Bases: ComponentInstanceEndpoint, kodexa.model.objects.Credential

Represents a pipeline endpoint

get_type() str

Get the type of the endpoint

class kodexa.platform.client.CredentialEndpoint

Bases: ComponentInstanceEndpoint, kodexa.model.objects.Credential

Represents a credential endpoint

get_type() str

Get the type of the endpoint

class kodexa.platform.client.DataFormEndpoint

Bases: ComponentInstanceEndpoint, kodexa.model.objects.DataForm

Represents a component instance endpoint

get_type() str
class kodexa.platform.client.AssistantDefinitionEndpoint

Bases: ComponentInstanceEndpoint, kodexa.model.objects.AssistantDefinition

Represents an assistant definition endpoint

get_type() str

Get the type of the endpoint

class kodexa.platform.client.PipelineEndpoint

Bases: ComponentInstanceEndpoint, kodexa.model.objects.Pipeline

Represents a pipeline endpoint

get_type() str

Get the type of the endpoint

class kodexa.platform.client.ModelRuntimeEndpoint

Bases: ComponentInstanceEndpoint, kodexa.model.objects.ModelRuntime

Represents a model runtime endpoint

get_type() str

Get the type of the endpoint

class kodexa.platform.client.ExtensionPackEndpoint

Bases: ComponentInstanceEndpoint, kodexa.model.objects.ExtensionPack

Represents an extension pack endpoint

get_type() str

Get the type of the endpoint

class kodexa.platform.client.ActionEndpoint

Bases: ComponentInstanceEndpoint, kodexa.model.objects.Action

Represents an action endpoint

get_type() str

Get the type of the endpoint

class kodexa.platform.client.TaxonomyEndpoint

Bases: ComponentInstanceEndpoint, kodexa.model.Taxonomy

Represents a taxonomy endpoint

get_type() str

Get the type of the endpoint

get_group_taxons() List[kodexa.model.objects.Taxon]

Get the group taxons of the taxonomy

find_taxon(taxons, parts, use_label=False)

Find a taxon in the taxonomy by its parts

find_taxon_by_label_path(label_path: str) kodexa.model.objects.Taxon

Find a taxon in the taxonomy by its label path

find_taxon_by_path(path: str) kodexa.model.objects.Taxon

Find a taxon in the taxonomy by its path

class kodexa.platform.client.MembershipEndpoint

Bases: kodexa.model.objects.Membership, EntityEndpoint

Represents a membership endpoint

get_type() str

Get the type of the endpoint

class kodexa.platform.client.ExecutionEndpoint

Bases: kodexa.model.objects.Execution, EntityEndpoint

Represents a execution endpoint

get_type() str

Get the type of the endpoint

class kodexa.platform.client.UserEndpoint

Bases: kodexa.model.objects.User, EntityEndpoint

Represents a user endpoint

get_type() str

Get the type of the endpoint

activate() UserEndpoint

Activate the user

deactivate() UserEndpoint

Deactivate the user

set_password(password: str, reset_token) UserEndpoint

Set the password of the user

get_memberships() List[MembershipEndpoint]

Get the memberships of the user

class kodexa.platform.client.ExecutionsEndpoint(client: KodexaClient, organization: OrganizationEndpoint = None)

Bases: EntitiesEndpoint

Represents a executions endpoint

get_type() str

Get the type of the endpoint

get_instance_class(object_dict=None) Type[pydantic.BaseModel]

Get the instance class of the endpoint

get_page_class(object_dict=None) Type[pydantic.BaseModel]

Get the page class of the endpoint

class kodexa.platform.client.MembershipsEndpoint(client: KodexaClient, organization: OrganizationEndpoint = None)

Bases: EntitiesEndpoint

Represents a memberships endpoint

get_type() str

Get the type of the endpoint

get_instance_class(object_dict=None) Type[pydantic.BaseModel]

Get the instance class of the endpoint

get_page_class(object_dict=None) Type[pydantic.BaseModel]

Get the page class of the endpoint

class kodexa.platform.client.UsersEndpoint(client: KodexaClient, organization: OrganizationEndpoint = None)

Bases: EntitiesEndpoint

Represents a users endpoint

get_type() str

Get the type of the endpoint

get_instance_class(object_dict=None) Type[pydantic.BaseModel]

Get the instance class of the endpoint

get_page_class(object_dict=None) Type[pydantic.BaseModel]

Get the page class of the endpoint

class kodexa.platform.client.DataAttributeEndpoint

Bases: kodexa.model.objects.DataAttribute, ClientEndpoint

Represents a data attribute endpoint

data_object :kodexa.model.objects.DataObject
set_data_object(data_object: kodexa.model.objects.DataObject)

Set the data object of the data attribute

property notes kodexa.model.objects.PageNote

Get the notes of the data attribute

class kodexa.platform.client.DataObjectEndpoint

Bases: kodexa.model.objects.DataObject, ClientEndpoint

Represents a data object endpoint

update()

Update the data object

delete()

Delete the data object

property attributes List[DataAttributeEndpoint]

Get the attributes of the data object

class kodexa.platform.client.DocumentFamilyEndpoint

Bases: kodexa.model.objects.DocumentFamily, ClientEndpoint

Represents a document family endpoint

update()

Update the document family

export() bytes

Export the document family as bytes

update_document(document: kodexa.model.Document, content_object: Optional[kodexa.model.objects.ContentObject] = None)

Update a document in the document family

wait_for(mixin: Optional[str] = None, label: Optional[str] = None, timeout: int = 60) DocumentFamilyEndpoint

Wait for the document family to be ready

delete()

Delete the document family

get_native() bytes

Get the native content object of the document family

add_label(label: str)

Add a label to the document family

remove_label(label: str)

Remove a label from the document family

get_document(content_object: Optional[kodexa.model.objects.ContentObject] = None) kodexa.model.Document

Get the document of the document family

reprocess(assistant: kodexa.model.objects.Assistant)

Reprocess the document family

add_document(document: kodexa.model.Document, content_object: Optional[kodexa.model.objects.ContentObject] = None)

Add a document to the document family

replace_tags(document: kodexa.model.Document, content_object: Optional[kodexa.model.objects.ContentObject] = None)

Replace the tags of the document family

class kodexa.platform.client.StoreEndpoint

Bases: ComponentInstanceEndpoint, kodexa.model.objects.Store

Represents a store endpoint

get_type() str

Get the type of the endpoint

get_metadata_class() Optional[Type[pydantic.BaseModel]]
set_metadata(metadata)
upload_contents(metadata) List[str]
reindex()

Reindex the store

update_metadata()

Update the metadata of the store

get_metadata()

Get the metadata of the store

post_deploy() List[str]

Post deploy the store

class kodexa.platform.client.DataStoreEndpoint

Bases: StoreEndpoint

Represents a data store endpoint

get_data_objects_export(document_family: Optional[kodexa.model.objects.DocumentFamily] = None, output_format: str = 'json', path: Optional[str] = None, root_name: str = '', friendly_names=True) str

Get the data objects export of the store

get_taxonomies() List[kodexa.model.Taxonomy]

Get the taxonomies of the store

get_data_objects_df(path: str, query: str = '*', document_family: Optional[kodexa.model.objects.DocumentFamily] = None, include_id: bool = False)

Get the data objects as a pandas dataframe

Parameters
  • path (str) – The path to the data object

  • query (str) – A query to limit the results (Defaults to *)

  • document_family (Optional[DocumentFamily) – Optionally the document family to limit results to

  • include_id (Optional[bool]) – Include the data object ID as a column (defaults to False)

Returns:

get_data_objects(path: str, query: str = '*', document_family: Optional[kodexa.model.objects.DocumentFamily] = None) List[DataObjectEndpoint]

Get the data objects of the store :param path: The path to the data object :type path: str :param query: A query to limit the results (Default *) :type query: str :param document_family: Optionally the document family to limit results to :type document_family: Optional[DocumentFamily

Returns:

get_data_object(data_object_id: str)

Get a data object by id

get_data_objects_page_request(path: str, page_number: int = 1, page_size=5000, query='*', document_family: Optional[kodexa.model.objects.DocumentFamily] = None) kodexa.model.objects.PageDataObject

Get a page of data objects

Parameters
  • path (str) – The parent taxon (/ is root)

  • page_number (int) – (Default value = 1)

  • page_size (int) – (Default value = 5000)

  • query (str) – The query to limit results (Default *)

  • document_family (Optional[DocumentFamily) – Optionally the document family to limit results to

Returns:

create_data_objects(data_objects: List[kodexa.model.objects.DataObject]) List[DataObjectEndpoint]

Create data objects in the store

Parameters

data_objects – A list of data objects that you want to create

Returns:

class kodexa.platform.client.DocumentStoreEndpoint

Bases: StoreEndpoint

Represents a document store that can be used to store files and then their related document representations

delete_by_path(object_path: str)

Delete the content stored in the store at the given path

Parameters

object_path – str the path to the document family (ie. Invoice.pdf)

import_family(file_path: str)

Import a document family from a file

Parameters

file_path (str) – The path to the file

upload_file(file_path: str, object_path: Optional[str] = None, replace=False, additional_metadata: Optional[dict] = None)

Upload a file to the store :param file_path: The path to the file :type file_path: str :param object_path: The path to the object (Default is the same the file path) :type object_path: Optional[str] :param replace: Replace the file if it already exists (Default False) :type replace: bool :param additional_metadata: Additional metadata to add to the file (Default None) :type additional_metadata: Optional[dict]

upload_bytes(path: str, content, replace=False, additional_metadata: Optional[dict] = None) DocumentFamilyEndpoint

Put the content into the store at the given path

Parameters
  • path – The path you wish to put the content at

  • content – The content for that object

  • replace – Replace the content if it exists

  • additional_metadata – Additional metadata to store with the document (not it can’t include ‘path’)

Returns

the document family that was created

get_bytes(object_path: str)

Get the bytes for the object at the given path, will return None if there is no object there

Parameters
  • object_path – the object path

  • object_path – str:

Returns

the bytes or None is nothing is at the path

list_contents() List[str]

List the contents of the store

Returns

A list of the contents of the store

download_document_families(output_dir: str)

Download all the document families in the store to the given directory

get_metadata_class() Type[pydantic.BaseModel]

Get the metadata class for the store

get_family(document_family_id: str) DocumentFamilyEndpoint

Get the document family with the given id

query(query: str = '*', page: int = 1, page_size: int = 100, sort=None) PageDocumentFamilyEndpoint
upload_document(path: str, document: kodexa.model.Document) DocumentFamilyEndpoint

Upload a document to the store at the given path

exists_by_path(path: str) bool

Check if the store has a document family at the given path

get_by_path(path: str) DocumentFamilyEndpoint

Get the document family at the given path

class kodexa.platform.client.ModelStoreEndpoint

Bases: DocumentStoreEndpoint

Represents a model store

IMPLEMENTATION_PREFIX = model_implementation/
TRAINED_MODELS_PREFIX = trained_models/
get_metadata_class() Type[pydantic.BaseModel]

Get the metadata class for the store

upload_trained_model(training_run_id: str, base_path: Optional[str] = None)

Upload a trained model to the store

download_trained_model(training_run_id: str, download_path: Optional[str] = '')

Download a trained model from the store

download_implementation(download_path: Optional[str] = '')

Download the implementation from the store

upload_implementation(metadata)

Upload the implementation to the store

upload_contents(metadata)

Upload the contents of the metadata to the store

list_contents() List[str]

List the contents of the store

class kodexa.platform.client.TaxonomiesEndpoint

Bases: ComponentEndpoint, ClientEndpoint, OrganizationOwned

Represents a taxonomies endpoint

get_type() str

Get the type of the endpoint

get_page_class(object_dict=None) Type[pydantic.BaseModel]

Get the page class for the endpoint

get_instance_class(object_dict=None) Type[pydantic.BaseModel]

Get the instance class for the endpoint

kodexa.platform.client.process_response(response) requests.Response

Process the response from the server

kodexa.platform.client.OBJECT_TYPES
kodexa.platform.client.resolve_object_type(obj_type)

Takes part of an object type (ie. pipeline) and then resolves the object type (pipelines)

Parameters

obj_type – part of the object type

Returns

The object type dict (if found)

class kodexa.platform.client.KodexaClient(url=None, access_token=None)
static login(url, email, password)
property me
property platform kodexa.model.objects.PlatformOverview
change_password(old_password: str, new_password: str)
reindex()
__build_object(ref, object_type_metadata)
get_object_by_ref(object_type: str, ref: str) pydantic.BaseModel
get_object_endpoint(object_type: str) pydantic.BaseModel
get_platform()
exists(url, params=None) bool
get(url, params=None) requests.Response
post(url, body=None, data=None, files=None, params=None) requests.Response
put(url, body=None, data=None, files=None, params=None) requests.Response
delete(url, params=None) requests.Response
get_url(url)
export_project(project: ProjectEndpoint, export_path: str)
import_project(organization: OrganizationEndpoint, import_path: str)
deserialize(component_dict: dict, component_type: Optional[str] = None) ComponentInstanceEndpoint
get_project(project_id) ProjectEndpoint
get_object_type(object_type, organization: Optional[OrganizationEndpoint] = None) ClientEndpoint