* 5-step tutorial * move * tiny bit of editing * Update tutorial * update docs * reset * move files * record selector, request options, and more links * update * update * connector definition * link * links * update example * footnote * typo * document string interpolation * note on string interpolation * update * fix code sample * fix * update sample * fix * use the actual config * Update as per comments * write as yaml * typo * Clarify options overloading * clarify that docker must be running * remove extra footnote * use venv directly * Apply suggestions from code review Co-authored-by: Sherif A. Nada <snadalive@gmail.com> * signup instructions * update * clarify that both dot and bracket notations are interchangeable * Clarify how check works * create spec and config before updating connector definition * clarify what now_local() is * rename to yaml structure * Go through tutorial and update end of section code samples * fix link * update * update code samples * Update code samples * Update to bracket notation * remove superfluous comments * Update docs/connector-development/config-based/tutorial/2-install-dependencies.md Co-authored-by: Augustin <augustin.lafanechere@gmail.com> * Update docs/connector-development/config-based/tutorial/3-connecting-to-the-API-source.md Co-authored-by: Augustin <augustin.lafanechere@gmail.com> * Update docs/connector-development/config-based/tutorial/3-connecting-to-the-API-source.md Co-authored-by: Augustin <augustin.lafanechere@gmail.com> * Update docs/connector-development/config-based/tutorial/3-connecting-to-the-API-source.md Co-authored-by: Augustin <augustin.lafanechere@gmail.com> * Update docs/connector-development/config-based/tutorial/3-connecting-to-the-API-source.md Co-authored-by: Augustin <augustin.lafanechere@gmail.com> * Update docs/connector-development/config-based/tutorial/3-connecting-to-the-API-source.md Co-authored-by: Augustin <augustin.lafanechere@gmail.com> * Update docs/connector-development/config-based/tutorial/4-reading-data.md Co-authored-by: Augustin <augustin.lafanechere@gmail.com> * fix path * update * motivation blurp * warning * warning * fix code block * update code samples * update code sample * update code samples * small updates * update yaml structure * custom class example * language annotations * update warning * Update tutorial to use dpath extractor * Update record selector docs * unit test * link to contributing * tiny update * $ in front of commands * $ in front of commands * More readings * link to existing config-based connectors * index * update * delete broken link * supported features * update * Add some links * Update docs/connector-development/config-based/overview.md Co-authored-by: Brian Lai <51336873+brianjlai@users.noreply.github.com> * Update docs/connector-development/config-based/record-selector.md Co-authored-by: Brian Lai <51336873+brianjlai@users.noreply.github.com> * Update docs/connector-development/config-based/overview.md Co-authored-by: Brian Lai <51336873+brianjlai@users.noreply.github.com> * Update docs/connector-development/config-based/overview.md Co-authored-by: Brian Lai <51336873+brianjlai@users.noreply.github.com> * Update docs/connector-development/config-based/overview.md Co-authored-by: Brian Lai <51336873+brianjlai@users.noreply.github.com> * mention the unit * headers * remove mentions of interpolating on stream slice, etc. * update * exclude config-based docs Co-authored-by: Sherif A. Nada <snadalive@gmail.com> Co-authored-by: Augustin <augustin.lafanechere@gmail.com> Co-authored-by: Brian Lai <51336873+brianjlai@users.noreply.github.com>
46 lines
2.4 KiB
Markdown
46 lines
2.4 KiB
Markdown
# Step 2: Install dependencies
|
|
|
|
Let's create a python virtual environment for our source.
|
|
You can do this by executing the following commands from the root of the Airbyte repository.
|
|
|
|
The command below assume that `python` points to a version of python >=3.9.0. On some systems, `python` points to a Python2 installation and `python3` points to Python3.
|
|
If this is the case on your machine, substitute the `python` commands with `python3`.
|
|
The subsequent `python` invocations will use the virtual environment created for the connector.
|
|
|
|
```bash
|
|
$ cd ../../connectors/source-exchange-rates-tutorial
|
|
$ python -m venv .venv
|
|
$ source .venv/bin/activate
|
|
$ pip install -r requirements.txt
|
|
```
|
|
|
|
These steps create an initial python environment, and install the dependencies required to run an API Source connector.
|
|
|
|
Let's verify everything works as expected by running the Airbyte `spec` operation:
|
|
|
|
```bash
|
|
$ python main.py spec
|
|
```
|
|
|
|
You should see an output similar to the one below:
|
|
|
|
```
|
|
{"type": "SPEC", "spec": {"documentationUrl": "https://docsurl.com", "connectionSpecification": {"$schema": "http://json-schema.org/draft-07/schema#", "title": "Python Http Tutorial Spec", "type": "object", "required": ["TODO"], "additionalProperties": false, "properties": {"TODO: This schema defines the configuration required for the source. This usually involves metadata such as database and/or authentication information.": {"type": "string", "description": "describe me"}}}}}
|
|
```
|
|
|
|
This is a simple sanity check to make sure everything is wired up correctly.
|
|
More details on the `spec` operation can be found in [Basic Concepts](https://docs.airbyte.com/connector-development/cdk-python/basic-concepts) and [Defining Stream Schemas](https://docs.airbyte.com/connector-development/cdk-python/schemas).
|
|
|
|
For now, note that the `main.py` file is a convenience wrapper to help run the connector.
|
|
Its invocation format is `python main.py <command> [args]`.
|
|
The module's generated `README.md` contains more details on the supported commands.
|
|
|
|
## Next steps
|
|
|
|
Next, we'll [connect to the API source](3-connecting-to-the-API-source.md)
|
|
|
|
## More readings
|
|
|
|
- [Basic Concepts](https://docs.airbyte.com/connector-development/cdk-python/basic-concepts)
|
|
- [Defining Stream Schemas](https://docs.airbyte.com/connector-development/cdk-python/schemas)
|
|
- The module's generated `README.md` contains more details on the supported commands. |