This is a small module for generating randoms strings of a given pattern. It is also capable of estimating various metrics for this pattern (probability of collision, estimated collision count and total variants count).
Installation
$ pip install funny-codes
Usage
>>> from funny_codes import FunnyCodes
>>> my_codes = FunnyCodes('TATAN-76')
>>> my_codes.next() # the following is a random code matching the pattern
HIPAS-12
>>> my_codes.next()
MOVER-87
>>> my_codes.variants_count()
20000844
>>> my_codes.collision_prob(1000)
0.024664677603280283
>>> my_codes.expected_collisions(10000)
2.499235797673464
Metadata
Release files for funny-codes 1.0.1
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 |
|---|---|---|---|---|
| funny-codes-1.0.1.tar.gz | 2.7 kB | Without provenance | Details for funny-codes-1.0.1.tar.gz |
Release files / funny-codes-1.0.1.tar.gz
| Download URL | funny-codes-1.0.1.tar.gz |
|---|---|
| Size | 2.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ca38d0dba35b7e67504a5fe9bcd614fd8d9e529ebc72b97c1d1d47fd3e439502
|
|
BLAKE2b-256 checksum How to use checksums |
1bccf9b055e9d701573e0918a4e1ce60d9e243b540532f83e997cfe022ce0e12
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for funny-codes 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.