Python DTXS Client
Prerequisities
- Python
Install the client
- Clone the repository with
git clone https://github.com/wai-blue/dtxs-client
- Create your
config.json
based onsample.config.json
from the cloned repository. You will need to fill all configuration parameters.
Sample configuration of the DTXS client looks followingly:
{
"dtxsClient": {
"clientId": "your_client_id",
"clientSecret": "your_client_secret",
"userName": "your_user_name",
"userPassword": "your_password",
"oauthEndpoint": "https://dtxs-server.example.url:29084/realms/YOUR_REALM/protocol/openid-connect",
"dtxsEndpoint": "http://dtxs-server.example.url:23741/api/v0.04"
}
}
Run the test
To test the client, simply run ./tests/python.bat
in your terminal. You should see available commands, something similar to this:
Usage: test.py <configFile> <command> [arg1] [arg2] ...
Available commands:
list-databases Lists available databases.
list-records <database> Lists records in given database.
list-documents <database> Lists documents in given database.
upload-document <database> <pathToFile> Upload a document to given database.
Upload document using CLI
For example to upload the document to database my-database
(this database must exist) from your computer, run following:
./tests/python.bat config.json upload-document my-database c:\path-to-my-document.txt