Skip to main content

p2p-copy

PyPI version Python 3.10+ License: MIT Docs

p2p-copy is a Python library and command-line tool for transferring files and directories over a WebSocket relay server. It supports chunked streaming, optional end-to-end encryption, compression, and resume functionality, making it suitable for environments with restrictive firewalls, such as high-performance computing (HPC) systems. The tool avoids dependencies on SSH or inbound ports, relying instead on outbound connections over ports like 443.

The design prioritizes performance, low resource usage, and simplicity, with a stateless relay that forwards data without storage. For details on the protocol and internals, see Features.

Full Documentation

For detailed guides, visit the full documentation site.

Quickstart

Install via pip:

pip install p2p-copy[security]

Run Relay (one terminal)

p2p-copy run-relay-server localhost 8765 --no-tls  # For development
# Or with TLS: --tls --certfile cert.pem --keyfile key.pem

Send Files (another terminal)

p2p-copy send ws://localhost:8765 mysecretcode /path/to/files_or_dirs --encrypt --compress on --resume

Receive (third terminal)

p2p-copy receive ws://localhost:8765 mysecretcode --out ./downloads --encrypt

Use the same mysecretcode for sender and receiver pairing. For full CLI details, see Usage. For production relay setup, see Relay Setup.

Key Aspects

  • Pairing and Transfer: Clients connect to a relay using a shared code (hashed for security). Files are streamed in chunks with integrity checks.
  • Optional Features: End-to-end encryption (AES-GCM with Argon2-derived keys), per-file compression (Zstandard), and the option to resume partial transfers.
  • Use Cases: Designed for HPC workflows where traditional tools like SCP or rsync are limited by firewalls or configuration requirements.
  • API Integration: Embeddable in Python scripts; see API.

For installation instructions, see Installation. For module structure, see Module Layout.

Metadata

Release files for p2p-copy 0.1.2

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

Source distribution (sdist)

Source distribution for p2p-copy 0.1.2
File Size Uploaded Provenance
p2p_copy-0.1.2.tar.gz 16.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for p2p-copy 0.1.2
File Interpreter ABI Platform
p2p_copy-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 37.3 kB

Release files / p2p_copy-0.1.2.tar.gz

Download URL p2p_copy-0.1.2.tar.gz
Size 16.5 kB
Tags Source
SHA-256 checksum
How to use checksums
6510a25e2e86094eb8030ee0455b14d6f31a0159ea23a69874170b17e038230c
BLAKE2b-256 checksum
How to use checksums
99cb21b08d139c98fc5343bb24301bf4754d5d5acd51fbbe49f989296fc938c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.28.1

Release files / p2p_copy-0.1.2-py3-none-any.whl

Download URL p2p_copy-0.1.2-py3-none-any.whl
Size 20.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
76cbc06b0b90b51261f87c5b465fde65225bdf8c708c72ffd6e7f9be1dfe207c
BLAKE2b-256 checksum
How to use checksums
788f4ab9da74b03609c9ff35cd838fb3c7792d3344506ef85f111152f2a42ebc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.28.1

Security for p2p-copy 0.1.2

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

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