{"id":19007423,"url":"https://github.com/teschmitt/py-dtn7","last_synced_at":"2025-07-30T01:38:47.878Z","repository":{"id":49836846,"uuid":"495468989","full_name":"teschmitt/py-dtn7","owner":"teschmitt","description":"A dtn7-rs REST- and WebSocket-API wrapper for Python","archived":false,"fork":false,"pushed_at":"2023-07-15T20:17:05.000Z","size":316,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-25T22:17:45.195Z","etag":null,"topics":["api","api-wrapper","bundle-protocol","delay-tolerant-network","dtn7-rs","pypi-package","python","rest","websocket"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/teschmitt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2022-05-23T15:29:51.000Z","updated_at":"2025-05-04T15:12:12.000Z","dependencies_parsed_at":"2024-11-08T18:54:02.677Z","dependency_job_id":null,"html_url":"https://github.com/teschmitt/py-dtn7","commit_stats":{"total_commits":41,"total_committers":2,"mean_commits":20.5,"dds":"0.14634146341463417","last_synced_commit":"b34cea4a1a53000b5f74fb092b344a0e702f0525"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/teschmitt/py-dtn7","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teschmitt%2Fpy-dtn7","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teschmitt%2Fpy-dtn7/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teschmitt%2Fpy-dtn7/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teschmitt%2Fpy-dtn7/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/teschmitt","download_url":"https://codeload.github.com/teschmitt/py-dtn7/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teschmitt%2Fpy-dtn7/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267612616,"owners_count":24115494,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"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":["api","api-wrapper","bundle-protocol","delay-tolerant-network","dtn7-rs","pypi-package","python","rest","websocket"],"created_at":"2024-11-08T18:38:21.112Z","updated_at":"2025-07-30T01:38:47.835Z","avatar_url":"https://github.com/teschmitt.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# py-dtn7 (Work in Progress -- don't use yet)\n\n[![Licence AGPL-3.0](https://img.shields.io/github/license/teschmitt/py-dtn7)](LICENSE)\n\nA Python wrapper library for the DTN7 REST and WebSocket API of [dtn7-rs](https://github.com/dtn7/dtn7-rs).\nThe library includes a fully spec compliant `Bundle` type (but without fragment and CRC support), which allows full\nbundle creation and (de-)serialization.\n\nThe `bundle.py`, `dtn_rest_client.py`, `utils.py` modules/files are Micropython compatible.\nBut, this requires a bit of manual library management.\nPlease refer to the Micropython installation guide below.\n\n### Getting Started\n\nTo use `py-dtn7` in your project, simply install it from PyPI with Poetry:\n\n```shell\n$ poetry install --no-dev py_dtn7\n```\n\n### Development\n\nThis is very much a work-in-progress and by far not complete. The Bundle\nimplementation is very rudimentary and does not support any blocks other\nthan Primary and Payload.\n\nTo generate the API documentation use `pdoc`:\n\n```shell\n$ pdoc ./py_dtn7 --output-directory ./docs\n```\n\n... or check out [py-dtn7.readthedocs.org](https://py-dtn7.readthedocs.org)\n\n\n## Quickstart\n\n```pycon\n\u003e\u003e\u003e from py_dtn7 import DTNRESTClient\n\u003e\u003e\u003e client = DTNRESTClient(host=\"http://localhost\", port=3000)\n\u003e\u003e\u003e d.peers\n{'box1': {'eid': [1, '//box1/'], 'addr': {'Ip': '10.0.0.42'}, 'con_type': 'Dynamic', 'period': None, 'cla_list': [['MtcpConvergenceLayer', 16162]], 'services': {}, 'last_contact': 1653316457}}\n\u003e\u003e\u003e d.info\n{'incoming': 0, 'dups': 0, 'outgoing': 0, 'delivered': 3, 'broken': 0}\n```\n\nWhen sending a bundle to a known peer, we can simply supply the peer name and endpoint,\notherwise we use the complete URI:\n\n```pycon\n\u003e\u003e\u003e d.send(payload={\"body\": \"This will be transferred as json\"}, peer_name=\"box1\", endpoint=\"info\")\n\u003cResponse [200]\u003e\n\u003e\u003e\u003e r = d.send(payload=\"Is there anybody out there?\", destination=\"dtn://greatunkown/incoming\")\n\u003e\u003e\u003e r.content.decode(\"utf-8\")\n'Sent payload with 27 bytes'\n```\n\n## Micropython Installation Guide\n\nTo be extended:\n\nThe dummy libraries `__future__.py`, `abc.py`, `typing.py`, the [micropython-cbor](https://github.com/alexmrqt/micropython-cbor/) library (specifically the `cbor.py` module/file) and `urequests` as well as `datetime` are needed:\n\n```shell\n$ mpremote mip install urequests\n$ mpremote mip install datetime\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteschmitt%2Fpy-dtn7","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteschmitt%2Fpy-dtn7","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteschmitt%2Fpy-dtn7/lists"}