PyRandomString is a python library to generate N random list of string of M length. Ofcourse you can configure N and M
Project description
PyRandomString
Version : 0.0.2
Author : Lakhya Jyoti Nath (ljnath)
Date : June 2019
Email : ljnath@ljnath.com
Website : https://www.ljnath.com
Introduction
PyRandomString is a python library to generate N random list of string of M length 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.
Version
PyRandomString is a python library to generate N random list of string of M length 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=50)
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
Built Distribution
Hashes for pyrandomstring-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f962e456b6e529f9d78cdbe5697331d62e1764d47ab7a74a74fc03878a271220 |
|
MD5 | 261585a9310fb72a3d838c46eb6dc557 |
|
BLAKE2b-256 | 12e12fe2dbc69774deee3aa37a5be3da77ba40412c5b495e42f2cf84229d0ae2 |