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:

class picklesocks:
    python_make_server = partial(make_server, pickle)
    python_send = partial(send, pickle)

class jsoncks:
    make_server = partial(make_server, json)
    send = partial(send, json)

Simple test program:

import sys

from pickledsocks import jsoncks

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(jsoncks.make_server(get, 3952))
else:
    asyncio.run(jsoncks.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.7.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.7-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pickledsocks-0.1.7.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.7.tar.gz
Algorithm Hash digest
SHA256 0cbcb77204a7eddafa9d39ed894d689e857574e9cc15294503cc96269f281fad
MD5 f3fb5868c46780a3c9b49494eba78476
BLAKE2b-256 a825f61bdf93323b2cffc726677d14f91e052a166720cb01f2dfa7d4ca83de01

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pickledsocks-0.1.7-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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 f2b413dddf7e073e8a1396cebe81a8a8db284325e41d02d742c68ffee1230267
MD5 2a7a4758f0261bc5a3a271c293de99f1
BLAKE2b-256 d0489fa7c4042eda99a0507aab757bccff363b611cb731ed1441c911ab27363d

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