Skip to content

Commit

Permalink
Sdk updates v2 (#236)
Browse files Browse the repository at this point in the history
updates to SDK docs and examples
  • Loading branch information
v1r3n authored Jan 2, 2024
1 parent 193564f commit 78b241e
Show file tree
Hide file tree
Showing 39 changed files with 665 additions and 1,000 deletions.
32 changes: 14 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,25 +63,20 @@ Get Conductor Python SDK
python3 -m pip install conductor-python
```
### Setup SDK
SDK requires connecting to the Conductor server and optionally supplying with authentication parameters.

```python
from conductor.client.configuration.configuration import Configuration

configuration = Configuration(server_api_url='https://play.orkes.io/api')
Point the SDK to the Conductor Server API endpoint
```shell
export CONDUCTOR_SERVER_URL=http://localhost:8080/api
```
Configure the authentication settings _if your Conductor server requires authentication_.
See [Access Control](https://orkes.io/content/docs/getting-started/concepts/access-control) for guide to getting API keys
```python
from conductor.client.configuration.configuration import Configuration
from conductor.client.configuration.settings.authentication_settings import AuthenticationSettings
(Optionally) If you are using a Conductor server that requires authentication

configuration = Configuration(
authentication_settings=AuthenticationSettings(
key_id='key',
key_secret='secret'
)
)
[How to obtain the key and secret from the conductor server
](https://orkes.io/content/docs/getting-started/concepts/access-control)


```shell
export CONDUCTOR_AUTH_KEY=your_key
export CONDUCTOR_AUTH_SECRET=your_key_secret
```

## Start Conductor Server
Expand All @@ -98,7 +93,8 @@ An application using Conductor uses the following:
1. **Workflow**: Describes the application's state and how functions are wired. Workflow is what gives your application's code durability and full-blown visualization in the Conductor UI.
2. **Worker**: Stateless components. Workers can be exposed as HTTP endpoints (aka Microservices) or can be simple task workers implemented using lightweight Conductor SDK in the framework and language of your choice.

Note: A single workflow application can have workers written in different languages.
> [!note]
> A single workflow application can have workers written in different languages.
### Step 1: Create a Workflow

Expand All @@ -117,7 +113,7 @@ def greetings_workflow(workflow_executor: WorkflowExecutor) -> ConductorWorkflow

```

**Use JSON to create workflows**
**(alternatively) Use JSON to create workflows**

Create workflow.json with the following:
```json
Expand Down
71 changes: 0 additions & 71 deletions docs/api/conductor.client.automator.task_handler.md

This file was deleted.

109 changes: 0 additions & 109 deletions docs/api/conductor.client.worker.worker_interface.md

This file was deleted.

Loading

0 comments on commit 78b241e

Please sign in to comment.