Skip to content

Commit b45bf36

Browse files
Mise à jour de l'indentation lors de l'exportation des données JSON
1 parent e96da34 commit b45bf36

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/export_ind.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ async def export_ind(url, col, headers):
3636
},
3737
fichier,
3838
ensure_ascii=False,
39+
indent=4,
3940
)
4041
logger.info(f"{col.get('method')}")
4142
except requests.exceptions.HTTPError as e:

src/import_ind.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ async def process_data(data, config, file, session):
6060
print(f"Processing {file}")
6161
result = await get_data(data, config)
6262
with open(f'./data/{file}', 'w', encoding='utf-8') as fichier:
63-
json.dump(result, fichier, ensure_ascii=False)
63+
json.dump(result, fichier, ensure_ascii=False, indent=4)
6464
tasks = [send_request(session, f'{sesame_api_baseurl}/management/identities/upsert', entry) for entry in result]
6565
await gather_with_concurrency(sesame_import_parallels_files, tasks)
6666
print(f"Processed {file}")

0 commit comments

Comments
 (0)