Package: konfuzio-sdk
Konfuzio SDKThe Konfuzio Software Development Kit (Konfuzio SDK) provides aPython APIto interact with theKonfuzio Server.FeaturesThe SDK allows you to retrieve visual and text features to build your own document models. Konfuzio Server serves as an
UI to define the data structure, manage training/test data and to deploy your models as API.FunctionPublic Host Free*On-Site (Paid)OCR Text:heavy_check_mark::heavy_check_mark:OCR Handwriting:heavy_check_mark::heavy_check_mark:Text Annotation:heavy_check_mark::heavy_check_mark:PDF Annotation:heavy_check_mark::heavy_check_mark:Image Annotation:heavy_check_mark::heavy_check_mark:Table Annotation:heavy_check_mark::heavy_check_mark:Download Images:heavy_check_mark::heavy_check_mark:Download PDF with OCR:heavy_check_mark::heavy_check_mark:Deploy AI models:heavy_multiplication_x::heavy_check_mark:*Under fair use policy: We will impose 10 pages/hour throttling eventually.:ledger:DocsRead the docs:floppy_disk:InstallationHow to install the Konfuzio SDK:mortar_board:TutorialsSee what the Konfuzio SDK can do with our Notebooks & Scripts:bulb:ExplanationsHere are links to teaching material about the Konfuzio SDK.:gear:API ReferencePython classes, methods, and functions:heart:ContributingLearn how to contribute!:bug:Issue TrackerReport and monitor Konfuzio SDK issues:telescope:ChangelogReview the release notes:newspaper:MIT LicenseReview the licenseInstallationAs developer register on ourpublic HOST for free: https://app.konfuzio.comThen you can use pip to install Konfuzio SDK and run init:pip install konfuzio_sdk

konfuzio_sdk initThe init will create a Token to connect to the Konfuzio Server. This will create variablesKONFUZIO_USER,KONFUZIO_TOKENandKONFUZIO_HOSTin an.envfile in your working directory.By default, the SDK is installed without the AI-related dependencies liketorchortransformersand allows for using
only the Data-related SDK concepts but not the AI models. To install the SDK with the AI components,
run the following command:pip install konfuzio_sdk[ai]Find the full installation guidehereor setup PyCharm as describedhere.CLIWe provide the basic function to create a new Project via CLI:konfuzio_sdk create_project YOUR_PROJECT_NAMEYou will see "Project{YOUR_PROJECT_NAME}(ID{YOUR_PROJECT_ID}) was created successfully!" printed.And download any project via the id:konfuzio_sdk export_project YOUR_PROJECT_IDTutorialsYou can find detailed examples about how to set up and run document AI pipelines in ourTutorials, including:Split a file into separate DocumentsDocument CategorizationTrain a Konfuzio SDK Model to Extract Information From Payslip DocumentsBasicsHere we show how to use the Konfuzio SDK to retrieve data hosted on a Konfuzio Server instance.fromkonfuzio_sdk.dataimportProject,Document# Initialize the ProjectYOUR_PROJECT_ID:intmy_project=Project(id_=YOUR_PROJECT_ID)# Get any Document onlineDOCUMENT_ID_ONLINE:intdoc:Document=my_project.get_document_by_id(DOCUMENT_ID_ONLINE)# Get the Annotations in a Documentdoc.annotations()# Filter Annotations by LabelMY_OWN_LABEL_NAME:strlabel=my_project.get_label_by_name(MY_OWN_LABEL_NAME)doc.annotations(label=label)# Or get all Annotations that belong to one CategoryYOUR_CATEGORY_ID:intcategory=my_project.get_category_by_id(YOUR_CATEGORY_ID)label.annotations(categories=[category])# Force a Project update. To save time Documents will only be updated if they have changed.my_project.get(update=True)