Path: blob/master/sherlock_project/__init__.py
761 views
""" Sherlock Module12This module contains the main logic to search for usernames at social3networks.45"""67from importlib.metadata import version as pkg_version, PackageNotFoundError8import pathlib9import tomli101112def get_version() -> str:13"""Fetch the version number of the installed package."""14try:15return pkg_version("sherlock_project")16except PackageNotFoundError:17pyproject_path: pathlib.Path = pathlib.Path(__file__).resolve().parent.parent / "pyproject.toml"18with pyproject_path.open("rb") as f:19pyproject_data = tomli.load(f)20return pyproject_data["tool"]["poetry"]["version"]2122# This variable is only used to check for ImportErrors induced by users running as script rather than as module or package23import_error_test_var = None2425__shortname__ = "Sherlock"26__longname__ = "Sherlock: Find Usernames Across Social Networks"27__version__ = get_version()2829forge_api_latest_release = "https://api.github.com/repos/sherlock-project/sherlock/releases/latest"303132