SILENT KILLERPanel

Current Path: > > opt > cloudlinux > venv > lib64 > python3.11 > > site-packages > requirements_detector


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: //opt/cloudlinux/venv/lib64/python3.11//site-packages/requirements_detector

NameTypeSizeLast ModifiedActions
__pycache__ Directory - -
poetry_semver Directory - -
__init__.py File 269 bytes April 17 2025 13:10:59.
__main__.py File 59 bytes April 17 2025 13:10:59.
detect.py File 5880 bytes April 17 2025 13:10:59.
exceptions.py File 103 bytes April 17 2025 13:10:59.
formatters.py File 340 bytes April 17 2025 13:10:59.
handle_setup.py File 3999 bytes April 17 2025 13:10:59.
requirement.py File 5548 bytes April 17 2025 13:10:59.
run.py File 861 bytes April 17 2025 13:10:59.

Reading File: //opt/cloudlinux/venv/lib64/python3.11//site-packages/requirements_detector/run.py

import os
import sys
from pathlib import Path
from typing import NoReturn

from . import find_requirements
from .exceptions import RequirementsNotFound
from .formatters import FORMATTERS


def _die(message) -> NoReturn:
    sys.stderr.write("%s\n" % message)
    sys.exit(1)


def run() -> NoReturn:
    if len(sys.argv) > 1:
        path = Path(sys.argv[1])
    else:
        path = Path.cwd()

    if not path.exists():
        _die("%s does not exist" % path)

    if not path.is_dir():
        _die("%s is not a directory" % path)

    try:
        requirements = find_requirements(path)
    except RequirementsNotFound:
        _die("Unable to find requirements at %s" % path)

    format_name = "requirements_file"  # TODO: other output formats such as JSON
    FORMATTERS[format_name](requirements)
    sys.exit(0)


if __name__ == "__main__":
    run()

SILENT KILLER Tool