I don't know whether this overhead is significant, but if you want to avoid reading the environment variable multiple times you could use a closure:

```python
def outer():
    ss = ...
    def inner(url, method, data):
        # ss is accessible here
    return inner
http_request = outer()
```