1212'''
1313import os
1414import random
15- from random_profile .utils import ipv4_gen , load_txt_file
15+
16+ from random_profile .utils import ipv4_gen
17+ from random_profile .utils import load_txt_file
18+ from random_profile .utils import genrate_dob_age
19+ from random_profile .utils import genrate_random_height_weight
1620
1721ROOT_DIR = os .path .dirname (os .path .dirname (os .path .abspath (__file__ )))
1822
1923fname_txt = os .path .join (ROOT_DIR , "random_profile/assets/fnames.txt" )
2024lname_txt = os .path .join (ROOT_DIR , "random_profile/assets/lnames.txt" )
25+ hair_colors_txt = os .path .join (ROOT_DIR , "random_profile/assets/hair_colors.txt" )
26+ blood_types_txt = os .path .join (ROOT_DIR , "random_profile/assets/blood_types.txt" )
2127street_names_txt = os .path .join (ROOT_DIR , "random_profile/assets/street_names.txt" )
2228cities_name_txt = os .path .join (ROOT_DIR , "random_profile/assets/cities_name.txt" )
2329states_names_txt = os .path .join (ROOT_DIR , "random_profile/assets/states_names.txt" )
2733# loading data from txt files
2834fname = load_txt_file (fname_txt )
2935lname = load_txt_file (lname_txt )
36+ hair_colors = load_txt_file (hair_colors_txt )
37+ blood_types = load_txt_file (blood_types_txt )
3038states_names = load_txt_file (states_names_txt )
3139cities_name = load_txt_file (cities_name_txt )
3240street_names = load_txt_file (street_names_txt )
@@ -63,11 +71,15 @@ def full_profile(self):
6371 for _ in range (self .num ):
6472 first = random .choice (fname )
6573 last = random .choice (lname )
74+ hair_color = random .choice (hair_colors )
75+ blood_type = random .choice (blood_types )
6676 full_name = first + ' ' + last
6777 phone = f'+ +1-{ random .randint (300 , 500 )} -{ random .randint (800 , 999 )} -{ random .randint (1000 ,9999 )} '
6878 job_title = random .choice (job_titles )
6979 ip_address = ipv4_gen ()
7080 email_domain = random .choice (email_domains )
81+ dob , age = genrate_dob_age ()
82+ height , weight = genrate_random_height_weight ()
7183
7284 street_num = random .randint (100 , 999 )
7385 street = random .choice (street_names )
@@ -81,7 +93,13 @@ def full_profile(self):
8193 profile_dict = {}
8294 profile_dict ['first_name' ] = first
8395 profile_dict ['last_name' ] = last
96+ profile_dict ['hair_color' ] = hair_color
97+ profile_dict ['blood_type' ] = blood_type
8498 profile_dict ['full_name' ] = full_name
99+ profile_dict ['DOB' ] = dob
100+ profile_dict ['age' ] = age
101+ profile_dict ['height' ] = height
102+ profile_dict ['weight' ] = weight
85103 profile_dict ['phone' ] = phone
86104 profile_dict ['address' ] = address
87105 profile_dict ['email' ] = email
0 commit comments