Skip to main content

Websockets lib

Project description

pickledsocks

Facilitate connections processes.

Python programs communicate amongst themselves with pickle or json. They must communicate with non-python programs with json, because of course non-python processes cannot use pickle.

Here's the code, an overview of the important functions:

python_make_server = partial(make_server, pickle)
python_send = partial(send, pickle)


json_make_server = partial(make_server, json)
json_send = partial(send, json)

Simple test program:

import sys
import pickledsocks

is_server = sys.argv[1].strip() == 'y'

def get(data):
    print(f"I got data: {data}")
    return "I got your dataif is_server:

if is_server:
    asyncio.run(module.json_make_server(get, 3952))
else:
    asyncio.run(module.json_send("Hi server from client!", 3952))

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pickledsocks-0.1.5.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

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

pickledsocks-0.1.5-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file pickledsocks-0.1.5.tar.gz.

File metadata

  • Download URL: pickledsocks-0.1.5.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.2

File hashes

Hashes for pickledsocks-0.1.5.tar.gz
Algorithm Hash digest
SHA256 b2c2a0ec19eade919dcbb4b8d377d4146b58585093ccc9548f740ecc1702d9cc
MD5 f08ca990e94ec888b85b7111f2a90fd7
BLAKE2b-256 64eacea3d4d67d241a0cc539bb1e092e52e6125e837f9212a112357a634ebe28

See more details on using hashes here.

File details

Details for the file pickledsocks-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: pickledsocks-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.2

File hashes

Hashes for pickledsocks-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 f5fc7c04b053f1f14f066bdda9467e16260f7245c3a51800e37f71f09d23bbb2
MD5 0812334c0643552e7a92d5900a28c5d9
BLAKE2b-256 d198ba150e0240ed9d43b7d80f862a074925eb187c18a98bb863fae65a91285f

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