Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
The 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-date rossum-sdk library.
rossum is a set of tools for Rossum integrators that wrap the Rossum API to 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.
See the rossum setup tutorial for detailed instructions.
Download an installation file from GitHub releases. Install it. And run it either from start menu or from command prompt.
Install the package from PyPI:
pip install rossum
The rossum library can be used to communicate with Rossum API,
instead of using requests
library directly. The advantages of using rossum:
To make any request to Rossum API, use RossumClient()
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 set ROSSUM_URL
envvar and either a token
or ROSSUM_USERNAME
and ROSSUM_PASSWORD
envvars in your code. See the sample script
using rossum within a code to export the documents:
import datetime
from rossum.lib.api_client import RossumClient
queue_id = 123456
username = "your_username"
password = "your_password"
endpoint = "https://api.elis.rossum.ai/v1"
def export_documents():
with RossumClient(context=None, user=username, password=password, url=endpoint) as client:
date_today = datetime.date.today()
date_end = date_today
date_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"
)
if not response.ok:
raise ValueError(f"Failed to export: {response.status_code}")
if __name__ == "__main__":
export_documents()
:warning: CLI functionality is not actively developed anymore.
The rossum tool can be either used in a command line interface mode
by executing each command through rossum
individually by passing it as an argument,
or in an interactive shell mode of executing rossum
without parameters
and then typing the commands into the shown prompt.
Individual Rossum operations are triggered by passing specific commands to rossum
.
Commands are organized by object type in a tree-like structure and thus are composed
of multiple words (e.g. user create
or schema transform
).
So either get the list of commands and execute them immediately such as:
rossum --help
rossum configure
or run the interactive shell by simply running
rossum
See the sample using rossum command line tool to create the main objects within an organization and
assign a user to a queue:
$ rossum configure
API URL [https://api.elis.rossum.ai]:
Username: your_username@company.com
Password:
$ rossum workspace create "My New Workspace"
12345
$ rossum queue create "My New Queue Via rossum" -s schema.json -w 12345 --email-prefix my-queue-email --bounce-email bounced-docs-here@company.com
50117, my-queue-email-ccddc6@elis.rossum.ai
$ rossum user create john.doe@company.com -q 50117 -g annotator -p my-secret-password-154568
59119, my-secret-password-154568
$ rossum user_assignment add -u 59119 -q 50117
To run commands described below under a chosen user, it is possible to use profiles defined by configure function such as
rossum --profile profile_name configure
After defining necessary profiles and their credentials, the profile can be chosen the following way
rossum --profile profile_name queue list
Some 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:
$ rossum queue list
id name workspace inbox schema users
---- --------------------------- ----------- ---------------------------------------- -------- ----------------------
6 My Queue 1 6 myqueue-ab12ee@elis.rossum.ai 7 27
Download schema as a json:
rossum schema get 7 -O schema.json
Open the schema.json
file in you favourite editor and upload modified version back to Rossum.
rossum schema update 7 --rewrite schema.json
You can also edit schema as an Excel (xlsx) file.
rossum schema get 7 --format xlsx -O schema.xlsx
rossum schema update 7 --rewrite schema.xlsx
From now on, documents will follow new schema. (Warning! If you don't use --rewrite
option,
the new schema will receive a new id - obtain it by queue list
again.)
In addition, there is a scripting support for many common schema operations,
that may be easily used for schema management automation. See rossum schema transform
and rossum tools
tools for further reference.
Run something like:
$ rossum schema transform substitute-options default_schema.json centre <( \
rossum tools xls_to_csv ~/Downloads/ERA_osnova_strediska.xlsx --header 0 --sheet 1 | rossum tools csv_to_options - ) \
| rossum schema transform substitute-options - gl_code <( \
rossum tools xls_to_csv ~/Downloads/ERA_osnova_strediska.xlsx --header 0 | rossum tools csv_to_options - ) \
| rossum schema transform remove - contract \
> era_schema.json
MIT
Use pre-commit
to 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, a Collaborator
with Admin
role shall do the following in master
branch:
Update the Changelog in README, describing all the changes included in the newest release
run:
bump2version minor
git push
git push --tags
In the end, to build a Windows installer, run:
pynsist installer.cfg
Go to releases and upload the newest .exe file from the
.build
folder of your rossum
repository to the newest release
setup.py
schema list
commandwebhook change
command issuecsv get
commandcan_collapse
in xlsx schemauser create
queue change
commanduser_assignment
for bulk assignment of users to queuesconnector create
: queue_id
parameter needs to be specified, if there is more than one queue in organizationwidth
in XLSX schema formatELISClient.upload_document
elisctl document extract
elisctl connector list
command--profile
option to all elisctl
commands--output-file
to elisctl tools
and elisctl schema transform
elisctl schema get ID -O file.json
on WindowsUser-Agent
header (elisctl/{version} ({platform})
) for every request to ROSSUM APIFAQs
Command line interface for controlling the Rossum platform
We found that rossum demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.