예제 #1
0
def create_human(n):  # function of creating new client
    if n == 1:
        person = Person('ru')
    else:
        person = Person('en')

    # Выводим исландские мужские имена.
    client_info = generate_id_passport()

    print('\nфамилия:\t', person.last_name())
    print('имя:\t\t', person.name())
    print('отчество:\t', person.surname(), '\n')

    passport = generate_number_passport()
    print('личный №:\t', client_info.get('idn'))
    print('документ:\t', passport)

    print('пол:\t\t', client_info.get('sex'))
    print('возраст:\t', person.age(13, 70), '\n')
    # print('аватар\t', person.avatar())
    print('гражд-во:\t', person.get_current_locale())
    print('Нац-сть:\t', person.nationality())
    print('телефон:\t', person.telephone('+37529#######'))
    print('email:\t\t', '*****@*****.**')
    # print('email:\t\t', person.email())
    print('проф-ия:\t', person.occupation(), '\n')
    print('обращение:\t', person.title())
    print('взгляды:\t', person.views_on())
    print('вера:\t\t', person.worldview(), '\n')
예제 #2
0
def create_human(n):
    """

    :param n: язык генерации данных
    :return: сгенерированные фейковые данные
    """
    log.info("Генерируем тестовые данные")
    if n == 1:
        person = Person('ru')
    else:
        person = Person('en')
    log.info("person: " + str(person))

    client_info = generate_id_passport()

    print('\nфамилия:\t', person.last_name())
    print('имя:\t\t', person.name())
    print('отчество:\t', person.surname(), '\n')

    passport = generate_number_passport()
    print('личный №:\t', client_info.get('idn'))
    print('документ:\t', passport)

    print('пол:\t\t', client_info.get('sex'))
    print('возраст:\t', person.age(13, 70), '\n')
    # print('аватар\t', person.avatar())
    print('гражд-во:\t', person.get_current_locale())
    print('Нац-сть:\t',person.nationality())
    print('телефон:\t', person.telephone('+37529#######'))
    print('email:\t\t', person.email())
    print('проф-ия:\t', person.occupation(), '\n')
    print('обращение:\t', person.title())
    print('взгляды:\t', person.views_on())
    print('вера:\t\t', person.worldview(), '\n')
예제 #3
0
#!/usr/bin/env python3
# -*- conding:utf8 -*-

from mimesis import Person, Address, Business, Payment, Text, Food
from mimesis.enums import Gender

print('#' * 5 + '个人信息' + '#' * 5)
person = Person('zh')
# 可以传递性别给full_name()
print(person.full_name(Gender.MALE))
print(person.level_of_english())
print(person.nationality())
print(person.work_experience())
print(person.political_views())
print(person.worldview())

# 自定义名字pattern
templates = ['l-d', 'U-d']
for item in templates:
    print(person.username(template=item))

print('\n')

print('#' * 5 + '地址' + '#' * 5)
address = Address('zh')
print(address.coordinates())
print(address.city())
print('\n')

print('#' * 5 + '地址' + '#' * 5)
business = Business('zh')