✅ 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:
Tool | Why you need it |
---|---|
Python 3.9+ | For writing and testing your connector code |
Visual Studio Code | Recommended for editing code |
Postman | To test your endpoints locally |
Google Cloud SDK (or AWS) | To deploy your connector publicly |
Weld account | To register your custom connector |
Install dependencies
We’ll be using Google Cloud Functions for hosting, and Functions Framework for local testing.
- Create a new folder for your connector project:
mkdir weld-custom-connector
cd weld-custom-connector
- Create and activate a virtual environment:
python3 -m venv venv,
source venv/bin/activate # Mac/Linux,
venv\Scripts\activate.bat # Windows,
- 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 tohttp://localhost:8080
- You should receive the response:
Hello, Weld!
✅ Your dev environment is now up and running!