gffutils
is a Python package for working with and manipulating the GFF and
GTF format files typically used for genomic annotations.
Files are loaded into a sqlite3 database, allowing much more complex manipulation of hierarchical features (e.g., genes, transcripts, and exons) than is possible with plain-text methods alone.
See documentation at https://daler.github.io/gffutils, and GitHub repo at https:/github.com/daler/gffutils.