scistag.common.env.Env¶
- class Env[source]¶
Bases:
objectEnvironment helper class
Methods
Searches for double curly brackets inside string followed by env.
Loads an environment file located at str and applies it
Attributes
__dict____doc____module____weakref__list of weak references to the object (if defined)
- static insert_environment_data(text)[source]¶
Searches for double curly brackets inside string followed by env. All occurrences for which an environment exists will be replaced with the environment variables content.
Example: https://{{env.username}}:{{env.password}}@myserver.com
will insert the environment variables username and password inside the string.
- Parameters
text (
str) – The text to search within- Returns
The string into which the environment variables were inserted