p2p-copy


Namep2p-copy JSON
Version 0.1.2 PyPI version JSON
download
home_pageNone
SummaryPython library and command-line tool for transferring files and directories over a WebSocket relay server
upload_time2025-10-07 14:41:58
maintainerNone
docs_urlNone
authorAfuLD
requires_python>=3.10
licenseMIT
keywords file-transfer p2p websocket
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # p2p-copy

[![PyPI version](https://badge.fury.io/py/p2p-copy.svg?noCache=1)](https://badge.fury.io/py/p2p-copy)
[![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org/downloads/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Docs](https://img.shields.io/badge/docs-online-brightgreen.svg)](https://afuld.github.io/p2p-copy)

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](docs/features.md).

## Full Documentation
For detailed guides, visit the [full documentation site](https://afuld.github.io/p2p-copy).

## Quickstart

Install via pip:
```bash
pip install p2p-copy[security]
```

### Run Relay (one terminal)
```bash
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)
```bash
p2p-copy send ws://localhost:8765 mysecretcode /path/to/files_or_dirs --encrypt --compress on --resume
```

### Receive (third terminal)
```bash
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](docs/usage.md). For production relay setup, see [Relay Setup](docs/relay.md).

## 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](docs/api.md).

For installation instructions, see [Installation](docs/installation.md). For module structure, see [Module Layout](docs/layout.md).

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "p2p-copy",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "file-transfer, p2p, websocket",
    "author": "AfuLD",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/99/cb/21b08d139c98fc5343bb24301bf4754d5d5acd51fbbe49f989296fc938c9/p2p_copy-0.1.2.tar.gz",
    "platform": null,
    "description": "# p2p-copy\n\n[![PyPI version](https://badge.fury.io/py/p2p-copy.svg?noCache=1)](https://badge.fury.io/py/p2p-copy)\n[![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org/downloads/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Docs](https://img.shields.io/badge/docs-online-brightgreen.svg)](https://afuld.github.io/p2p-copy)\n\np2p-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.\n\nThe 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](docs/features.md).\n\n## Full Documentation\nFor detailed guides, visit the [full documentation site](https://afuld.github.io/p2p-copy).\n\n## Quickstart\n\nInstall via pip:\n```bash\npip install p2p-copy[security]\n```\n\n### Run Relay (one terminal)\n```bash\np2p-copy run-relay-server localhost 8765 --no-tls  # For development\n# Or with TLS: --tls --certfile cert.pem --keyfile key.pem\n```\n\n### Send Files (another terminal)\n```bash\np2p-copy send ws://localhost:8765 mysecretcode /path/to/files_or_dirs --encrypt --compress on --resume\n```\n\n### Receive (third terminal)\n```bash\np2p-copy receive ws://localhost:8765 mysecretcode --out ./downloads --encrypt\n```\n\nUse the same `mysecretcode` for sender and receiver pairing. For full CLI details, see [Usage](docs/usage.md). For production relay setup, see [Relay Setup](docs/relay.md).\n\n## Key Aspects\n\n- **Pairing and Transfer**: Clients connect to a relay using a shared code (hashed for security). Files are streamed in chunks with integrity checks.\n- **Optional Features**: End-to-end encryption (AES-GCM with Argon2-derived keys), per-file compression (Zstandard), and the option to resume partial transfers.\n- **Use Cases**: Designed for HPC workflows where traditional tools like SCP or rsync are limited by firewalls or configuration requirements.\n- **API Integration**: Embeddable in Python scripts; see [API](docs/api.md).\n\nFor installation instructions, see [Installation](docs/installation.md). For module structure, see [Module Layout](docs/layout.md).\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python library and command-line tool for transferring files and directories over a WebSocket relay server",
    "version": "0.1.2",
    "project_urls": null,
    "split_keywords": [
        "file-transfer",
        " p2p",
        " websocket"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "788f4ab9da74b03609c9ff35cd838fb3c7792d3344506ef85f111152f2a42ebc",
                "md5": "17486eae4638d3a5fb0b51f161ab790e",
                "sha256": "76cbc06b0b90b51261f87c5b465fde65225bdf8c708c72ffd6e7f9be1dfe207c"
            },
            "downloads": -1,
            "filename": "p2p_copy-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "17486eae4638d3a5fb0b51f161ab790e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 20793,
            "upload_time": "2025-10-07T14:41:57",
            "upload_time_iso_8601": "2025-10-07T14:41:57.653851Z",
            "url": "https://files.pythonhosted.org/packages/78/8f/4ab9da74b03609c9ff35cd838fb3c7792d3344506ef85f111152f2a42ebc/p2p_copy-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "99cb21b08d139c98fc5343bb24301bf4754d5d5acd51fbbe49f989296fc938c9",
                "md5": "c1c9d913c2d9a7fff9c954b498948a94",
                "sha256": "6510a25e2e86094eb8030ee0455b14d6f31a0159ea23a69874170b17e038230c"
            },
            "downloads": -1,
            "filename": "p2p_copy-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "c1c9d913c2d9a7fff9c954b498948a94",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 16481,
            "upload_time": "2025-10-07T14:41:58",
            "upload_time_iso_8601": "2025-10-07T14:41:58.652661Z",
            "url": "https://files.pythonhosted.org/packages/99/cb/21b08d139c98fc5343bb24301bf4754d5d5acd51fbbe49f989296fc938c9/p2p_copy-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-07 14:41:58",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "p2p-copy"
}
        
Elapsed time: 2.99477s