doh-cli reached v.03, notable changes are:
• Switched default output to plain (json still there)
• Debug, Verbose & Query Time values are now part of plain/json output in a common way
• Checking the Response Status in case of a HTTP Server Error
https://pypi.org/project/doh-cli/
a mastodon instance run by LibreOps