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.sofor use in Pyodide - Includes explicit
argtypesdefinitions 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.Zis the upstream pysodium versionPis 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
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
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 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
520271b077ea93739322ecd29eea129b08d71f41ae73b49febc3514bcfa4e4fb
|
|
| MD5 |
a457a211113bebcaea0adcac8a09802e
|
|
| BLAKE2b-256 |
91a46db1cf274464fc821a54419cf74e16d600001d3066596417f3dfc692b882
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50f93e2413fb69a35b37ec1f807dda770041f2e6c17436f709af53ddb039d24f
|
|
| MD5 |
b21d1f2c53de8d36ea143d483734e5bb
|
|
| BLAKE2b-256 |
aac4499217f53f466ed2e90dc60121bce940f662ac8e610ee3942a478db75e5f
|