random_words Package

random_words Package

lorem_ipsum Module

class random_words.lorem_ipsum.LoremIpsum[source]

Bases: object

MAX_WORDS = 15
MIN_WORDS = 2
get_sentence()[source]

Return a sentence.

Returns:string with sentence
Return type:str
get_sentences(sentences=1)[source]

Return sentences in string.

Parameters:sentences (int) – how many sentences.
Returns:string with sentences
Return type:str
get_sentences_list(sentences=1)[source]

Return sentences in list.

Parameters:sentences (int) – how many sentences
Returns:list of strings with sentence
Return type:list
make_sentence(list_words)[source]

Return a sentence from list of words.

Parameters:list_words (list) – list of words
Returns:sentence
Return type:str

random_words Module

class random_words.random_words.Random(file)[source]

Bases: dict

check_count(count)[source]

Checks count

Parameters:count (int) – count number ;)
Raises :ValueError
load_dmails(file)[source]

Load list from file for random mails

Parameters:file (str) – filename
load_file(file)[source]
Parameters:file (str) – filename
load_nicknames(file)[source]

Load dict from file for random nicknames.

Parameters:file (str) – filename
load_nouns(file)[source]

Load dict from file for random words.

Parameters:file (str) – filename
class random_words.random_words.RandomEmails[source]

Bases: random_words.random_words.Random

randomMail()[source]

Return random e-mail.

Return type:str
Returns:random e-mail
randomMails(count=1)[source]

Return random e-mails.

Return type:list
Returns:list of random e-mails
class random_words.random_words.RandomNicknames[source]

Bases: random_words.random_words.Random

random_nick(letter=None, gender=None)[source]

Return random nick.

Parameters:
  • letter (str) – letter
  • gender (str) – 'f' for female, 'm' for male and None for both
Return type:

str

Returns:

random nick

random_nicks(letter=None, gender=None, count=1)[source]

Return list of random nicks.

Parameters:
  • letter (str) – letter
  • gender (str) – 'f' for female, 'm' for male and None for both
  • count (int) – how much nicks
Return type:

list

Returns:

list of random nicks

Raises :

ValueError

class random_words.random_words.RandomWords[source]

Bases: random_words.random_words.Random

random_word(letter=None)[source]

Return random word.

Parameters:letter (str) – letter
Return type:str
Returns:random word
random_words(letter=None, count=1)[source]

Returns list of random words.

Parameters:
  • letter (str) – letter
  • count (int) – how much words
Return type:

list

Returns:

list of random words

Raises :

ValueError

Table Of Contents

Previous topic

How to use

This Page