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
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.6.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.6.tar.gz.
File metadata
- Download URL: pickledsocks-0.1.6.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 |
2a78ee2c76b88088c387da27e0d4b349b25f547708422f4576382434cb06a32a
|
|
| MD5 |
d045f46148803b3a9782485e86fae604
|
|
| BLAKE2b-256 |
405df15aaff9030563488cf47a78586d56f9900264b61a7bbe9d4a705587e8eb
|
File details
Details for the file pickledsocks-0.1.6-py3-none-any.whl.
File metadata
- Download URL: pickledsocks-0.1.6-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 |
590da188aaf8fb17b542de1fb02ac1fc1042dd322ba3be08dea0122219923e80
|
|
| MD5 |
b010f0efd7fc516e8e3569a272ad1984
|
|
| BLAKE2b-256 |
57c5fbdb8927e160ad995032e5dcaa702a6ed7ae05f337600a7228de7a99ff17
|