serp-random
Drop-in replacement for CPython's random module (docs/libraries.md drop-in facade push).
from serp_random import seed, random, randint, uniform, randrange, getrandbits, choice, shuffle- The generator is MT19937 (Mersenne Twister), implemented bit-for-bit like CPython:
the same seeding (
init_by_arrayover the integer's 32-bit limbs),genrand_res53floats, and_randbelowrejection sampling. A seeded sequence is identical to CPython'srandommodule — and therefore byte-identical across native builds and CPython runs. seed()with no argument seeds from OS entropy;seed(n)is reproducible.- Architecture:
serp_randomis a pure-Serpentine facade over the compiler-knownserp_random_corertlib module (MT19937 lives in the native runtime; the CPython delegate drives the stdlib's global Mersenne Twister). - Divergences:
getrandbits(k)caps at 63 bits (native int64); randrange/randint widths must fit in int64; error messages pinned to CPython 3.11;sample,choices, the distribution functions, and theRandomclass are not provided. choice/shufflework with lists of Copy elements (int/float/str/bool/bytes).
Install into a Serpentine project with serp add serp-random.
Metadata
Release files for serp-random 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| serp_random-0.1.0.tar.gz | 3.7 kB | With provenance | Details for serp_random-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| serp_random-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for serp_random-0.1.0-py3-none-any.whl |
Total release size: 7.4 kB
Release files / serp_random-0.1.0.tar.gz
| Download URL | serp_random-0.1.0.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8393eb6760caf2e1583b75157741cf0ec69992dab87cc78c0a6e25d54e8b15b9
|
|
BLAKE2b-256 checksum How to use checksums |
ad13918b4233d8dc7d739770177b076df5d1007ad906040446d7f8f3ebc4a44b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.
Transparency logRelease files / serp_random-0.1.0-py3-none-any.whl
| Download URL | serp_random-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6c24e7bf0e0c773607b26e70a3fa30dd1c4509e596120f16622dc9df2f9a6ca6
|
|
BLAKE2b-256 checksum How to use checksums |
39fbea52b52d91cea3adb47296d26eb4ac6bc6a4381831fb80167557ac3855fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.
Transparency logSecurity for serp-random 0.1.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for serp_random-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.
Transparency logA 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.