PyRandomString is a python library to generate N random list of M length each
Project description
PyRandomString
Introduction
PyRandomString is a python library to generate a list of string. It is parameterized to generate strings of random number and length which is returned as a list. It can be used to generate a large number of numbers, strings etc.
Parameters
- string_count : Integer - Total number of strings to be generated (default is 10)
- max_length : Integer - Maximum length of each generated string (default is 10)
- random_length : Boolean choice - if the length of each word should be random or not. Incase of random length the maximum value is 'max_length'
- string_type : PyRandomString.StringType - Type of characters to be used for generating random strings
- ALPHABET_LOWERCASE : abcdefghijklmnopqrstuvwxyz
- ALPHABET_UPPERCASE : ABCDEFGHIJKLMNOPQRSTUVWXYZ
- ALPHABET_ALL_CASE : abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
- NUMERIC : 0123456789
- ALPHA_NUMERIC_LOWERCASE : abcdefghijklmnopqrstuvwxyz0123456789
- ALPHA_NUMERIC_UPPERCASE : ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
- ALPHA_NUMERIC_ALL_CASE : abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
How to use
import PyRandomString
random_string = PyRandomString.RandomString()
string_collection = random_string.get_strings(string_type=PyRandomString.StringType.ALPHA_NUMERIC_ALL_CASE, random_length=False, max_length=10, string_count=1000)
for current_string in string_collection:
print(current_string)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyrandomstring-0.0.1.tar.gz
(2.3 kB
view hashes)
Built Distribution
Close
Hashes for pyrandomstring-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c976543fd910924539431225e344fe96643519bcd8b4e76971be08c4865aac6b |
|
MD5 | fbdc52e6673deafceb93365450f8a255 |
|
BLAKE2b-256 | a61bb26897d26e7662f983e97b20c62932d4fb04d424345b2a42f4283ea032d4 |