Skip to content

Commit fbe45a0

Browse files
Updated README.md to include proxy information
1 parent 4c3f329 commit fbe45a0

1 file changed

Lines changed: 90 additions & 0 deletions

File tree

README.md

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ Show support for the Conductor OSS. Please help spread the awareness by starrin
3232
- [Start Conductor Server](#start-conductor-server)
3333
- [Execute Hello World Application](#execute-hello-world-application)
3434
- [Running Workflows on Orkes Conductor](#running-workflows-on-orkes-conductor)
35+
- [Proxy Configuration](#proxy-configuration)
36+
- [Supported Proxy Types](#supported-proxy-types)
37+
- [Synchronous Client Proxy Configuration](#client-proxy-configuration)
38+
- [Environment Variable Configuration](#environment-variable-configuration)
3539
- [Learn More about Conductor Python SDK](#learn-more-about-conductor-python-sdk)
3640
- [Create and Run Conductor Workers](#create-and-run-conductor-workers)
3741
- [Writing Workers](#writing-workers)
@@ -274,11 +278,97 @@ export CONDUCTOR_AUTH_KEY=your_key
274278
export CONDUCTOR_AUTH_SECRET=your_key_secret
275279
```
276280

281+
- If you need to use a proxy server, you can configure it using environment variables:
282+
283+
```shell
284+
export CONDUCTOR_PROXY=http://proxy.company.com:8080
285+
export CONDUCTOR_PROXY_HEADERS='{"Proxy-Authorization": "Basic dXNlcm5hbWU6cGFzc3dvcmQ="}'
286+
```
287+
277288
Run the application and view the execution status from Conductor's UI Console.
278289

279290
> [!NOTE]
280291
> That's it - you just created and executed your first distributed Python app!
281292
293+
## Proxy Configuration
294+
295+
The Conductor Python SDK supports proxy configuration for both synchronous and asynchronous clients. This is useful when your application needs to route traffic through corporate firewalls, load balancers, or other network intermediaries.
296+
297+
### Supported Proxy Types
298+
299+
- **HTTP Proxy**: `http://proxy.example.com:8080`
300+
- **HTTPS Proxy**: `https://proxy.example.com:8443`
301+
- **SOCKS4 Proxy**: `socks4://proxy.example.com:1080`
302+
- **SOCKS5 Proxy**: `socks5://proxy.example.com:1080`
303+
- **Proxy with Authentication**: `http://username:password@proxy.example.com:8080`
304+
305+
> [!NOTE]
306+
> For SOCKS proxy support, install the additional dependency: `pip install httpx[socks]`
307+
308+
### Client Proxy Configuration
309+
310+
```python
311+
from conductor.client.configuration.configuration import Configuration
312+
from conductor.shared.configuration.settings.authentication_settings import AuthenticationSettings
313+
314+
# Basic HTTP proxy configuration
315+
config = Configuration(
316+
server_api_url="https://api.orkes.io/api",
317+
authentication_settings=AuthenticationSettings(
318+
key_id="your_key_id",
319+
key_secret="your_key_secret"
320+
),
321+
proxy="http://proxy.company.com:8080"
322+
)
323+
324+
# HTTPS proxy with authentication headers
325+
config = Configuration(
326+
server_api_url="https://api.orkes.io/api",
327+
authentication_settings=AuthenticationSettings(
328+
key_id="your_key_id",
329+
key_secret="your_key_secret"
330+
),
331+
proxy="https://secure-proxy.company.com:8443",
332+
proxy_headers={
333+
"Proxy-Authorization": "Basic dXNlcm5hbWU6cGFzc3dvcmQ=",
334+
"X-Proxy-Client": "conductor-python-sdk"
335+
}
336+
)
337+
```
338+
339+
### Environment Variable Configuration
340+
341+
You can configure proxy settings using Conductor-specific environment variables:
342+
343+
```shell
344+
# Basic proxy configuration
345+
export CONDUCTOR_PROXY=http://proxy.company.com:8080
346+
347+
# Proxy with authentication headers (JSON format)
348+
export CONDUCTOR_PROXY_HEADERS='{"Proxy-Authorization": "Basic dXNlcm5hbWU6cGFzc3dvcmQ=", "X-Proxy-Client": "conductor-python-sdk"}'
349+
350+
# Or single header value
351+
export CONDUCTOR_PROXY_HEADERS="Basic dXNlcm5hbWU6cGFzc3dvcmQ="
352+
```
353+
354+
**Priority Order:**
355+
1. Explicit proxy parameters in Configuration constructor
356+
2. `CONDUCTOR_PROXY` and `CONDUCTOR_PROXY_HEADERS` environment variables
357+
358+
**Example Usage with Environment Variables:**
359+
360+
```python
361+
# Set environment variables
362+
import os
363+
os.environ['CONDUCTOR_PROXY'] = 'http://proxy.company.com:8080'
364+
os.environ['CONDUCTOR_PROXY_HEADERS'] = '{"Proxy-Authorization": "Basic dXNlcm5hbWU6cGFzc3dvcmQ="}'
365+
366+
# Configuration will automatically use proxy from environment
367+
from conductor.client.configuration.configuration import Configuration
368+
config = Configuration(server_api_url="https://api.orkes.io/api")
369+
# Proxy is automatically configured from CONDUCTOR_PROXY environment variable
370+
```
371+
282372
## Learn More about Conductor Python SDK
283373

284374
There are three main ways you can use Conductor when building durable, resilient, distributed applications.

0 commit comments

Comments
 (0)