Locale la¶
faker.providers.lorem
¶
-
class
faker.providers.lorem.la.
Provider
(generator)¶ Bases:
faker.providers.lorem.Provider
-
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 ofnb
+/-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
-
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
-
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 ofnb
+/-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
-
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
-
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
-
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
-
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
-
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
-