Skip to content

Add HTTP proxy support via environment variables#29

Merged
finn-huynh-armis merged 6 commits into
masterfrom
infra/proxy-configuration
Jun 2, 2025
Merged

Add HTTP proxy support via environment variables#29
finn-huynh-armis merged 6 commits into
masterfrom
infra/proxy-configuration

Conversation

@finn-huynh-armis
Copy link
Copy Markdown
Collaborator

Automatically detects and uses HTTPS_PROXY/HTTP_PROXY environment variables

Comment thread armis_sdk/core/armis_client.py Outdated
Comment thread armis_sdk/core/armis_client.py Outdated
Comment thread armis_sdk/core/armis_client.py Outdated
Comment thread armis_sdk/core/armis_client.py Outdated
Comment on lines +105 to +107
proxy = self._get_proxy_config()

if proxy:
Copy link
Copy Markdown
Collaborator

@shaiarmis shaiarmis May 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
proxy = self._get_proxy_config()
if proxy:
if proxy := self._get_proxy_config():

Comment thread tests/armis_sdk/core/armis_client_test.py Outdated
Comment thread tests/armis_sdk/core/armis_client_test.py Outdated

async with armis_client.client() as client:
assert (
client._trust_env is True
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't access private members

Comment thread tests/armis_sdk/core/armis_client_test.py Outdated
@shaiarmis
Copy link
Copy Markdown
Collaborator

  1. Note that lint and tests are failing
  2. Please add information about this in the documentation (you can run it locally with mkdocs server)
    `

@shaiarmis shaiarmis requested a review from yakir-armis May 28, 2025 07:02


@pytest.mark.parametrize(
"env_var,proxy_url, expected_proxy",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"env_var,proxy_url, expected_proxy",
["env_var", "proxy_url", "expected_proxy"],

@finn-huynh-armis finn-huynh-armis merged commit bc44c24 into master Jun 2, 2025
4 checks passed
@finn-huynh-armis finn-huynh-armis deleted the infra/proxy-configuration branch June 2, 2025 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants