Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Generate randoms strings of a given pattern

Project description

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).


$ pip install funny-codes


>>> from funny_codes import FunnyCodes
>>> my_codes = FunnyCodes('TATAN-76')
>>> # the following is a random code matching the pattern


>>> my_codes.variants_count()

>>> my_codes.collision_prob(1000)

>>> my_codes.expected_collisions(10000)

Project details

Download files

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

Files for funny-codes, version 1.0.1
Filename, size File type Python version Upload date Hashes
Filename, size funny-codes-1.0.1.tar.gz (2.7 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page