-
Module trufflehog3.source
Supported search sources.
Functions
-
def dirlist(path: str, exclude: Iterable[str] = None) ‑> Iterable[File]
open_in_new -
Recursively iterate over directory and return existing files.
Examples
Basic usage examples
>>> len(dirlist("trufflehog3/static", exclude=["*.yml"])) 2
-
def diriter(path: str, exclude: Iterable[str] = None) ‑> Iterator[File]
open_in_new -
Recursively iterate over directory and yield existing files.
-
def gitlist(
open_in_new
    path: str,
    exclude: Iterable[str] = None,
    branch: str = None,
    depth: int = None,
    since: str = None,
) ‑> Iterable[File] -
Iterate over Git commit history and return diff blobs for each file.
Examples
Basic usage examples
>>> files = gitlist( ... ".", ... exclude=["*.toml"], ... branch="1.x", ... since="9e404e6c59d286645b2465aacaf61108ebc12a3a", ... ) >>> for d in files[:3]: ... print(d.path) README.md LICENSE README.md
-
def gititer(
open_in_new
    path: str,
    exclude: Iterable[str] = None,
    branch: str = None,
    depth: int = None,
    since: str = None,
) ‑> Iterator[File] -
Iterate over Git commit history and yield diff blobs for each file.