A client library for accessing indexserver REST API of the ECM system ELO Digital Office.
Project description
ELO indexserver client
Developed by Treskon GmbH published on PyPI: https://pypi.org/project/elo-indexserver-client/
A client library for accessing Indexserver component of ELO Digital Office GmbH via REST API.
Under no circumstances should you use store any sensitive information such as passwords, customer names, ... in this repository.
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::6056/ix-Archive/rest/"
rest_user = "elo"
rest_password = "elo"
elo_service = EloService(url=rest_baseurl, user=rest_user, password=rest_password)
Then you can use the service to access the Index server REST API. Here are often used methods:
# 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]}")
For more methods see the python docstrings in the code.
Development
Install poetry: https://python-poetry.org/docs/#installation
# Install dependencies
poetry install
# activate shell
poetry shell
# Run tests
python -m unittest discover test
Building / publishing this package
This project uses Poetry to manage dependencies and packaging. Here are the basics:
- Update the metadata in pyproject.toml (e.g. authors, version)
- If you're using a private repository, configure it with Poetry
poetry config repositories.<your-repository-name> <url-to-your-repository>
poetry config http-basic.<your-repository-name> <username> <password>
- Publish the client with
poetry publish --build -r <your-repository-name>
or, if for public PyPI, justpoetry publish --build
If you want to install this client into another project without publishing it (e.g. for development) then:
- If that project is using Poetry, you can simply do
poetry add <path-to-this-client>
from that project - If that project is not using Poetry:
- Build a wheel with
poetry build -f wheel
- Install that wheel from the other project
pip install <path-to-wheel>
- Build a wheel with
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for elo_indexserver_client-0.1.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 658c7e859d906e2c77326a58490b9f546cdb3ba9f1809d379565f57fb3a3b782 |
|
MD5 | 6d9d1efe230226426f5a50158185b685 |
|
BLAKE2b-256 | 6d515f89a3ef44915aee646feb782230a9a7e704a1bf004234f137370a9035f1 |
Hashes for elo_indexserver_client-0.1.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f4168706aebcae28007d0c12107a5302e6ff087a598a5305a90d0a040f74230 |
|
MD5 | 436589a50890b6ee7db56510213448ff |
|
BLAKE2b-256 | 21a32afda94d8ee435c6d550c21385604b46ef6eecafbfbbcd30fea4f7b5c736 |