A python package to help transfer data between programs.
Project description
This python package is designed to transfer binary data between Python scripts easily. This package uses a filesystem server to store data even when your program is closed and is not limited to RAM storage, but instead, your Hard Drive storage.
Basic Usage:
Script 1:
import localsockets s = localsockets.socket() id = s.id # send s.id to the other script # wait until other script connects while not s.connected(): pass # Now something has connected to our server. s.send(b'hello') # send some data # servers can also receive data s.opend() # False s.connected() # False s.open() # reopen the server. Now you can reconnect.
Script 2
import localsockets id = # your received id s = localsockets.socket(id) s.connected() # True s.recv(1024) # receive up to 1024 bytes of data; returns b'hello' # connections can also send data s.close() # disconnect s.opened() # False s.connected() # False
Saving servers to a custom directory:
import localsockets localsockets.SERVER_DIR = "< Your new directory > "
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for localsockets-0.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce0e96bf0005a76fdacb29f1072255f3ce81b5bef422be7f8e0ca7257255fab6 |
|
MD5 | 528af76b61e4876d62cbeb86cbae4938 |
|
BLAKE2b-256 | b7a4bfe07d6906fcc35d4a11d1623b4c46abad93b4adf6fdf7ea499deea8422d |