embutils.utils.env module

Virtual environment utilities.

note

Reference implementation.

date

2021

author

Christian Wiche

contact

cwichel@gmail.com

license

The MIT License (MIT)

embutils.utils.env.env(*remove, **update) Iterator[None][source]

Temporarily updates the “os.environ” dictionary in-place.

The “os.environ” dictionary is updated in-place so that the modification is sure to work in all situations.

Parameters
  • remove – Environment variables to remove.

  • update – Dictionary of environment variables and values to add/update.

embutils.utils.env.venv(path: Any) Iterator[None][source]

Temporarily activates the given virtual environment.

Parameters

path (TPAny) – Path to virtualenv folder.