The fasta python package enables you to deal with biological sequence files easily.
conda install xapple::fasta