piptools.writer module#

class piptools.writer.OutputWriter(dst_file: BinaryIO, click_ctx: Context, dry_run: bool, emit_header: bool, emit_index_url: bool, emit_trusted_host: bool, annotate: bool, annotation_style: str, strip_extras: bool, generate_hashes: bool, default_index_url: str, index_urls: Iterable[str], trusted_hosts: Iterable[str], format_control: FormatControl, linesep: str, allow_unsafe: bool, find_links: list[str], emit_find_links: bool, emit_options: bool)#

Bases: object

_format_requirement(ireq: InstallRequirement, marker: Marker | None = None, hashes: dict[InstallRequirement, set[str]] | None = None) str#
_iter_lines(results: set[InstallRequirement], unsafe_requirements: set[InstallRequirement], unsafe_packages: set[str], markers: dict[str, Marker], hashes: dict[InstallRequirement, set[str]] | None = None) Iterator[str]#
_sort_key(ireq: InstallRequirement) tuple[bool, str]#
write(results: set[InstallRequirement], unsafe_requirements: set[InstallRequirement], unsafe_packages: set[str], markers: dict[str, Marker], hashes: dict[InstallRequirement, set[str]] | None) None#
write_flags() Iterator[str]#
write_format_controls() Iterator[str]#
write_header() Iterator[str]#
write_index_options() Iterator[str]#
write_trusted_hosts() Iterator[str]#
piptools.writer._comes_from_as_string(comes_from: str | InstallRequirement) str#
piptools.writer.annotation_style_line(required_by: set[str]) str#
piptools.writer.annotation_style_split(required_by: set[str]) str#