Asyncio-based DOIP 2.0 TCP server that fronts the MARDI FDO infrastructure. The server listens on port 3567, uses strict DOIP binary envelopes, streams components from lakeFS (S3-compatible), and integrates with the FDO FastAPI façade and a MediaWiki/Wikibase backend for derived items.
- Built with MkDocs; see
docs/build_docs.shor browse source indocs/content/.
- Requirements:
pip install -r requirements.txt.
- Configuration:
- Either create
config.yamland set configuration details. - Or use environment variables - they override values from the config file where applicable
LAKEFS_USER/LAKEFS_PASSWORDLAKEFS_URL/LAKEFS_REPOFDO_APIOLLAMA_API_KEY
- Either create
Run the server:
python -m doip_server.main # binds 0.0.0.0:3567or, to use a custom FDO server endpoint:
python -m doip_server.main --fdo-api http://127.0.0.1:8000/fdo/The Docker version has an additional HTTP gateway to use the DOIP service.
Example: /doip/retrieve/{object_id}/{component_id} (This would stream the given component as file download.)
Or, using curl:
curl -OJ http://localhost/doip/retrieve/Q123/fulltextBuild the image (from repo root):
docker build -f docker/Dockerfile -t mardi-doip .Run with TLS (default self-signed cert generated during build):
docker run --rm \
-p 80:80 -p 3567:3567 -p 3568:3568 \
-e FDO_API=https://fdo.portal.mardi4nfdi.de/fdo/ \
-e LAKEFS_URL=<your-lakefs-url> \
-e LAKEFS_USER=<user> -e LAKEFS_PASSWORD=<pass> -e LAKEFS_REPO=<repo> \
mardi-doipExample hello via client CLI against the container:
python -m client_cli.main --host localhost --port 3567 --action helloRetrieve meta-data about an FDO, e.g. a publication with QID Q6190920:
PYTHONPATH=. python -m client_cli.main --host 127.0.0.1 --no-tls --action retrieve --object-id Q6190920 Retrieve the fulltext pdf from a FDO publication:
PYTHONPATH=. python -m client_cli.main --host 127.0.0.1 --no-tls --action retrieve --object-id Q6190920 --component fulltext --output pdf.pdffrom doip_client import StrictDOIPClient
client = StrictDOIPClient(host="127.0.0.1", port=3567, use_tls=False)
hello = client.hello()
metadata = client.retrieve("Q123").metadata_blocks- Place
certs/server.crtandcerts/server.key(PEM) to enable TLS automatically; otherwise the server speaks plaintext DOIP. - A compatibility listener runs on port 3568 (same TLS setting) accepting doipy JSON-segmented requests and bridging to the DOIP handlers.
Download the latest CLI binaries (Windows/macOS/Linux) from the Artifacts section of the most recent successful run.