ELO Indexserver Client
Developed by Treskon GmbH
- published on PyPI: https://pypi.org/project/elo-indexserver-client/
- Documentation
- Sourcecode GitHub repository
A client library for accessing Indexserver component of ELO Digital Office GmbH via REST API.
Motivation
The motivation for this project was to provide a simple and easy to use client library for accessing the Indexserver REST API. While ELO provides an OpenAPI specification for the Indexserver REST API, it appears to be a port of the Java SDK. Which allows to use all the features of the Java SDK, similar to what we could do in the ELO Java Client itself. This comes in favor for people who already have experience in working with the ELO Java SDK. However, for people who are not familiar with the ELO ecosystem the naming conventions, structure, method names, BSET Flags, etc. are far from intuitive and easy to understand.
Therefore, we decided to create a client library that wraps the original OpenAPI specification and exposes only a handful of features that cover the most common use cases.
Installation
pip install elo-indexserver-client
Usage
First, init the Service with the baseurl, user and password of the Indexserver REST API.
from eloservice.elo_service import EloService
rest_baseurl = "http://localhost:9090/ix-Archive/rest/"
rest_user = "elo"
rest_password = "elo"
elo_service = EloService(url=rest_baseurl, user=rest_user, password=rest_password)
User and password may contain special characters (e.g. ä, ö, ü, ß, §, €). Pure ASCII credentials are sent
via HTTP Basic auth. Otherwise, the client logs in via IXServicePortIF/login (credentials in the UTF-8 JSON body) and
authenticates all further calls with the returned session ticket, which is renewed automatically.
Then you can use the service to access the Index server REST API. Here are often examples:
# Create Folder
folder_id = elo_service.create_folder(path="¶Foodplaces", separator="¶")
# upload_file
file_id = elo_service.upload_file(sord_id=folder_id, file_path="test.jpg", file_name="ichiran_ramen.jpg")
# overwrite_mask_fields
elo_service.overwrite_mask_fields(sord_id=file_id, mask_name="Images", metadata={
"LATITUDE": "35.73258119685775",
"LONGITUDE": "139.71412884357233",
"ITEMDOCDATE": "2023-12-26"
})
# search
search_result = elo_service.search(search_mask_fields={"LATITUDE": "35.73258119685775"}, max_results=1)
print(f"sordID of the found file: {search_result[0]}")
Keywording aspects (ELO 23+)
# aspects of the repository and the aspect associations of a mask
aspects = elo_service.get_aspects()
assocs = elo_service.get_mask_aspect_assocs("Invoice")
# write and read aspect data: association name -> aspect object(s)
elo_service.write_aspect_fields(sord_id=file_id, aspect_fields={
"INVOICE_ADDRESS": {"STREET": "Hauptplatz 1", "CITY": "Graz", "ZIP": "8010"},
"POSITIONS": [{"ITEM": "Ramen", "AMOUNT": 2}, {"ITEM": "Gyoza", "AMOUNT": 1}],
})
aspect_fields = elo_service.get_aspect_fields(sord_id=file_id)
# search: "<association>¶<aspect>¶<line>", empty parts are wildcards
search_result = elo_service.search(search_aspect_fields={"¶ADDRESS¶CITY": "Graz"})
For more information visit the Documentation or see the docstrings in the code.
There are also some demos via juptyer notebook in the examples folder. See Readme for more information.
Technical Details
The client library is based on the OpenAPI specification provided by ELO Indexserver. Downloaded from the ELO Server under the url http://eloIndexServer:9090/ix/resources/openapi.json. The used ELO version was 20.0.0.111.
Based on the OpenAPI specification, the client library was generated using the openapi-python-client tool.
Contributing and Support
We are happy to receive any contributions to this library. Feel free to open an issue or a pull request in our GitHub repository. To get started read the Contributing Guide.
We're not able to offer any commercial assistance for this library, but we're always happy to hear your thoughts and assist you with any issues, as time permits.
Feel free to open an issue in our GitHub repository or contact us via mail at: internal-dev@treskon.at.
License
Copyright 2024 Treskon GmbH
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Metadata
Release files for elo-indexserver-client 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| elo_indexserver_client-0.2.0.tar.gz | 708.2 kB | Without provenance | Details for elo_indexserver_client-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| elo_indexserver_client-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for elo_indexserver_client-0.2.0-py3-none-any.whl |
Total release size: 2.7 MB
Release files / elo_indexserver_client-0.2.0.tar.gz
| Download URL | elo_indexserver_client-0.2.0.tar.gz |
|---|---|
| Size | 708.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3d120321f31a3cbeda842e4857714193f1815cf3150fbbe557bfce05fbdb1c09
|
|
BLAKE2b-256 checksum How to use checksums |
a114019e02a00987190a16b3f4015fbfc980a53552ad778a0693c8d6f9934174
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.5.2 CPython/3.12.16 Linux/7.0.0-1020-azure
|
Release files / elo_indexserver_client-0.2.0-py3-none-any.whl
| Download URL | elo_indexserver_client-0.2.0-py3-none-any.whl |
|---|---|
| Size | 2.0 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cf0013f0ece8d4fa13d0f96d26192b3bdeae3af885c7829cf88c96af656a0f78
|
|
BLAKE2b-256 checksum How to use checksums |
11370507bd2e54bbe0a444a5f241feabf7b8994e2bf920a1e011ef5fe811c9bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.5.2 CPython/3.12.16 Linux/7.0.0-1020-azure
|
Security for elo-indexserver-client 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.