Пример #1
0
def create_card():
    return {
        "name":
        name.find_name(),
        "username":
        internet.user_name(),
        "email":
        internet.email(),
        "address": {
            "streetA": address.street_name(),
            "streetB": address.street_address(),
            "streetC": address.street_address(True),
            "streetD": address.secondary_address(),
            "city": address.city(),
            "ukCounty": address.uk_county(),
            "ukCountry": address.uk_country(),
            "zipcode": address.zip_code()
        },
        "phone":
        phone_number.phone_number(),
        "website":
        internet.domain_name(),
        "company": {
            "name": company.company_name(),
            "catchPhrase": company.catch_phrase(),
            "bs": company.bs()
        },
        "posts": [{
            "words": lorem.words(),
            "sentence": lorem.sentence(),
            "sentences": lorem.sentences(),
            "paragraph": lorem.paragraph()
        }, {
            "words": lorem.words(),
            "sentence": lorem.sentence(),
            "sentences": lorem.sentences(),
            "paragraph": lorem.paragraph()
        }, {
            "words": lorem.words(),
            "sentence": lorem.sentence(),
            "sentences": lorem.sentences(),
            "paragraph": lorem.paragraph()
        }]
    }
Пример #2
0
def user_card():
    return {
        "name": name.find_name(),
        "username": internet.user_name(),
        "email": internet.email(),
        "address": {
            "street": address.street_name(),
            "suite": address.secondary_address(),
            "city": address.city(),
            "zipcode": address.zip_code()
        },
        "phone": phone_number.phone_number(),
        "website": internet.domain_name(),
        "company": {
            "name": company.company_name(),
            "catchPhrase": company.catch_phrase(),
            "bs": company.bs()
        }
    }
Пример #3
0
def user_card():
    return {
        "name": name.find_name(),
        "username": internet.user_name(),
        "email": internet.email(),
        "address": {
            "street": address.street_name(),
            "suite": address.secondary_address(),
            "city": address.city(),
            "zipcode": address.zip_code()
        },
        "phone": phone_number.phone_number(),
        "website": internet.domain_name(),
        "company": {
            "name": company.company_name(),
            "catchPhrase": company.catch_phrase(),
            "bs": company.bs()
        }
    }
Пример #4
0
def create_card():
    return {
        "name": name.find_name(),
        "username": internet.user_name(),
        "email": internet.email(),
        "address": {
            "streetA": address.street_name(),
            "streetB": address.street_address(),
            "streetC": address.street_address(True),
            "streetD": address.secondary_address(),
            "city": address.city(),
            "ukCounty": address.uk_county(),
            "ukCountry": address.uk_country(),
            "zipcode": address.zip_code()
        },
        "phone": phone_number.phone_number(),
        "website": internet.domain_name(),
        "company": {
            "name": company.company_name(),
            "catchPhrase": company.catch_phrase(),
            "bs": company.bs()
        },
        "posts": [
            {
                "words": lorem.words(),
                "sentence": lorem.sentence(),
                "sentences": lorem.sentences(),
                "paragraph": lorem.paragraph()
            },
            {
                "words": lorem.words(),
                "sentence": lorem.sentence(),
                "sentences": lorem.sentences(),
                "paragraph": lorem.paragraph()
            },
            {
                "words": lorem.words(),
                "sentence": lorem.sentence(),
                "sentences": lorem.sentences(),
                "paragraph": lorem.paragraph()
            }
        ]
    }
Пример #5
0
        if random.randint(1, 100) < 10:  # random chance of having a legal name
            attendee['firstNameOnId'] = name.first_name()
            attendee['lastNameOnId'] = name.last_name()
            attendee['nameOnIdIsPreferredName'] = False
        else:
            attendee['firstNameOnId'] = attendee['firstName']
            attendee['lastNameOnId'] = attendee['lastName']
            attendee['nameOnIdIsPreferredName'] = True

        if random.randint(1, 100) < 60:  # Random chance of having a badge name
            attendee['fanName'] = get_badge_name()
        else:
            attendee['fanName'] = ""

        attendee['postal'] = address.zip_code()
        attendee['country'] = "United States of America"

        attendee['phone'] = phone_number.phone_number()
        attendee['email'] = internet.email()
        attendee['birthdate'] = "{0:4d}-{1:02d}-{2:02d}".format(
            birth_date.year, birth_date.month, birth_date.day)

        attendee['emergencyName'] = name.find_name()
        attendee['emergencyPhone'] = phone_number.phone_number()

        if age <= 17:
            attendee['parentName'] = attendee['emergencyName']
            attendee['parentPhone'] = attendee['emergencyPhone']
            attendee['emergencyContactSameAsParent'] = True
        else: