dnf-2

Python 2 interface to DNF

CentOS
RUN yum install -y python2-dnf
Fedora
RUN dnf install -y python2-dnf
click the source code to copy install dnf-2 on any operating system with command-not-found.com