✅ What you’ll learn in this module:

  • What tools and accounts you need;
  • How to install and configure your environment;
  • How to run your first local test with a simple endpoint.

Prerequisites

Before you begin, make sure you have the following:

ToolWhy you need it
Python 3.9+For writing and testing your connector code
Visual Studio CodeRecommended for editing code
PostmanTo test your endpoints locally
Google Cloud SDK (or AWS)To deploy your connector publicly
Weld accountTo register your custom connector

Install dependencies

We’ll be using Google Cloud Functions for hosting, and Functions Framework for local testing.

  1. Create a new folder for your connector project:
mkdir weld-custom-connector
cd weld-custom-connector
  1. Create and activate a virtual environment:
python3 -m venv venv,
source venv/bin/activate  # Mac/Linux,
venv\Scripts\activate.bat # Windows,
  1. Install required packages:
pip install functions-framework requests # May need to use pip3 on Linux

🧪 Build a test function

Create a file called main.py with the following code:

1import functions_framework
2
3@functions_framework.http
4def handler(request):
5    return "Hello, Weld!", 200
6

Then, start the local development server:

functions-framework --target=handler --debug

You should now see a local server running at http://localhost:8080.

Test it in Postman

Open Postman and:

  • Make a GET request to http://localhost:8080
  • You should receive the response: Hello, Weld!

✅ Your dev environment is now up and running!

Next up

Creating the /schema endpoint

Tell Weld what data your connector provides.

Go to module