def get_deps_command(config_file, projects_file):
    """Show required PyPI packages inferred from plugins in mkdocs.yml."""
    from mkdocs_get_deps import get_deps, get_projects_file

    from mkdocs.config.base import _open_config_file

    warning_counter = utils.CountHandler()
    warning_counter.setLevel(logging.WARNING)
    logging.getLogger('mkdocs').addHandler(warning_counter)

    with get_projects_file(projects_file) as p:
        with _open_config_file(config_file) as f:
            deps = get_deps(config_file=f, projects_file=p)

    for dep in deps:
        print(dep)  # noqa: T201

    if warning_counter.get_counts():
        sys.exit(1)
Show required PyPI packages inferred from plugins in mkdocs.yml.
mkdocs/__main__.py