Installation
Installing the connector boilerplate.
Installation
To get started, install a supported python version and install poetry (for example via pip).
We recommend to clone the starter project with:
$ git clone https://gitlab.com/unitelabs/cdk/connector-starter.git <my-connector-name>
Enter the newly created project directory and install the template dependencies in a virtual environment using poetry:
$ cd <my-connector-name>
$ poetry install
Once you have cloned the connector-starter repository, you should change the git remote origin to point to your own project repository on GitHub or GitLab.
$ git remote set-url origin https://git-repo/new-repository.git
On startup the connector draws certain information from environmental variables. If none are provided, default values will be used. Create a .env file in the project root directory of you connector-starter project:
├── connector-starter
├── src
├── .env
├── pyproject.toml
├── ...
And add the following variables. The values of these variables depend on your project and a new Server-UUID must be generated for every new connector:
CLOUD_SERVER_ENDPOINT__ENDPOINT = localhost:5000
CLOUD_SERVER_ENDPOINT__SECURE = True
SILA_SERVER__UUID = 38f55c97-65ab-4abf-8b1d-f5e65a645331
SILA_SERVER__HOST = 0.0.0.0
SILA_SERVER__PORT = 50001
You can create a new UUID using the python uuid package using your command line:
$ python -c 'import uuid; print(uuid.uuid4())'
You're all set! 🚀
Alternative installation: You can also manually create a new project from scratch and install the framework with pip. In this case, of course, you'll be responsible for creating the project boilerplate files yourself.
$ pip install unitelabs-connector-framework