<@U04SE163WC8> Give me the detailed steps to devel...
# ask-ai
k
@kapa.ai Give me the detailed steps to develop a python CDK Source connector. Do i need to write manifest.yaml, spec.yaml or json or metadata. Give me everything
u
Sure, here are the steps to develop a Python CDK Source connector using Airbyte: 1. Environment Setup: Start by cloning the Airbyte repository and changing your working directory to the new connector module. Create an initial python environment and install the dependencies required to run an API Source connector. You can verify the setup by running the unit tests and check operation. [source](https://docs.airbyte.com/connector-development/tutorials/custom-python-connector/environment-setup)
Copy code
bash
git clone <https://github.com/airbytehq/airbyte.git>  
cd airbyte  
cd airbyte-integrations/connector-templates/generator  
./generate.sh  
cd ../../connectors/source-survey-monkey-demo  
poetry lock  
poetry install --with dev  
poetry run pytest unit_tests  
poetry run source-survey-monkey-demo check --config secrets/config.json
2. Generate the Template: Use the Airbyte provided code generator which bootstraps the scaffolding for your connector. Select the
Python CDK Source
and name it
python-http-example
. [source](https://docs.airbyte.com/connector-development/tutorials/cdk-speedrun)
Copy code
bash
cd airbyte-integrations/connector-templates/generator  
./generate.sh
3. Create Dev Environment: Change your working directory to the new connector module and install the dependencies. [source](https://docs.airbyte.com/connector-development/tutorials/cdk-speedrun)
Copy code
bash
cd ../../connectors/source-python-http-example  
poetry install
4. Define Connector Inputs: Define your input schema to reflect the API you're working with. Open the
spec.yaml
file and replace it with your schema. [source](https://docs.airbyte.com/connector-development/tutorials/cdk-speedrun) 5. Define your Stream: In your
source.py
file, add a class that represents an endpoint you want to hit. This stream should define your output schema for every endpoint that you want to implement. [source](https://docs.airbyte.com/connector-development/tutorials/cdk-speedrun#define-your-stream) 6. Implement the Source Class: The
Source
class implements the
Spec
operation by looking for a file named
spec.yaml
(or
spec.json
) in the module's root by default. This is expected to be a json schema file that specifies the required configuration. [source](https://docs.airbyte.com/connector-development/cdk-python/basic-concepts#the-source-class) 7. Connecting to the API: Over the course of this tutorial, you'll be editing a few files that were generated by the code generator:
manifest.yaml
,
configured_catalog.json
,
sample_state.json
. You'll also be creating the following files:
config.json
,
invalid_config.json
,
rates.json
. [source](https://docs.airbyte.com/connector-development/config-based/tutorial/connecting-to-the-API-source)
u
New message text here
k
@kapa.ai Awesome progress. But i am not going to use Api to fetch data from my Saas. I am going to use my Saas SDK.
u
A message from kapa.ai
u
New message text here
k
@kapa.ai Can you give me some code example of how to use a random Saas SDK and airbyte python cdk
u
A message from kapa.ai
u
New message text here