I have two files:

1. An annotation file in gff format
2. A fasta formatted sequnce file for a whole genome.

I want to have a resulting file : myGenomeCDS.fasta

How can I go about doing this via python or Tools ?

Thanks
If your gtf file has the annotation of CDS's you can extract CDS sequences using `gffread` in this way:

    gffread -g genome.fa -x CDS.fa annotation.gtf