So as I was often misunderstood when starting to post questions in this forum I have to ask You, what you mean with “scripts” in this context.
Sounds like you have to build a template, where the user can make his specifications, take this specifications as POST data and build a queryset over your database with it. In the end, you send back the results TO the user…is it that what You intend to do ?
If so, there would be numerous ways to achieve this goal…