piptools._internal._environment_variables module

class piptools._internal._environment_variables._Sentinel(*values)

Bases: Enum

_SENTINEL = <object object>
piptools._internal._environment_variables.setenv_context(env_var_name: str, env_var_value: str, /) → Iterator[None]

A context manager which sets an environment variable and resets on exit.

It is robust to interruptions and exceptions, so long as its finally block is allowed to run to completion.