faker.providers.lorem

class faker.providers.lorem.Provider(generator)

Bases: faker.providers.BaseProvider

Will provide methods to retrieve lorem content

Attributes:
sentence_punctuation (str): End of sentence punctuation word_connector (str): Default connector between words
Methods:
word: Generate a random word words: Generate a list containing random words sentence: Generate a random sentence sentences: Generate a list containing sentences paragraph: Generate a single paragraph paragraphs: Generate many paragraphs text: Generate a text string.
paragraph(nb_sentences=3, variable_nb_sentences=True, ext_word_list=None)
Returns:A single paragraph. For example: ‘Sapiente sunt omnis. Ut pariatur ad autem ducimus et. Voluptas rem voluptas sint modi dolorem amet.’

Keyword arguments: :param nb_sentences: around how many sentences the paragraph should contain :param variable_nb_sentences: set to false if you want exactly nb

sentences returned, otherwise the result may include a number of sentences of nb +/-40% (with a minimum of 1)
Parameters:ext_word_list – a list of words you would like to have instead of ‘Lorem ipsum’.
Return type:str
Examples:
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.paragraph()
...
'American whole magazine truth stop whose. On traditional measure example sense peace. Would mouth relate own chair.'
'Together range line beyond. First policy daughter need kind miss.'
'Trouble behavior style report size personal partner. During foot that course nothing draw.'
'Language ball floor meet usually board necessary. Natural sport music white.'
'Onto knowledge other his offer face country. Almost wonder employee attorney. Theory type successful together. Raise study modern miss dog Democrat quickly.'
paragraphs(nb=3, ext_word_list=None)

Generate an array of paragraphs :example [paragraph1, paragraph2, paragraph3] :param nb: how many paragraphs to return :param ext_word_list: a list of words you would like to have instead of

‘Lorem ipsum’.
Return type:list
Examples:
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.paragraphs()
...
['American whole magazine truth stop whose. On traditional measure example sense peace. Would mouth relate own chair.', 'Together range line beyond. First policy daughter need kind miss.', 'Trouble behavior style report size personal partner. During foot that course nothing draw.']
['Language ball floor meet usually board necessary. Natural sport music white.', 'Onto knowledge other his offer face country. Almost wonder employee attorney. Theory type successful together. Raise study modern miss dog Democrat quickly.', 'Every manage political record word group food break. Picture suddenly drug rule bring determine some forward. Beyond chair recently and.']
['Own available buy country store build before. Already against which continue. Look road article quickly.', 'Per structure attorney author feeling job. Mean always beyond write. Employee toward like total now.', 'Small citizen class morning. Others kind company likely.']
['Themselves true power home price check real. Score from animal exactly drive well good. Pull opportunity throughout take car.', 'Security stock ball organization recognize civil. Pm her then nothing increase.', 'Industry product another knowledge else citizen month. Traditional page a although for study anyone. Could yourself plan base rise would.']
['First degree response able state more. Couple part cup few. Beyond take however ball.', 'Son break either president stage population boy. Everything affect American race.', 'Water voice travel among see red. Republican total policy head Mrs debate onto. Catch even front.']
sentence(nb_words=6, variable_nb_words=True, ext_word_list=None)

Generate a random sentence :example ‘Lorem ipsum dolor sit amet.’

Parameters:
  • nb_words – around how many words the sentence should contain
  • variable_nb_words – set to false if you want exactly nb words returned, otherwise the result may include a number of words of nb +/-40% (with a minimum of 1)
  • ext_word_list – a list of words you would like to have instead of ‘Lorem ipsum’.
Return type:

str

Examples:
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.sentence()
...
'Serious inside else memory if six.'
'Whose group through despite cause.'
'Sense peace economy travel.'
'Total financial role together range line beyond its.'
'Policy daughter need kind miss artist truth trouble.'
sentences(nb=3, ext_word_list=None)

Generate an array of sentences :example [‘Lorem ipsum dolor sit amet.’, ‘Consectetur adipisicing eli.’]

Keyword arguments: :param nb: how many sentences to return :param ext_word_list: a list of words you would like to have instead of

‘Lorem ipsum’.
Return type:list
Examples:
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.sentences()
...
['Serious inside else memory if six.', 'Whose group through despite cause.', 'Sense peace economy travel.']
['Total financial role together range line beyond its.', 'Policy daughter need kind miss artist truth trouble.', 'Rest human station property.']
['Partner stock four.', 'Region as true develop sound central.', 'Language ball floor meet usually board necessary.']
['Natural sport music white.', 'Natural explain before something first drug contain start.', 'Party prevent live.']
['Quickly candidate change although.', 'Together type music hospital.', 'Every speech support time operation wear often.']
text(max_nb_chars=200, ext_word_list=None)

Generate a text string. Depending on the ``max_nb_chars, returns a string made of words, sentences, or paragraphs. :example ‘Sapiente sunt omnis. Ut pariatur ad autem ducimus et. Voluptas rem voluptas sint modi dolorem amet.’

Keyword arguments: :param max_nb_chars: Maximum number of characters the text should contain (minimum 5) :param ext_word_list: a list of words you would like to have instead of ‘Lorem ipsum’.

:rtype str

Examples:
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.text()
...
'American whole magazine truth stop whose. On traditional measure example sense peace. Would mouth relate own chair.\nTogether range line beyond. First policy daughter need kind miss.'
'Language ball floor meet usually board necessary. Natural sport music white.'
'Every manage political record word group food break. Picture suddenly drug rule bring determine some forward. Beyond chair recently and.'
'Per structure attorney author feeling job. Mean always beyond write. Employee toward like total now.\nSmall citizen class morning. Others kind company likely.'
'Security stock ball organization recognize civil. Pm her then nothing increase.'
texts(nb_texts=3, max_nb_chars=200, ext_word_list=None)

Generate an array of texts :example [text1, text2, text3] :param nb_texts: How many texts to return :param max_nb_chars: Maximum number of characters the text should contain (minimum 5) :param ext_word_list: a list of words you would like to have instead of ‘Lorem ipsum’.

Return type:list
Examples:
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.texts()
...
['American whole magazine truth stop whose. On traditional measure example sense peace. Would mouth relate own chair.\nTogether range line beyond. First policy daughter need kind miss.', 'Language ball floor meet usually board necessary. Natural sport music white.', 'Every manage political record word group food break. Picture suddenly drug rule bring determine some forward. Beyond chair recently and.']
['Per structure attorney author feeling job. Mean always beyond write. Employee toward like total now.\nSmall citizen class morning. Others kind company likely.', 'Security stock ball organization recognize civil. Pm her then nothing increase.', 'First degree response able state more. Couple part cup few. Beyond take however ball.\nSon break either president stage population boy. Everything affect American race.']
['Full per among clearly. Face house nature fall long dream answer conference. Rock few structure federal board night loss.', 'Hour million large major.\nInstitution happy write end since. Court boy state table agree moment. Budget huge debate among way. Perhaps bit learn gun still.', 'Along chance either six success on. At be than always different American address. Former claim chance prevent why measure too.']
['Now four management energy stay significant his. Artist political camera expert stop area.\nIndividual man tell response purpose character would.', 'Place full buy radio perform small camera treatment. True their race special million. Although hot he couple ground.', 'Between similar safe air. Issue indicate market ten foot education good. Grow ahead girl act.\nAudience throw debate daughter purpose voice. Security fall ready usually.']
['Player contain year bill ok choose today. Source firm drug senior.\nInformation animal car after back available. Federal indicate unit opportunity fear great.', 'Painting child reflect up control instead company. Future model green place beat sense far.', 'Three report know second government the pull. Other along society figure future. Teacher three seven attention team executive care.']
word(ext_word_list=None)
Returns:A random word, eg: ‘lorem’
Parameters:ext_word_list – a list of words you would like to have instead of ‘Lorem ipsum’
Return type:str
Examples:
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.word()
...
'such'
'serious'
'inside'
'else'
'memory'
words(nb=3, ext_word_list=None, unique=False)
Returns:An array of random words. for example: [‘Lorem’, ‘ipsum’, ‘dolor’]

Keyword arguments: :param nb: how many words to return :param ext_word_list: a list of words you would like to have instead of

‘Lorem ipsum’
Parameters:unique – If True, the returned word list will contain unique words
Return type:list
Examples:
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.words()
...
['such', 'serious', 'inside']
['else', 'memory', 'if']
['six', 'field', 'live']
['on', 'traditional', 'measure']
['example', 'sense', 'peace']