{"id":40938079,"url":"https://github.com/mardi4nfdi/mardi_doip_server","last_synced_at":"2026-06-16T09:00:31.612Z","repository":{"id":326432794,"uuid":"1103047731","full_name":"MaRDI4NFDI/mardi_doip_server","owner":"MaRDI4NFDI","description":"A simple server implementing the DOIP v2 (Digital Object Interface Protocol)","archived":false,"fork":false,"pushed_at":"2026-06-11T19:21:06.000Z","size":2276,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-11T21:10:33.611Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MaRDI4NFDI.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-11-24T11:09:49.000Z","updated_at":"2026-06-11T19:20:47.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/MaRDI4NFDI/mardi_doip_server","commit_stats":null,"previous_names":["mardi4nfdi/mardi_doip_server"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/MaRDI4NFDI/mardi_doip_server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaRDI4NFDI%2Fmardi_doip_server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaRDI4NFDI%2Fmardi_doip_server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaRDI4NFDI%2Fmardi_doip_server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaRDI4NFDI%2Fmardi_doip_server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MaRDI4NFDI","download_url":"https://codeload.github.com/MaRDI4NFDI/mardi_doip_server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaRDI4NFDI%2Fmardi_doip_server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34398408,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-16T02:00:06.860Z","response_time":126,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-22T04:30:50.852Z","updated_at":"2026-06-16T09:00:31.599Z","avatar_url":"https://github.com/MaRDI4NFDI.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mardi DOIP Server\n\nAsyncio-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.\n\n## Documentation\n[![Documentation](https://img.shields.io/badge/docs-gh--pages-blue)](https://mardi4nfdi.github.io/mardi_doip_server/)\n\n- Built with MkDocs; see `docs/build_docs.sh` or browse source in `docs/content/`.\n\n\n\n## Getting Started\n- Requirements: \n  - `pip install -r requirements.txt`.\n- Configuration:\n  - Either create `config.yaml` and set configuration details.\n  - Or use environment variables - they override values from the config file where applicable\n    - `LAKEFS_USER` / `LAKEFS_PASSWORD` \n    - `LAKEFS_URL` / `LAKEFS_REPO`\n    - `FDO_API`\n    - `OLLAMA_API_KEY`\n\nRun the server:\n```bash\npython -m doip_server.main           # binds 0.0.0.0:3567\n```\nor, to use a custom FDO server endpoint:\n```bash\npython -m doip_server.main --fdo-api http://127.0.0.1:8000/fdo/\n```\n\n\n## Getting started with Docker\n\nThe Docker version has an additional HTTP gateway to use the DOIP service.  \nExample: `/doip/retrieve/{object_id}/{component_id}` (This would stream the given component as file download.)\nOr, using curl:\n```bash\ncurl -OJ http://localhost/doip/retrieve/Q123/fulltext\n```\n\nBuild the image (from repo root):\n```bash\ndocker build -f docker/Dockerfile -t mardi-doip .\n```\n\nRun with TLS (default self-signed cert generated during build):\n```bash\ndocker run --rm \\\n  -p 80:80 -p 3567:3567 -p 3568:3568 \\\n  -e FDO_API=https://fdo.portal.mardi4nfdi.de/fdo/ \\\n  -e LAKEFS_URL=\u003cyour-lakefs-url\u003e \\\n  -e LAKEFS_USER=\u003cuser\u003e -e LAKEFS_PASSWORD=\u003cpass\u003e -e LAKEFS_REPO=\u003crepo\u003e \\\n  mardi-doip\n```\n\nExample hello via client CLI against the container:\n```bash\npython -m client_cli.main --host localhost --port 3567 --action hello\n```\n\n## Examples\n\n### Run the client CLI:\n\nRetrieve meta-data about an FDO, e.g. a publication with QID Q6190920:\n\n```bash\nPYTHONPATH=. python -m client_cli.main --host 127.0.0.1 --no-tls --action retrieve --object-id Q6190920 \n```\n\nRetrieve the fulltext pdf from a FDO publication:\n\n```bash\nPYTHONPATH=. python -m client_cli.main --host 127.0.0.1 --no-tls --action retrieve --object-id Q6190920 --component fulltext.pdf --output pdf.pdf\n```\n\nUpdate one component on an existing FDO and create a mandatory lakeFS commit:\n\n```bash\nPYTHONPATH=. python -m client_cli.main --host 127.0.0.1 --no-tls --action update --object-id Q6190920 --component fulltext.pdf --input pdf.pdf --media-type application/pdf\n```\n\n\n### Use the DOIP client in Python:\n```python\nfrom doip_client import StrictDOIPClient\n\nclient = StrictDOIPClient(host=\"127.0.0.1\", port=3567, use_tls=False)\nhello = client.hello()\nmetadata = client.retrieve(\"Q123\").metadata_blocks\nupdate = client.update_component(\"Q123\", \"fulltext.pdf\", b\"pdf-bytes\", media_type=\"application/pdf\")\n```\n\nComponent IDs are exact storage names. No file extension is added automatically. If you store `fulltext`, retrieve `fulltext`. If you store `fulltext.pdf`, retrieve `fulltext.pdf`.\n\n## TLS (optional):\n- Place `certs/server.crt` and `certs/server.key` (PEM) to enable TLS automatically; otherwise the server speaks plaintext DOIP.\n- A compatibility listener runs on port 3568 (same TLS setting) accepting doipy JSON-segmented requests and bridging to the DOIP handlers.\n\n\n## CLI Releases\n\n[![GitHub Release](https://img.shields.io/github/v/release/MaRDI4NFDI/mardi_doip_server)](https://github.com/MaRDI4NFDI/mardi_doip_server/releases/latest)\n[![Build Status](https://github.com/MaRDI4NFDI/mardi_doip_server/actions/workflows/build-doip-cli-binary.yml/badge.svg)](https://github.com/MaRDI4NFDI/mardi_doip_server/actions/workflows/build-doip-cli-binary.yml)\n\nPre-built binaries for Windows, macOS, and Linux are available on the [releases page](https://github.com/MaRDI4NFDI/mardi_doip_server/releases). Download the binary for your platform and run it directly — no Python installation required.\n\n```bash\n# Example: create a new item\nmardi-doip-cli --host doip.portal.mardi4nfdi.org --action create \\\n  --json '{\"label\":\"Jane Doe\",\"claims\":{\"P31\":\"Q57162\",\"P1460\":\"Q5976445\"}}' \\\n  --token \u003cLAKEFS_PASSWORD\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmardi4nfdi%2Fmardi_doip_server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmardi4nfdi%2Fmardi_doip_server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmardi4nfdi%2Fmardi_doip_server/lists"}