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.8.tar.gz
(3.2 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.8.tar.gz.
File metadata
- Download URL: pickledsocks-0.1.8.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1100788064a26ae5a83a04fadc494fa04bfdb3e598f36a9a33d455f1638e585
|
|
| MD5 |
22f7f1cb3f839e370a7d3c7900353dfa
|
|
| BLAKE2b-256 |
9bd5144304d2c5c4a6e5d78c25e495ca3f3935f2c097583b95d715dea15fc993
|
File details
Details for the file pickledsocks-0.1.8-py3-none-any.whl.
File metadata
- Download URL: pickledsocks-0.1.8-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 |
7b9a28f9ce9aed38ca1fac6bdcf77744924d5e737249f2650a1ead333004cf0b
|
|
| MD5 |
0bee62fe7d3d22c78309079615d10cd9
|
|
| BLAKE2b-256 |
1467619f9dfac329d9b25a4fb4f5823f250e631d8a38b0b8153ced9559ba4925
|