63077bf016
prob won't be available in time, so leave it off. you will still get it on commit update |
||
---|---|---|
webhooks_server | ||
.env-example | ||
.gitignore | ||
README.md | ||
poetry.lock | ||
pyproject.toml | ||
run.py |
README.md
speckle-webhooks-example
This is a simple example of what you can do using Speckle Stream Webhooks.
Requests from the Speckle Server are consumed and formatted to then be sent to Discord:
Setup
You'll need access to a Speckle Server (or use our public one, speckle.xyz). Create some webhooks on the server to get started.
Fill in your .env
file based on the .env-example
:
SECRET
: the secret you used to set up the webhooks. note that it is assumed that all your webhooks have the same secretSPECKLE_TOKEN
: (optional) you can generate this from your profile online. this is only used for thecommit_created
eventDISCORD_URL
: generate this by going to a discord channel's settings > integrations > webhooks > new webhook
Developing
Dependencies
This project uses poetry for package management. Follow the docs to install.
If this is your first time using poetry and you're used to creating your virtual environments within the project directory, run $ poetry config virtualenvs.in-project true
to configure poetry to do the same.
To bootstrap the project environment run $ poetry install
. This will create a new virtual-env for the project and install both the package and dev dependencies.
If you don't want to use poetry, you can roll your own virtual env and install the specified dependencies in the pyproject.toml
.
Start
To start up, simply run the run.py
file in the root directory.