# Passing enviroment variables outside JupyterLab to another Python script

**URL:** https://discourse.jupyter.org/t/passing-enviroment-variables-outside-jupyterlab-to-another-python-script/15062
**Category:** JupyterLab
**Tags:** jupyterlab, how-to, help-wanted
**Created:** [July 23, 2022, 12:43pm UTC](https://discourse.jupyter.org/t/passing-enviroment-variables-outside-jupyterlab-to-another-python-script/15062 "2022-07-23T12:43:58Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![adhyapakh](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/adhyapakh/32/4907_2.png) [@adhyapakh](https://discourse.jupyter.org/u/adhyapakh)
#### Post date: [July 23, 2022, 12:43pm UTC](https://discourse.jupyter.org/t/passing-enviroment-variables-outside-jupyterlab-to-another-python-script/15062/1 "2022-07-23T12:43:58Z")

</div>

Hello Community,

I am working on a problem to get some variable out of the JupyterLab to a python script.

I have the following lines that store the environment variable within my notebook.

```auto
import os
os.environ['X'] = score
os.environ['Y'] = file

```

When I execute my notebook for the variable to be printed, it shows in the output.  
As a note, these values get updated every time I execute my notebook so I want to send the recent value to the python script.

The python script is a service that uses methods like `GET` and `POST.` And when it executes, it opens up an HTML page with the parameters. At the moment, it is hard-coded in the python script. I am not sure where to set this in the `jupyter_config.py` file or somewhere else to pass the parameters into this python script. I use this in a GitLab environment.
