|
import json |
|
import os |
|
|
|
|
|
folder_path = "./data/key" |
|
|
|
|
|
if not os.path.exists(folder_path): |
|
os.makedirs(folder_path) |
|
|
|
for i in range(500, 600): |
|
data = { |
|
"name": "", |
|
"firstSurname": "", |
|
"secondSurname": "", |
|
"fullAddress" : "", |
|
"address": { |
|
"street" : "", |
|
"colony": "", |
|
"city": "", |
|
"state": "", |
|
"zipCode": "" |
|
}, |
|
"folio": "", |
|
"claveElector": "", |
|
"curp": "", |
|
"state": "", |
|
"municipality": "", |
|
"section": "", |
|
"locality": "", |
|
"emission": "", |
|
"vigencia": "", |
|
"dateOfBirth": "", |
|
"age": "", |
|
"gender": "", |
|
"registry_year": "", |
|
"type": "INSTITUTO NACIONAL ELECTORAL", |
|
"modelType": "DEF" |
|
} |
|
|
|
file_name = f"{i}.json" |
|
file_path = os.path.join(folder_path, file_name) |
|
|
|
with open(file_path, 'w') as f: |
|
json.dump(data, f, indent=4) |
|
|
|
print(f"Archivo {file_name} creado en {folder_path}.") |
|
|
|
print("Creación de archivos JSON completada.") |