Skip to main content

Pyodide-compatible ctypes interface for libsodium (refactored pysodium)

Project description

pychloride

Pyodide-compatible ctypes interface for libsodium. This is a refactored pysodium wheel designed specifically for WebAssembly environments.

Installation

For Pyodide/PyScript

import micropip
await micropip.install("pychloride")

For standard Python (if you have libsodium installed)

pip install pychloride

Usage

import pychloride

# Generate a keypair
pk, sk = pychloride.crypto_box_keypair()

# Sign a message
sign_pk, sign_sk = pychloride.crypto_sign_keypair()
signature = pychloride.crypto_sign_detached(b"Hello World", sign_sk)

Differences from pysodium

  • Bundles a WebAssembly-compiled libsodium.so for use in Pyodide
  • Includes explicit argtypes definitions for ctypes WASM compatibility
  • Loads libsodium from the package directory instead of system paths

Versioning

The version follows the pattern X.Y.Z.P where:

  • X.Y.Z is the upstream pysodium version
  • P is the pychloride patch version

Credits

Based on pysodium by Stefan Marsiske.

License

BSD 2-Clause License (same as original pysodium). Third-party notices for the bundled libsodium binary are in THIRD_PARTY_LICENSES.md.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pychloride-0.7.18.1.tar.gz (119.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pychloride-0.7.18.1-py3-none-any.whl (101.6 kB view details)

Uploaded Python 3

File details

Details for the file pychloride-0.7.18.1.tar.gz.

File metadata

  • Download URL: pychloride-0.7.18.1.tar.gz
  • Upload date:
  • Size: 119.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for pychloride-0.7.18.1.tar.gz
Algorithm Hash digest
SHA256 520271b077ea93739322ecd29eea129b08d71f41ae73b49febc3514bcfa4e4fb
MD5 a457a211113bebcaea0adcac8a09802e
BLAKE2b-256 91a46db1cf274464fc821a54419cf74e16d600001d3066596417f3dfc692b882

See more details on using hashes here.

File details

Details for the file pychloride-0.7.18.1-py3-none-any.whl.

File metadata

  • Download URL: pychloride-0.7.18.1-py3-none-any.whl
  • Upload date:
  • Size: 101.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for pychloride-0.7.18.1-py3-none-any.whl
Algorithm Hash digest
SHA256 50f93e2413fb69a35b37ec1f807dda770041f2e6c17436f709af53ddb039d24f
MD5 b21d1f2c53de8d36ea143d483734e5bb
BLAKE2b-256 aac4499217f53f466ed2e90dc60121bce940f662ac8e610ee3942a478db75e5f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page