Skip to main content

beam

Move a project folder from one laptop to another over the local network. Pure Python standard library, no runtime dependencies, works on Windows, macOS and Linux (Python 3.9+).

# laptop A
beam send ~/thesis

# laptop B
beam recv ab3f9c

Install

Both laptops need it:

pip install beam-lan

pipx install beam-lan also works and keeps it out of your other environments.

If your shell says beam is not a recognised command, pip put the script in a folder that is not on your PATH (pip prints a warning naming it). Either add that folder to PATH, or run python -m beam instead of beam.

Use it

On the laptop that has the project:

beam send ~/thesis

It prints a short one-time code. Send it to the other laptop however you like (chat, email, read it out), then run there:

beam recv ab3f9c

The receiver finds the sender on the local network by itself, so no IP address is needed. Both machines must be on the same network.

As a library

import beam

beam.send_project("~/thesis", code="ab3f9c")          # laptop A
beam.receive_project(code="ab3f9c", out="~/work")     # laptop B

receive_project also takes host= to skip discovery. send_project accepts port=0 to bind a free port, and an on_ready callback that receives the bound host, port and code once it is listening. beam.find_sender(code) returns the (host, port, name) of a sender without transferring anything.

What it does

  • Skips .venv, __pycache__, .git, node_modules and similar by default. Copying a virtualenv between machines mostly produces broken paths; rebuild it from requirements.txt instead.
  • Hashes every file before sending and re-hashes after extraction, so corruption is reported instead of discovered weeks later.
  • Streams a gzipped tar straight through the socket, so no temporary archive is written on either side.
  • A .beamignore file in the project root adds per-project glob patterns, one per line (# starts a comment).

Options

beam send PATH

Flag Effect
--code CODE choose the code instead of a random one
--port PORT TCP port to listen on (default 8765)
--exclude GLOB extra pattern to skip, repeatable
--all ignore the default exclude list
--max-size MB skip files larger than this
--no-hash size-check only, faster on large datasets
--fast lower compression, starts sooner

beam recv CODE

Flag Effect
--host IP[:PORT] connect directly instead of searching the network
--wait SEC how long to search for the sender (default 15)
--out DIR where to write the folder (default: current directory)
--name NAME rename the folder on arrival
--force write into a non-empty destination
--no-verify skip the checksum pass after extraction

Troubleshooting

no sender with code ... found

  • Check both laptops are on the same Wi-Fi or wired network. Guest and office networks often isolate devices from each other or drop broadcasts.
  • On Windows, allow Python through the firewall when it asks on the sending laptop. If you dismissed the prompt, allow python.exe for private networks in Windows Defender Firewall → Allow an app.
  • Skip discovery and connect directly using the address the sender prints: beam recv ab3f9c --host 192.168.1.42:8765.

Discovery uses UDP port 8766 and the transfer uses TCP port 8765.

Limits

The connection is plain TCP with no encryption. The code stops casual grabs on a shared network; it is not security. Do not use it on networks you do not trust. For repeated syncing rather than a one-time move, rsync -av --exclude=.venv or a private Git remote is a better fit.

Development

pip install -e ".[dev]"
pytest
ruff check .
python -m build

License

MIT

Metadata

Release files for beam-lan 0.2.0

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

Source distribution (sdist)

Source distribution for beam-lan 0.2.0
File Size Uploaded
beam_lan-0.2.0.tar.gz 13.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for beam-lan 0.2.0
File Interpreter ABI Platform
beam_lan-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 28.9 kB

Release files / beam_lan-0.2.0.tar.gz

Download URL beam_lan-0.2.0.tar.gz
Size 13.5 kB
Tags Source
SHA-256 checksum
How to use checksums
349badd6b2ce1235a4d6396d401244384f1b1924be88af2609860a45c641d852
BLAKE2b-256 checksum
How to use checksums
223dd0cdea3eff2b296bc85ae4f41de0620c6680f156345d0babc09c33499bce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Release files / beam_lan-0.2.0-py3-none-any.whl

Download URL beam_lan-0.2.0-py3-none-any.whl
Size 15.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7bb23db6f9afae7bb352d189bd0defeacbafd18a4419846d834063df5e82dbc3
BLAKE2b-256 checksum
How to use checksums
ef1ec17febeec4af1e8de087214a29debe41585af19616f97482fdf0d8ad53a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Release history Release notifications | RSS feed

0.4.0

2 release files

0.3.0

2 release files

This release

0.2.0 This release

2 release files

0.1.0

2 release files

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