wccs (Python)
Python binding for WCCS, the Weighted Credit-Cooldown Sampler.
This package is a thin ctypes layer over the versioned C ABI. It contains
no algorithm logic — all sampling happens in the C core. By default it
calls wccs_new_default, which injects the core's deterministic PCG64, so
the same seed produces the same sequence in every language (L2).
Install
pip install wccs # from PyPI: platform wheel, native library included
pip install ./bindings/python # or from a source checkout
Release wheels bundle the native library inside the wccs package, so nothing
else is required. For a source checkout without a bundled library, build it
with CMake (cmake -B build && cmake --build build) or point the loader at an
existing build:
export WCCS_LIBRARY_PATH=/path/to/libwccs.so # or .dll / .dylib
Usage
from wccs import Sampler
with Sampler([1, 2, 3, 4], L=3, beta_q=0, R=1000, seed=42) as s:
for _ in range(10):
print(s.sample())
print(s.step, s.total)
Pass rng= (a callable returning a 64-bit integer) to exercise the C ABI's
random-source injection via wccs_new. Doing so gives up the L2 guarantee
unless every language injects the identical engine.
Errors are raised as wccs.WccsError with a stable .code.
Tests
PYTHONPATH=. python -m unittest discover -s tests -v
PYTHONPATH=. python tests/vector.py # cross-language vector emitter
License: Apache-2.0
Metadata
Release files for wccs 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| wccs-1.0.1-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details for wccs-1.0.1-py3-none-win_amd64.whl |
| wccs-1.0.1-py3-none-manylinux_2_35_x86_64.whl | Python 3 | none | Linux glibc 2.35+ x86-64 | Details for wccs-1.0.1-py3-none-manylinux_2_35_x86_64.whl |
| wccs-1.0.1-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details for wccs-1.0.1-py3-none-macosx_11_0_arm64.whl |
Total release size: 29.3 kB
Release files / wccs-1.0.1-py3-none-win_amd64.whl
| Download URL | wccs-1.0.1-py3-none-win_amd64.whl |
|---|---|
| Size | 11.6 kB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
04de2c01b72f114bea3afd467f7124ac76b8acaa6fe57f71aa730d412b170fda
|
|
BLAKE2b-256 checksum How to use checksums |
a2350e554dd4a331168fd62fc4ff6fd94bcd4ab4cea73e8ce0c812b96010cfd7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / wccs-1.0.1-py3-none-manylinux_2_35_x86_64.whl
| Download URL | wccs-1.0.1-py3-none-manylinux_2_35_x86_64.whl |
|---|---|
| Size | 9.7 kB |
| Tags | Linux glibc 2.35+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
e39296dc9e37ae291f5f4a05ae556d5e9f60d6d018ad91ad6e138d082f269d37
|
|
BLAKE2b-256 checksum How to use checksums |
13010c9453dd20e2ea09b15d603c01add1f1b6c90fbd9e2423e5cc9fb937aa6b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / wccs-1.0.1-py3-none-macosx_11_0_arm64.whl
| Download URL | wccs-1.0.1-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 8.0 kB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
2cf0cc1fa98d6c4d4f6e38cf403703972bcc57b29aeb0955503f31143e834f76
|
|
BLAKE2b-256 checksum How to use checksums |
bf0a2268bdfdf2af3dc9929646c138f026b4f9ed452406379e7b724b74c14f24
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Security for wccs 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.