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

diffusion-core

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

diffusion-core

Python SDK for Diffusion - CBOR serialisation.

  • 0.0.71
  • PyPI
  • Socket score

Maintainers
1

Python SDK for Diffusion - Core functionality

Pre-release version; not ready for production.

This is the core module for the Python SDK for Diffusion. It provides core functionality for the Python client, in particular the native bindings for various performance-critical functions.

Supported Python Versions

The Diffusion Python SDK officially supports the following:

Supported Interpreters:

  • CPython 3.7.9 or later
  • CPython 3.8.6 or later
  • CPython 3.9.0 or later

Supported Platforms:

  • MacOS 10.13-11.5
  • Windows Intel 64-bit
  • Any Linux supported by the ManyLinux 2010/2014 binary wheel standard.

Current Capabilities

  • CBOR (the binary protocol used to communicate with the Diffusion Server):
    • indefinite encoding (the preferred variant)
    • definite encoding
  • Delta encoding/decoding (used to send and receive changes in a compact, CBOR-based format)

Test call

python
import diffusion_core.cbor as diffusion_cbor
obj = {"arbitary":["json", "data", 0.0, -35]}
diffusion_cbor.dumps(obj, indefinite=True)

import diffusion_core.delta as diffusion_delta
orig = b'\0x00'
dest = b'\0xff'
# diff returns an object which is convertible to bytes
diff = bytes(diffusion_delta.diff(orig, dest))
# patch also returns an object which is convertible to bytes
reconstructed_dest = bytes(diffusion_delta.patch(orig, diff))
assert(dest == reconstructed_dest)

Keywords

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