Standard error is typically meant for outputting debug messages of higher severity. If that’s what you’re actually using stderr for you may want to consider using the logging module instead for better control over filters and formats:
import sys
import logging
logging.basicConfig(stream=sys.stderr, level=logging.WARNING)
logging.warning('bad things might happen')
While stderr xan be used simply for printing error messages, and proper logging is really good for larger projects, stderr is required to show any type of information for scripts where the stdout is meant to be used in a pipe or sent to some file via the command line. I think the name stderr is pretty bad in describing it’s purpose but it’s the standard name