this is the docker iamge for the dsiUnit python module containing a Web-GUI and a REST-API see
529
This repo contains a Bokeh application that allows to validate D-SI unit parsing and conversion by the dsiUnit Module
The Web Gui Looks Like:

git clone https://gitlab1.ptb.de/digitaldynamicmeasurement/dsi-parser-frontend.git
cd dsi-parser-frontend
pip install -r requirements.txt
bokeh serve ./ --port 5020
uvicorn restAPIServer:app --host 0.0.0.0 --port 5021
docker pull benesee/dsiunitsfrontend:latest
docker run -p 5020:5020 -p 5021:5021 benesee/dsiunitsfrontend:latest
Change target port by changing the first port number in the -p option to the desired port number urls of the services are:
This documentation covers the available REST API endpoints for converting unit strings to UTF-8 and LaTeX formats, as well as comparing different units for scalability and conversion. Each endpoint is described with its functionality, required input, and example responses.
/convert/utf8/POST{
"unit_string": "String"
}
{
"utf8_string": "Converted UTF-8 string"
}
{
"detail": "Error message"
}
/convert/latex/POST{
"unit_string": "String"
}
{
"latex_string": "Converted LaTeX string"
}
{
"detail": "Error message"
}
/compare/units/POST{
"unit_string1": "First unit string",
"unit_string2": "Second unit string",
"complete": false
}
{
"scale_factor": "Scale factor if units are scalable",
"base_unit": "Base unit derived from comparison"
}
{
"detail": "Warnings or error details from unit validation"
}
{
"detail": "Error message"
}
Errors are returned as standard HTTP response codes along with a JSON body specifying the detail of the error.
Here's an example using curl to make a request to the /convert/utf8/ endpoint:
curl -X POST "http://localhost:8000/convert/utf8/" -H "accept: application/json" -H "Content-Type: application/json" -d "{\"unit_string\":\"\\meter\"}"
Content type
Image
Digest
sha256:78bc547b3…
Size
149 MB
Last updated
9 months ago
docker pull benesee/dsiunitsfrontend