get things from one computer to another, safely
Go to file
Brian Warner 49354df56e cmd_send: use SpooledTemporaryFile properly, move to disk after 10MB
When we send a directory, we build a temporary zipfile to linearize the
contents for transmission. We store this zipfile inside a
SpooledTemporaryFile, which will hold everything in RAM (for speed) until it
reaches some size threshold, then moves everything over to disk (to avoid
crashing your program as it runs out of memory).

Unfortunately SpooledTemporaryFile doesn't have a default threshold size: if
you don't specify one, it will never switch to the disk-based mode, and
`wormhole send large_directory/` will just use up all your RAM until it
crashes.

I've been using this wrong for five years, since the very beginning of
wormhole's ability to send directories. How embarrassing!

This applies the simple fix: provide a `max_size=` argument, setting the
threshold to 10 MB.

Thanks to @blitz for the report (and my apologies to everyone else who
reported this earlier, to whom I said it was fixed by using
SpooledTemporaryFile, when clearly it was not).

closes #379
2020-04-04 12:06:00 -07:00
docs docs/tor.md: remove stale comment about py3 not working 2020-01-15 11:19:48 -08:00
misc remove server-related source files, munin plugins 2018-02-20 23:46:29 -08:00
pyi use pyinstaller to build wormhole fat/standalone binary 2018-06-02 18:05:45 +02:00
src/wormhole cmd_send: use SpooledTemporaryFile properly, move to disk after 10MB 2020-04-04 12:06:00 -07:00
.appveyor.yml appveyor: set TOXENV separately for each python version 2019-05-05 19:22:06 -04:00
.coveragerc add 'coverage' environment for tox 2016-05-24 16:03:39 -07:00
.gitattributes initial setup.py, versioneer-ification 2015-02-10 00:48:19 -08:00
.gitignore use pyinstaller to build wormhole fat/standalone binary 2018-06-02 18:05:45 +02:00
.travis.yml Remove deprecated keyword "sudo" from travis config. 2019-11-08 10:42:10 -08:00
LICENSE Initial commit 2015-02-10 00:38:44 -08:00
MANIFEST.in MANIFEST.in: add some missing files 2018-10-16 16:29:24 -07:00
NEWS.md NEWS: update for 0.11.2 release 2018-11-13 15:08:53 -08:00
README.md README: add repology.org packaged-versions table 2019-11-08 10:34:33 -08:00
setup.cfg setup.cfg: bump flake8 max-line-length to 85 2018-12-23 15:22:57 -05:00
setup.py setup.py: hush deprecation warning 2019-02-10 11:18:48 -08:00
snapcraft.yaml Merge PR237 2017-07-31 12:29:21 -07:00
tox.ini tox.ini: remove py3.4 from envlist 2019-08-09 10:41:31 -07:00
versioneer.py Correct spelling mistakes 2018-11-23 07:38:21 +00:00

Magic Wormhole

PyPI Build Status Windows Build Status codecov.io Docs

Get things from one computer to another, safely.

This package provides a library and a command-line tool named wormhole, which makes it possible to get arbitrary-sized files and directories (or short pieces of text) from one computer to another. The two endpoints are identified by using identical "wormhole codes": in general, the sending machine generates and displays the code, which must then be typed into the receiving machine.

The codes are short and human-pronounceable, using a phonetically-distinct wordlist. The receiving side offers tab-completion on the codewords, so usually only a few characters must be typed. Wormhole codes are single-use and do not need to be memorized.

For complete documentation, please see https://magic-wormhole.readthedocs.io or the docs/ subdirectory.

License, Compatibility

This library is released under the MIT license, see LICENSE for details.

This library is compatible with python2.7, 3.5, 3.6, and 3.7.

Packaging, Installation

Magic Wormhole packages are included in many operating systems.

Packaging status

To install it without an OS package, follow the Installation docs.