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
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 Distribution
pickledsocks-0.1.7.tar.gz
(3.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0cbcb77204a7eddafa9d39ed894d689e857574e9cc15294503cc96269f281fad
|
|
| MD5 |
f3fb5868c46780a3c9b49494eba78476
|
|
| BLAKE2b-256 |
a825f61bdf93323b2cffc726677d14f91e052a166720cb01f2dfa7d4ca83de01
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2b413dddf7e073e8a1396cebe81a8a8db284325e41d02d742c68ffee1230267
|
|
| MD5 |
2a7a4758f0261bc5a3a271c293de99f1
|
|
| BLAKE2b-256 |
d0489fa7c4042eda99a0507aab757bccff363b611cb731ed1441c911ab27363d
|