How to use the mimesis.Personal function in mimesis

To help you get started, we’ve selected a few mimesis examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github vincentlaucsb / pgreaper / tests / data_mimesis / persons.py View on Github external
# Generate a CSV with information for 50,000 fake persons

import mimesis
import csv
import random

person = mimesis.Personal(locale='en')

with open('persons.csv', mode='w', newline='\n') as person_file:
    writer = csv.writer(person_file)
    
    # Header Row
    writer.writerow(['Full Name', 'Age', 'Occupation', 'Email', 'Telephone',
        'Nationality'])
    
    for i in range(0, 50000):
        rando = random.uniform(0, 1)
        if rando >= 0.5:
            gender = 'female'
        else:
            gender = 'male'
                
        row = [
github vincentlaucsb / pgreaper / tests / data_mimesis / persons_nested_100k_json.py View on Github external
import mimesis
import csv
import random
import json
import gzip

person = mimesis.Personal(locale='en')
rows = []

for i in range(0, 100000):
    rando = random.uniform(0, 1)
    if rando >= 0.5:
        gender = 'female'
    else:
        gender = 'male'
            
    rows.append({
        'full_name': person.full_name(gender=gender),
        'nationality': person.nationality(),
        'occupation': person.occupation(),
        'personal': {
            'age': person.age(),
            'gender': gender,
github vincentlaucsb / pgreaper / tests / data_mimesis / persons_json.py View on Github external
# Generate a CSV with information for 50,000 fake persons

import mimesis
import csv
import random
import json

person = mimesis.Personal(locale='en')
rows = []

for i in range(0, 50000):
    rando = random.uniform(0, 1)
    if rando >= 0.5:
        gender = 'female'
    else:
        gender = 'male'
            
    rows.append({
        'full_name': person.full_name(gender=gender),
        'age': person.age(),
        'occupation': person.occupation(),
        'gender': person.email(gender=gender),
        'telephone': person.telephone(),
        'nationality': person.nationality()
github pytest-dev / pytest-mimesis / pytest_mimesis / fixtures.py View on Github external
def personal(locale):
    """

    :param locale:
    :return:
    """
    return Personal(locale)
github timkpaine / lantern / lantern / data / refdata.py View on Github external
def _mname():
    person = mimesis.Personal(locale='en')
    return person.full_name()
github vincentlaucsb / csv-data / mimesis_data / persons.py View on Github external
# Generate a CSV with information for 50,000 fake persons

import mimesis
import csv
import random

person = mimesis.Personal(locale='en')

with open('persons.csv', mode='w', newline='\n', encoding='utf-8') as person_file:
    writer = csv.writer(person_file)
    
    # Header Row
    writer.writerow(['Full Name', 'Age', 'Occupation', 'Email', 'Telephone',
        'Nationality'])
    
    for i in range(0, 50000):
        rando = random.uniform(0, 1)
        if rando >= 0.5:
            gender = 'female'
        else:
            gender = 'male'
                
        row = [