By following the mentioned way you can set the environment variable in Python:-
Your environment variables must be strings, below is the code that you can use to set the environment variable:-
os.environ["DEBUSSY"] = "1"
The above code is used to set the variable DEBUSSY to the string 1.
After setting DEBUSSY to environment variable it will be accessed by using the following piece of code:-
You asked about child process, so the child processes automatically inherit the environment variables of the parent process -- no special action on your part is required.