Skip to main content

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


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

If you're not sure about the file name format, learn more about wheel file names.

localsockets-0.0.0-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file localsockets-0.0.0-py3-none-any.whl.

File metadata

  • Download URL: localsockets-0.0.0-py3-none-any.whl
  • Upload date:
  • Size: 3.3 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for localsockets-0.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ce0e96bf0005a76fdacb29f1072255f3ce81b5bef422be7f8e0ca7257255fab6
MD5 528af76b61e4876d62cbeb86cbae4938
BLAKE2b-256 b7a4bfe07d6906fcc35d4a11d1623b4c46abad93b4adf6fdf7ea499deea8422d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page