pip install seqrecord_expanded==0.2.10

Another SeqRecord class with methods: degenerate seqs, codon positions based on reading frames, etc.

Source