Skip to main content

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 > "

Metadata

Release files for localsockets 0.0.0

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

Built distribution (wheel)

Table of built distributions (wheels) for localsockets 0.0.0
File Interpreter ABI Platform
localsockets-0.0.0-py3-none-any.whl Python 3 none any Details

Release files / localsockets-0.0.0-py3-none-any.whl

Download URL localsockets-0.0.0-py3-none-any.whl
Size 3.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ce0e96bf0005a76fdacb29f1072255f3ce81b5bef422be7f8e0ca7257255fab6
BLAKE2b-256 checksum
How to use checksums
b7a4bfe07d6906fcc35d4a11d1623b4c46abad93b4adf6fdf7ea499deea8422d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.9.0

Release history Release notifications | RSS feed

This release

0.0.0 This release

1 release file

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