1from time import time
2
3from django.http import JsonResponse
4
5
6def api_params(request):
7 ts = time()
8 if request.method == "GET":
9 try:
10 params = request.GET.dict()
11 results = JsonResponse({"params": list(params)})
12
13 except Exception as e:
14 results = JsonResponse({"errors": list(e)})
15 print('Took: ', time() - ts, 's')
16 return results
17