Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pickledsocks

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pickledsocks

Websockets lib

  • 0.1.8
  • PyPI
  • Socket score

Maintainers
1

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))

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc