Skip to main content
Change of provenance

The repository or configuration that created this release differ from a previous release. View details.

ROPE

Resumable Offline Protocol for Emergencies

Tests PyPI License: Apache-2.0 Python 3.11+ Status: early development

ROPE transfers growing files and small messages between a small, closed group of devices over unreliable local networks – radio links, Wi-Fi, no internet. Like a rescue line it holds the connection even when it is pulled: an interruption costs time, never data.

Status: early development. The specification is draft 1 with a proposed wire format. Streams from sources via the hub to consumers work, including resume after disconnects and restarts and block repair, and so do messages with custody and offline media (e.g. a USB stick) as a second path. Interfaces will change.

Why

Field teams record large files (for example sonar recordings) on one device and want to evaluate them somewhere else while they are still being recorded. The link in between drops out regularly, and there is no internet. Plain TCP does not resume across connections and acknowledges data before it is safely stored; UDP loses data during outages. ROPE adds the missing pieces on top of TCP, borrowing ideas – not code – from space communication (CFDP class 2, DTN custody transfer).

Key properties

  • Resumable – after any interruption, transfer continues from the last durably stored byte, never from zero.
  • Custody – a receiver acknowledges only after the data is on disk (flush + fsync). The sender of a message learns which recipients have it.
  • End-to-end verified – checksums per segment and per complete file; bit-for-bit identical results. If bytes changed after they were sent (e.g. a header updated at the end of a recording), only the differing blocks travel again.
  • Never blocks the producer – separate process, read-only file access without locks, bounded memory.
  • Offline – no internet, no cloud, no external services.
  • Small groups – star topology with a hub and a closed participant list: source, consumer and recipient roles, names for the operator, and per consumer a choice of which streams it receives.
  • Application-agnostic core – the core knows nothing about the data; applications define streams and messages.
  • Standard library only – no third-party runtime dependencies.
  • Two paths – the same segments and messages can also travel on removable media and mix with the network.

ROPE has no encryption by design and is meant for closed networks – see Security considerations.

How it works (in short)

 source ──TCP──▶ hub ──TCP──▶ consumer(s)
                  │
                  └──TCP──▶ recipient(s)   (messages only)
  1. Every participant connects to the hub and greets it (identifier, role, protocol version). The hub checks its participant list and tells everybody the names and roles of the group.
  2. The hub reports how far it has stored each stream (committed offset).
  3. The source sends segments from there; the hub writes, syncs, then acknowledges.
  4. When a stream is complete, a final checksum confirms the whole file; on a difference, only the differing blocks are resent.
  5. On any disconnect: reconnect, greet, continue from the committed offset.
  6. Without a network, a participant and the hub exchange the same frames as bundles on removable media (export_media, import_media); network and media mix freely.

Details: docs/spec.md.

Requirements

  • Python 3.11 or newer, on Windows or Linux
  • Nothing else at runtime

Installation

python -m pip install rope-protocol

The package is named rope-protocol (import rope_protocol), because the name rope on PyPI belongs to a well-known refactoring library. Versions and changes: CHANGELOG.md. While ROPE is in early development, pin the version you tested with (e.g. rope-protocol==0.1.2).

For development:

git clone https://github.com/NULLZEIT-net/rope.git
cd rope
python -m pip install pytest pyflakes
python -m pytest

No radio link at hand? The link simulator sits between two programs and adds bandwidth limits, latency, blackouts and disconnects:

python -m rope_protocol.linksim --listen 127.0.0.1:47311 --target 127.0.0.1:47310 --profile radio

Profiles are lan, wifi, radio and radio-bad; --seed makes the fault schedule reproducible. All profile values are assumptions until measured on real links (see spec §13).

ROPE's default port is 47310; applications can override it.

Repository layout

Path Content
docs/spec.md Protocol specification (draft)
docs/decisions.md Decisions with date and reason
docs/ideas.md Ideas not yet planned
docs/images/ Logo and symbol (SVG; light and dark variant)
TASKS.md Task board
CHANGELOG.md Changes per version
src/rope_protocol/ Package: frame codec (frames.py), link simulator (linksim.py), durable store (store.py), sending and receiving side of streams (sender.py, receiver.py), messages (messages.py), offline media (media.py), participant list (roster.py), participants (hub.py, source.py, consumer.py, recipient.py, base participant.py)
tests/ Unit tests and the fault-injection test bench (framefault.py, test_faults.py)
AGENTS.md Guidelines for contributors and coding agents

Testing

Every change runs pyflakes and pytest on Windows and Linux (Python 3.11–3.13). The test bench injects faults – a simulated radio link with blackouts and disconnects, restarts, and one fault at every step of the procedure (connection cut before or in the middle of a frame, frame duplicated or damaged, participant or hub restarted) – and checks that every file arrives bit-for-bit identical and every message exactly once. The full set of faults at every step runs with:

ROPE_SOAK=1 python -m pytest tests/test_faults.py

Limitations

  • Early development: streams, messages and offline media work. Interfaces and the wire format may still change.
  • Not a general file synchronisation tool and not meant for the internet.
  • No encryption, no authentication beyond a participant list.
  • Not compatible with CFDP or DTN software; only the ideas are borrowed.

Contributing

Contributions are welcome – please read CONTRIBUTING.md. Questions and ideas: open an issue.

License

Copyright 2026 Daniel Fankhauser. Licensed under the Apache License, Version 2.0; see also NOTICE. The name "ROPE" in connection with this protocol is not covered by the licence (Apache-2.0, section 6).

Metadata

Release files for rope-protocol 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Change of provenance

The repository or configuration that created these release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Source distribution (sdist)

Source distribution for rope-protocol 0.1.3
File Size Uploaded Provenance Actions
rope_protocol-0.1.3.tar.gz 91.5 kB With provenance Details for rope_protocol-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for rope-protocol 0.1.3
File Interpreter ABI Platform Actions
rope_protocol-0.1.3-py3-none-any.whl Python 3 none any Details for rope_protocol-0.1.3-py3-none-any.whl

Total release size: 153.5 kB

Release files / rope_protocol-0.1.3.tar.gz

Change of provenance

This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Download URL rope_protocol-0.1.3.tar.gz
Size 91.5 kB
Tags Source
SHA-256 checksum
How to use checksums
67601f8f338a626bf189f6f3d997d758a0fddeb33fb16fda786f8a449dd4de32
BLAKE2b-256 checksum
How to use checksums
b004b9dbdaa85f33bb86bef0ba02cb213c36cfde282fd0da6eb0b7027e287e94
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Release files / rope_protocol-0.1.3-py3-none-any.whl

Change of provenance

This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Download URL rope_protocol-0.1.3-py3-none-any.whl
Size 62.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
279bcb643eddff51f31c7670d3990260cb561ec514bcf01fad8cf0fcac7c33d1
BLAKE2b-256 checksum
How to use checksums
9d2cbe681bcb84d733bb554d1d3b948db3cdb413c88732af01b72cc4e93f4d0d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Security for rope-protocol 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Change of provenance

The repository and configuration that created this release differ from a previous release.

While this could reflect a routine change by the project maintainers, it may also indicate that the release files have been compromised.

Select from 2 files

Attestation for rope_protocol-0.1.3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page