Skip to content

Commit

Permalink
feat: Environment variables are now parsed for boolean, integer, arra…
Browse files Browse the repository at this point in the history
…y and object setting values (#2637)

* feat: Environment variables are now parsed for boolean, integer, array and object setting values

* Add docs

* Do not deprecate just yet
  • Loading branch information
edgarrmondragon authored Oct 17, 2024
1 parent 925664b commit dac0305
Show file tree
Hide file tree
Showing 4 changed files with 192 additions and 106 deletions.
16 changes: 13 additions & 3 deletions docs/implementation/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,19 @@ values from environment variables, and from a `.env` file if present within the
working directory, which match the exact name of a setting, along with a prefix determined
by the plugin name.

> For example: For a sample plugin named `tap-my-example` and settings named "username" and "access_key", the SDK will automatically scrape
> the settings from environment variables `TAP_MY_EXAMPLE_USERNAME` and
> `TAP_MY_EXAMPLE_ACCESS_KEY`, if they exist.
```{note}
For example, for a sample plugin named `tap-my-example` and settings named `username` and `access_key`, the SDK will automatically scrape
the settings from environment variables `TAP_MY_EXAMPLE_USERNAME` and
`TAP_MY_EXAMPLE_ACCESS_KEY` respectively, if they exist.
```

The following value types are automatically cast to the appropriate Python type:

- integer (e.g. `TAP_MY_EXAMPLE_PORT=5432`)
- boolean (e.g. `TAP_MY_EXAMPLE_DEBUG=true`)
- JSON arrays (e.g. `TAP_MY_EXAMPLE_ARRAY='["a", "b", "c"]'`)
- JSON objects (e.g. `TAP_MY_EXAMPLE_OBJECT='{"key": "value"}'`)


## Tap-Specific CLI Options

Expand Down
Loading

0 comments on commit dac0305

Please sign in to comment.