Package: rossum
rossumThe elisctl package has been renamed to rossum.
You may want to uninstall elisctl before installing rossum.đź“ť Consider substituting rossum in your project with the more up-to-daterossum-sdklibrary.rossumis a set oftools for Rossum integratorsthat wrap
theRossum APIto provide an easy way to configure and customize a Rossum account programmatically. It is
the best buddy when it comes to making requests to Rossum API.InstallationSee therossum setup tutorialfor detailed instructions.WindowsDownload an installation file fromGitHub releases.
Install it. And run it either from start menu or from command prompt.UNIX based systemsInstall the package from PyPI:pipinstallrossumUsagePython API Client LibraryTherossumlibrary can be used to communicate with Rossum API,
instead of usingrequestslibrary directly. The advantages of usingrossum:it contains a function that merges the paginated results into one list so the user does not need
to get results page by page and take care of their merging,it takes care of login and logout for the user,it includes many methods for frequent actions that you don't need to write by yourself from scratch,it includes configurable retry logic,in case the API version changes, the change will be implemented to the
library by Rossum for all the users.To make any request to Rossum API, useRossumClient()class wrapper. You can use a Rossum
token to log in or use username and password. You need to either pass the credentials
including the URL directly to the client, or setROSSUM_URLenvvar and either a token
orROSSUM_USERNAMEandROSSUM_PASSWORDenvvars in your code. See the sample script
usingrossumwithin a code to export the documents:importdatetimefromrossum.lib.api_clientimportRossumClientqueue_id=123456username="your_username"password="your_password"endpoint="https://api.elis.rossum.ai/v1"defexport_documents():withRossumClient(context=None,user=username,password=password,url=endpoint)asclient:date_today=datetime.date.today()date_end=date_todaydate_start=date_today-datetime.timedelta(days=1)response=client.get(f"queues/{queue_id}/export?format=xml&"f"exported_at_after={date_start.isoformat()}&"f"exported_at_before={date_end.isoformat()}&"f"ordering=exported_at&"f"page_size=100&page=1")ifnotresponse.ok:raiseValueError(f"Failed to export:{response.status_code}")if__name__=="__main__":export_documents()API Client command line tool:warning: CLI functionality is not actively developed anymore.Therossumtool can be either used in acommand line interfacemode
by executing each command throughrossumindividually by passing it as an argument,
or in aninteractive shellmode of executingrossumwithout parameters
and then typing the commands into the shown prompt.Individual Rossum operations are triggered by passing specificcommandstorossum.
Commands are organized by object type in a tree-like structure and thus are composed
of multiple words (e.g.user createorschema transform).So either get the list of commands and execute them immediately such as:rossum--help
rossumconfigureor run the interactive shell by simply runningrossumSee the sample usingrossumcommand line tool to create the main objects within an organization andassign a user to a queue:$rossumconfigure
APIURL[https://api.elis.rossum.ai]:
Username:your_username@company.com
Password:
$rossumworkspacecreate"My New Workspace"12345$rossumqueuecreate"My New Queue Via rossum"-sschema.json-w12345--email-prefixmy-queue-email--bounce-emailbounced-docs-here@company.com50117,my-queue-email-ccddc6@elis.rossum.ai
$rossumusercreatejohn.doe@company.com-q50117-gannotator-pmy-secret-password-15456859119,my-secret-password-154568
$rossumuser_assignmentadd-u59119-q50117Configure profilesTo run commands described below under a chosen user, it is possible to use profiles defined by
configure function such asrossum--profileprofile_nameconfigureAfter defining necessary profiles and their credentials, the profile can be chosen the following wayrossum--profileprofile_namequeuelistEdit SchemaSome of the most common advanced operations are related to setting up
the sidebar-describing schema according to business requirements. Using rossum
you can edit schema easily as a JSON or XLSX file.List queues to obtain schema id:$rossumqueuelistidnameworkspaceinboxschemausers
----------------------------------------------------------------------------------------------------------------6MyQueue16myqueue-ab12ee@elis.rossum.ai727Download schema as a json:rossumschemaget7-Oschema.jsonOpen theschema.jsonfile in you favourite editor and upload modified version back to Rossum.rossumschemaupdate7--rewriteschema.jsonYou can also edit schema as an Excel (xlsx) file.rossumschemaget7--formatxlsx-Oschema.xlsx
rossumschemaupdate7--rewriteschema.xlsxFrom now on, documents will follow new schema. (Warning! If you don't use--rewriteoption,
the new schema will receive a new id - obtain it byqueue listagain.)Schema TransformationsIn addition, there is a scripting support for many common schema operations,
that may be easily used for schema management automation. Seerossum schema transformandrossum toolstools for further reference.Run something like:$rossumschematransformsubstitute-optionsdefault_schema.jsoncentre<(\rossumtoolsxls_to_csv~/Downloads/ERA_osnova_strediska.xlsx--header0--sheet1|rossumtoolscsv_to_options-)\|rossumschematransformsubstitute-options-gl_code<(\rossumtoolsxls_to_csv~/Downloads/ERA_osnova_strediska.xlsx--header0|rossumtoolscsv_to_options-)\|rossumschematransformremove-contract\>era_schema.jsonLicenseMITContributingUsepre-committo avoid linting issues.Submit a pull request from forked version of this repo.Select any of the maintainers as a reviewer.After an approved review, when releasing, aCollaboratorwithAdminrole shall do the following inmasterbranch:Update the Changelog in README, describing all the changes included in the newest releaserun:bump2versionminor
gitpush
gitpush--tagsIn the end, to build a Windows installer, run:pynsistinstaller.cfgGo toreleasesand upload the newest .exe file from the.buildfolder of yourrossumrepository to the newest releaseChangelog2024-01-25 v3.18.0Fix: Substitute obsolete click function2024-01-25 v3.17.1Fix: Pin openpyxl dependency to a specific version due tothis issue2024-01-25 v3.17.0Pin openpyxl dependency to allow using Rossum CLI2024-01-25 v3.16.0Allow using click>8.0.02022-08-04 v3.15.0feat(.gitignore): ignore vscodefeat(api_client): add email param for user creationfeat(tox) add py39 test envref(README) format file by linterbuild(pre-commit) update versions2022-02-18 v3.14.0Ensure compatibility with click<8.1.02021-11-1 v3.13.1 and v3.13.2Update setup of the release process for pypi2021-10-29 v3.13.0Add method for getting annotationsRefactor sideloading functionality to enable sideloading of new objectsAdd sideloading option for get_paginated() method2021-10-29 v3.12.1Propagate changelogs to the releases2021-10-24 v3.12.0Allow sending new attributes to API when creating hooksResponse is being propagated to the RossumExceptionAdded functions to iterate over hook payload easilyFix for library versioning due to incorrectly published tags2021-09-06 v3.10.0Allow creation of inbox without passing bounce emailAllow uploading documents by passing file as bytes to the API client2021-04-18 v3.9.1Include tenacity library in the Windows build2021-04-15 v3.9.0Allow filtering specific queue IDs when listing all user's queues2021-04-06 v3.8.0Allow passing token_owner, test and run_after attributes when creating and changing hook objects2021-04-01 v3.7.0Applied configurable retry mechanism to all requests done via rossum libraryEnable assigning annotator_limited role to user2021-03-04 v3.6.0Allow setting rir_params for queues2021-01-25 v3.5.0Allow setting custom timeout for APIClient requestsUse openpyxl engine for xlsx files readingApply minor code optimalization fixes2020-11-16 v3.4.0Create password command2020-11-11 v3.3.0Allow passing parameters when listing hooksFix passing metadata when creating a workspace2020-10-20 v3.2.1Remove Obsoletes-Dist2020-10-20 v3.2.0Enable creating serverless functionsAdd method for creating workspacesAllow setting up sideloading on hooksRefactor _request_url() to allow custom logging2020-09-29 v3.1.0Fix missing library in setup.pyRemove references to old package namesUpdatesetup.py2020-09-29 v3.0.0elisctl was renamed to rossum2020-07-27 v2.10.1Fix attribute name for setting max token lifetime2020-07-24 v2.10.0Addschema listcommandFixwebhook changecommand issueRemovecsv getcommandAdd example script for setting up a new organisationEnable assigning manager role to userEnable setting max token lifetimeCatch ValueError when parsing schema in XLSXFix Python3.8 support2020-02-18 v2.9.0allow editing inbox attributes separately on queue-related commandsadd support forcan_collapsein xlsx schemaadd sample usage of elisctl library in a Python codemake queue option required onuser create2019-10-31 v2.8.0Add webhook commandAllow creating and changing inbox properties onqueue changecommand2019-09-30 v2.7.1Improve documentation2019-08-13 v2.7.0Add commanduser_assignmentfor bulk assignment of users to queuesChange commandconnector create:queue_idparameter needs to be specified, if there is more than one queue in organizationSupport schema attributewidthin XLSX schema formatFixed: booleans, in XLSX schema format, can be specified as boolean typesInternal: filename can be specified inELISClient.upload_document2019-07-30 v2.6.0Enable passing custom filename with upload2019-07-12 v2.5.0Add support for schema specified in XLSX when creating queueRemove the necessity to specify schema file type when uploadingFix XML and CSV formats ofelisctl document extract2019-07-09 v2.4.0Add support for can_export in xlsx schema formatAdd document command2019-06-21 v2.3.1Fix: annotator cannot useelisctl connector listcommand2019-06-13 v2.3.0Add connector command2019-06-11 v2.2.1Update packages for windows build.2019-06-03 v2.2.0Added support for--profileoption to allelisctlcommandsFix: remove extra whitespace in xlsx schema export/import2019-04-02 v2.1.0Added support for--output-filetoelisctl toolsandelisctl schema transformFixSchema Transformationsdescription in README2019-03-14 v2.0.1Fixed MS Windows application entry point (running elisctl from the start menu)Fixed parsing of boolean values in xlsx schema export/import2019-03-14 v2.0.0Disable interpolation in config parsing, so that special characters are allowed in e.g. passwordExperimental support for schema modification using xlsx file formatAllow to show help in schema transform add (backward incompatible change)2019-03-08 v1.1.1Fixed bug with UnicodeDecodeError inelisctl schema get ID -O file.jsonon Windows2019-03-03 v1.1.0Added support for python 3.6AddedUser-Agentheader (elisctl/{version} ({platform})) for every request to ROSSUM APIImproved error when login fails with the provided credentials