[BangPypers] Query | Automating report through Python

Fagun Bhavsar fagun.bhavsar at gmail.com
Tue Jun 4 12:20:49 CEST 2013

Thanks a lot @Noufal and @Svaksha. As @Noufal mentioned, I was looking 
forward to the steps in order to break a problem in small chunks and 
then to work on it.


On Tuesday 04 June 2013 02:26 PM, स्वक्ष wrote:
> On Tue, Jun 4, 2013 at 2:19 PM, Noufal Ibrahim <noufal at nibrahim.net.in> wrote:
>> Fagun Bhavsar <fagun.bhavsar at gmail.com> writes:
>>> Hi,
>>> I have couple of reports that need to be sent during end of the
>>> day. There's single DB table, from which data is being picked and put
>>> into xcel-like tabular format and sent to specific email address.
>>> I want to understand - by using python, how to go about for automating
>>> this task? What are the key points to be considered here? This is just
>>> for learning purpose, hence I am looking forward to similar examples,
>>> if someone can guide me.
>> It seems quite straightforward. Connect to the db, run your query,
>> convert the response into a csv or tsv (there is a csv module in the
>> standard libary) file and then email (there's an smtp module in the
>> stdlib too) it. It'd look the same in most scripting languages.
> In addition to the above, run it off as a cron job (on *nix machines)
> at the end of your day.
> svaksha ॥ http://svaksha.com> _______________________________________________
> BangPypers mailing list
> BangPypers at python.org
> http://mail.python.org/mailman/listinfo/bangpypers

More information about the BangPypers mailing list