From 5b33770a7805d2a0b4db1a98817a77478d514331 Mon Sep 17 00:00:00 2001 From: Horea Porutiu Date: Fri, 30 Aug 2024 17:30:59 +0200 Subject: [PATCH 01/10] first draft --- examples/python-webhooks/.gitignore | 24 +++++ examples/python-webhooks/.sample.env | 3 + examples/python-webhooks/README.md | 109 +++++++++++++++++++++ examples/python-webhooks/app-manifest.yaml | 5 + examples/python-webhooks/app.py | 53 ++++++++++ examples/python-webhooks/requirements.txt | 16 +++ 6 files changed, 210 insertions(+) create mode 100644 examples/python-webhooks/.gitignore create mode 100644 examples/python-webhooks/.sample.env create mode 100644 examples/python-webhooks/README.md create mode 100644 examples/python-webhooks/app-manifest.yaml create mode 100644 examples/python-webhooks/app.py create mode 100644 examples/python-webhooks/requirements.txt diff --git a/examples/python-webhooks/.gitignore b/examples/python-webhooks/.gitignore new file mode 100644 index 000000000..22367671f --- /dev/null +++ b/examples/python-webhooks/.gitignore @@ -0,0 +1,24 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js +.next + +# testing +/coverage + +# misc +.DS_Store +*.pem +.idea + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# local env files +.env +dist \ No newline at end of file diff --git a/examples/python-webhooks/.sample.env b/examples/python-webhooks/.sample.env new file mode 100644 index 000000000..d099aa952 --- /dev/null +++ b/examples/python-webhooks/.sample.env @@ -0,0 +1,3 @@ +MIRO_CLIENT_ID="" +MIRO_CLIENT_SECRET="" +MIRO_REDIRECT_URL="" \ No newline at end of file diff --git a/examples/python-webhooks/README.md b/examples/python-webhooks/README.md new file mode 100644 index 000000000..c4c2c19d4 --- /dev/null +++ b/examples/python-webhooks/README.md @@ -0,0 +1,109 @@ +# Python Webhooks + +This app shows how to get webhook events on your Miro board using Python and Flask. + +# 👨🏻‍💻 App Demo + +https://github.com/user-attachments/assets/1448b658-9e6f-4652-8300-6cebbf081f7a + +# 📒 Table of Contents + +- [Included Features](#features) +- [Tools and Technologies](#tools) +- [Prerequisites](#prerequisites) +- [Associated Developer Tutorial](#tutorial) +- [Run the app locally](#run) +- [Folder Structure](#folder) +- [Contributing](#contributing) +- [License](#license) + +# ⚙️ Included Features + +- [Miro Node Client Library with Python](https://miroapp.github.io/api-clients/python/miro_api.html) + - [miro.exchangeCodeForAccessToken()](https://miroapp.github.io/api-clients/python/miro_api.html#Miro.exchange_code_for_access_token) + - [miro.isAuthorized()](https://miroapp.github.io/api-clients/python/miro_api.html#Miro.is_authorized) + - [miro.getAuthUrl()](https://miroapp.github.io/api-clients/python/miro_api.html#Miro.get_auth_url) + - [api.get_all_boards()](https://miroapp.github.io/api-clients/python/miro_api/api_extended.html#MiroApiExtended.get_all_boards) + +# 🛠️ Tools and Technologies + +- [Python](https://www.python.org/) +- [Flask](https://flask.palletsprojects.com/en/3.0.x/) + +# ✅ Prerequisites + +- You have a [Miro account](https://miro.com/signup/). +- You're [signed in to Miro](https://miro.com/login/). +- Your Miro account has a [Developer team](https://developers.miro.com/docs/create-a-developer-team). +- Your development environment includes [Python](https://www.python.org/) 3.9 or a later version. +- Your development environment includes [pip](https://www.python.org/) 24.0 or a later version. +- Your development environment includes [ngrok](https://ngrok.com/) or something similar. + +# 📖 Associated Developer Tutorial + +> To view a more in depth developer tutorial +> of this app (including code explanations) see the [Getting started with Miro webhooks using Python tutorial](https://developers.miro.com/docs/getting-started-with-webhooks-python) on Miro's Developer documentation. + +# 🏃🏽‍♂️ Run the app locally + +0. It is recommended to use a virtual env to run this app example. Go to where you .venv is and then activate it with the + `source ./bin/activate` command. Read more about venvs [here](https://docs.python.org/3/library/venv.html). + +1. Create a new Miro app on [developers.miro.com](https://developers.miro.com/). This will take you to the app settings page. There you + will find the `MIRO_CLIENT_ID` and `MIRO_CLIENT_SECRET` to be added to your `.env` file.Ensure that your app URL is `http://localhost:5000` since that is what port Flask will be running on. Ensure that `boards:read` scope is checked, + and then go ahead and install the app on your developer team. You will get an **access token** which you will need later to + authenticate the creation of your webhook subscription. + +2. In a new terminal session, run: + +``` +ngrok http 5000 +``` + +This will output something like this: + +``` +Forwarding https: -> http://localhost:5000 +``` + +The `https:` is your `MIRO_REDIRECT_URL` to be used in the `.env` file and then later when calling the API to create a webhook subscription. + +3. Rename the `.sample.env` file to `.env` and then add in your `MIRO_CLIENT_ID` and `MIRO_CLIENT_SECRET` from your [developers.miro.com](https://developers.miro.com/) app settings page. Use the `forwarding URL` from the previous step for the `MIRO_REDIRECT_URL` in the .env file. Save the file as `.env` with your new variables. + +4. Run `pip install -r requirements.txt` to install dependencies. + +5. Run `flask --app app run` to start the server. Your server should be running on port 5000. + +6. Go to your developer team, and open the board you want to receive webhook events for. + +7. In a separate browser tab, open up the API Exporer for the [Create Webhook Subscription endpoint](https://developers.miro.com/reference/create-board-subscription). + +8. Provide the following information in the API Explorer: + +> **Access Token**: Once you get the access token after installing your app on a developer team (from step 4 above), you can add the access token to the Authorization section of the API reference page. +> +> **boardId:** Get the board ID of the board you want to receive notifications for. This board should be in the same team where you installed the app. You can find board ID in the URL when you go to your board: https://miro.com/app/board/. +> +> **callbackUrl:** This is the URL where you will receive events. It should be the same as `MIRO_REDIRECT_URL` in `.env`. + +9. Select Try It! to run the API request right from the browser. If you get a 201 response, you are ready to receive events! + +10. Next, go to to the same board which you referenced in the request above, and create a sticky. You should now receive a webhook event! To learn more about the events you can expect to receive, + +# 🗂️ Folder structure + +``` +. +├── app.py - main logic to receive webhooks and start the server +├── .sample.env <-- File with sample env variables. Need to rename to .env and then add in your variables. +├── app-manifest.yaml <-- File with sample manifest file for easy copy paste into your developer app settings manifest. +├── requirements.txt <-- File with libraries which the project depends on, including versions. +``` + +# 🫱🏻‍🫲🏽 Contributing + +If you want to contribute to this example, or any other Miro Open Source project, please review [Miro's contributing guide](https://github.com/miroapp/app-examples/blob/main/CONTRIBUTING.md). + +# 🪪 License + +[MIT License](https://github.com/miroapp/app-examples/blob/main/LICENSE). diff --git a/examples/python-webhooks/app-manifest.yaml b/examples/python-webhooks/app-manifest.yaml new file mode 100644 index 000000000..949a22cef --- /dev/null +++ b/examples/python-webhooks/app-manifest.yaml @@ -0,0 +1,5 @@ +# See https://developers.miro.com/docs/app-manifest on how to use this +appName: Python Webhooks +sdkUri: "http://localhost:5000" +scopes: + - boards:read diff --git a/examples/python-webhooks/app.py b/examples/python-webhooks/app.py new file mode 100644 index 000000000..922450898 --- /dev/null +++ b/examples/python-webhooks/app.py @@ -0,0 +1,53 @@ +from flask import Flask, session, request, json, Response +from miro_api import Miro +from miro_api.storage import Storage + +from dotenv import load_dotenv + +load_dotenv() + +app = Flask(__name__) + +app.secret_key = b"very_random_secret" + + +class SessionStorage(Storage): + session_key = "miro_state" + + def get(self): + return session[self.session_key] + + def set(self, state): + if not state: + session.pop(self.session_key, None) + return + session[self.session_key] = state + + +miro = Miro(storage=SessionStorage()) + + +def render_boards(): + boards = miro.api.get_all_boards() + names = "
".join([board.name for board in boards]) + return f"

List of boards in the team: {names}

" + + +@app.route("/", methods=["GET", "POST"]) +def hello_world(): + if request.method == "GET": + if miro.is_authorized: + return render_boards() + + if code := request.args.get("code", ""): + miro.exchange_code_for_access_token(code) + return render_boards() + + return f"Login to Miro" + if request.method == "POST": + webhook_data = request.json + formatted_webhook_data = json.dumps(webhook_data, indent=4) + print(f"webhook event: {formatted_webhook_data}") + return Response( + json.dumps(webhook_data), status=200, mimetype="application/json" + ) diff --git a/examples/python-webhooks/requirements.txt b/examples/python-webhooks/requirements.txt new file mode 100644 index 000000000..f57a5d35d --- /dev/null +++ b/examples/python-webhooks/requirements.txt @@ -0,0 +1,16 @@ +annotated-types==0.7.0 +blinker==1.8.2 +click==8.1.7 +Flask==3.0.3 +itsdangerous==2.2.0 +Jinja2==3.1.4 +MarkupSafe==2.1.5 +miro_api==2.2.0 +pydantic==2.8.2 +pydantic_core==2.20.1 +python-dateutil==2.9.0.post0 +python-dotenv==1.0.1 +six==1.16.0 +typing_extensions==4.12.2 +urllib3==1.26.19 +Werkzeug==3.0.3 From 99d3b2d5a5dad20d271acd22db222c48d00b9d9e Mon Sep 17 00:00:00 2001 From: Horea Porutiu Date: Fri, 30 Aug 2024 18:06:05 +0200 Subject: [PATCH 02/10] adding demo video --- examples/python-webhooks/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/python-webhooks/README.md b/examples/python-webhooks/README.md index c4c2c19d4..6bc7d749d 100644 --- a/examples/python-webhooks/README.md +++ b/examples/python-webhooks/README.md @@ -4,7 +4,7 @@ This app shows how to get webhook events on your Miro board using Python and Fla # 👨🏻‍💻 App Demo -https://github.com/user-attachments/assets/1448b658-9e6f-4652-8300-6cebbf081f7a +https://github.com/user-attachments/assets/0ccffb46-daab-4fc9-8ff8-f5720237f75a # 📒 Table of Contents @@ -50,7 +50,7 @@ https://github.com/user-attachments/assets/1448b658-9e6f-4652-8300-6cebbf081f7a `source ./bin/activate` command. Read more about venvs [here](https://docs.python.org/3/library/venv.html). 1. Create a new Miro app on [developers.miro.com](https://developers.miro.com/). This will take you to the app settings page. There you - will find the `MIRO_CLIENT_ID` and `MIRO_CLIENT_SECRET` to be added to your `.env` file.Ensure that your app URL is `http://localhost:5000` since that is what port Flask will be running on. Ensure that `boards:read` scope is checked, + will find the `MIRO_CLIENT_ID` and `MIRO_CLIENT_SECRET` to be added to your `.env` file. Ensure that your app URL is `http://localhost:5000` since that is what port Flask will be running on. Ensure that `boards:read` scope is checked, and then go ahead and install the app on your developer team. You will get an **access token** which you will need later to authenticate the creation of your webhook subscription. @@ -72,7 +72,7 @@ The `https:` is your `MIRO_REDIRECT_URL` to be used in the `.env 4. Run `pip install -r requirements.txt` to install dependencies. -5. Run `flask --app app run` to start the server. Your server should be running on port 5000. +5. In a separate terminal from the ngrok terminal (leave ngrok running) go to `app-examples/examples/python-webhooks` directiory. Run `flask --app app run` to start the server. Your server should be running on port 5000. 6. Go to your developer team, and open the board you want to receive webhook events for. From a4b690607f88898ebb9f8329f4e52f4d2567cae3 Mon Sep 17 00:00:00 2001 From: Horea Porutiu Date: Mon, 2 Sep 2024 09:44:47 +0200 Subject: [PATCH 03/10] typo --- examples/python-webhooks/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/python-webhooks/README.md b/examples/python-webhooks/README.md index 6bc7d749d..5f8a83eed 100644 --- a/examples/python-webhooks/README.md +++ b/examples/python-webhooks/README.md @@ -88,7 +88,7 @@ The `https:` is your `MIRO_REDIRECT_URL` to be used in the `.env 9. Select Try It! to run the API request right from the browser. If you get a 201 response, you are ready to receive events! -10. Next, go to to the same board which you referenced in the request above, and create a sticky. You should now receive a webhook event! To learn more about the events you can expect to receive, +10. Next, go to to the same board which you referenced in the request above, and create a sticky. You should now receive a webhook event! Great job! You've just learned how to get started with Miro's webhooks with Python 🎉. # 🗂️ Folder structure From d3d213029ae36ca669d6c2c1a829308988be75cd Mon Sep 17 00:00:00 2001 From: Horea Porutiu Date: Wed, 4 Sep 2024 12:55:32 +0200 Subject: [PATCH 04/10] Update examples/python-webhooks/README.md Co-authored-by: Ruslan <152289003+ruslan-kotowski@users.noreply.github.com> --- examples/python-webhooks/README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/examples/python-webhooks/README.md b/examples/python-webhooks/README.md index 5f8a83eed..f7677ec74 100644 --- a/examples/python-webhooks/README.md +++ b/examples/python-webhooks/README.md @@ -39,10 +39,9 @@ https://github.com/user-attachments/assets/0ccffb46-daab-4fc9-8ff8-f5720237f75a - Your development environment includes [pip](https://www.python.org/) 24.0 or a later version. - Your development environment includes [ngrok](https://ngrok.com/) or something similar. -# 📖 Associated Developer Tutorial +# 📖 Associated developer tutorial -> To view a more in depth developer tutorial -> of this app (including code explanations) see the [Getting started with Miro webhooks using Python tutorial](https://developers.miro.com/docs/getting-started-with-webhooks-python) on Miro's Developer documentation. +> To view a more in depth developer tutorial of this app including code explanations, see [Getting started with Miro webhooks using Python](https://developers.miro.com/docs/getting-started-with-webhooks-python) on Miro's Developer documentation. # 🏃🏽‍♂️ Run the app locally From 55d30e558d668c487d00d24582391c08a3541a72 Mon Sep 17 00:00:00 2001 From: Horea Porutiu Date: Wed, 4 Sep 2024 12:55:38 +0200 Subject: [PATCH 05/10] Update examples/python-webhooks/README.md Co-authored-by: Ruslan <152289003+ruslan-kotowski@users.noreply.github.com> --- examples/python-webhooks/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/python-webhooks/README.md b/examples/python-webhooks/README.md index f7677ec74..5f60ec590 100644 --- a/examples/python-webhooks/README.md +++ b/examples/python-webhooks/README.md @@ -1,6 +1,6 @@ # Python Webhooks -This app shows how to get webhook events on your Miro board using Python and Flask. +This app demonstrates how to receive webhook events from your Miro board using Python and Flask. By following this guide, you will set up a local environment, create a webhook subscription, and test receiving events when changes are made on your Miro board. # 👨🏻‍💻 App Demo From b87025a0a86311fee4b874d8cdaa00c38a3de2f1 Mon Sep 17 00:00:00 2001 From: Horea Porutiu Date: Wed, 4 Sep 2024 12:55:48 +0200 Subject: [PATCH 06/10] Update examples/python-webhooks/README.md Co-authored-by: Ruslan <152289003+ruslan-kotowski@users.noreply.github.com> --- examples/python-webhooks/README.md | 46 ++++-------------------------- 1 file changed, 6 insertions(+), 40 deletions(-) diff --git a/examples/python-webhooks/README.md b/examples/python-webhooks/README.md index 5f60ec590..e99f487af 100644 --- a/examples/python-webhooks/README.md +++ b/examples/python-webhooks/README.md @@ -45,49 +45,15 @@ https://github.com/user-attachments/assets/0ccffb46-daab-4fc9-8ff8-f5720237f75a # 🏃🏽‍♂️ Run the app locally -0. It is recommended to use a virtual env to run this app example. Go to where you .venv is and then activate it with the - `source ./bin/activate` command. Read more about venvs [here](https://docs.python.org/3/library/venv.html). +> It is recommended to use a virtual environment to run this app example. Go to where you `.venv` is located and then run `source ./bin/activate` command. Read more about venvs [here](https://docs.python.org/3/library/venv.html). -1. Create a new Miro app on [developers.miro.com](https://developers.miro.com/). This will take you to the app settings page. There you - will find the `MIRO_CLIENT_ID` and `MIRO_CLIENT_SECRET` to be added to your `.env` file. Ensure that your app URL is `http://localhost:5000` since that is what port Flask will be running on. Ensure that `boards:read` scope is checked, - and then go ahead and install the app on your developer team. You will get an **access token** which you will need later to - authenticate the creation of your webhook subscription. +1. Create a new Miro app on [developers.miro.com](https://developers.miro.com/). This will take you to the app settings page. There you will find the `MIRO_CLIENT_ID` and `MIRO_CLIENT_SECRET` to be added to your `.env` file. Ensure that your app URL is `http://localhost:5000` since that is what port Flask will be running on. + + - Ensure the `boards:read` scope is selected. + - Install the app on your developer team. You will get an **access token** which you will need later to authenticate the creation of your webhook subscription. -2. In a new terminal session, run: +2. In a new terminal window, run: -``` -ngrok http 5000 -``` - -This will output something like this: - -``` -Forwarding https: -> http://localhost:5000 -``` - -The `https:` is your `MIRO_REDIRECT_URL` to be used in the `.env` file and then later when calling the API to create a webhook subscription. - -3. Rename the `.sample.env` file to `.env` and then add in your `MIRO_CLIENT_ID` and `MIRO_CLIENT_SECRET` from your [developers.miro.com](https://developers.miro.com/) app settings page. Use the `forwarding URL` from the previous step for the `MIRO_REDIRECT_URL` in the .env file. Save the file as `.env` with your new variables. - -4. Run `pip install -r requirements.txt` to install dependencies. - -5. In a separate terminal from the ngrok terminal (leave ngrok running) go to `app-examples/examples/python-webhooks` directiory. Run `flask --app app run` to start the server. Your server should be running on port 5000. - -6. Go to your developer team, and open the board you want to receive webhook events for. - -7. In a separate browser tab, open up the API Exporer for the [Create Webhook Subscription endpoint](https://developers.miro.com/reference/create-board-subscription). - -8. Provide the following information in the API Explorer: - -> **Access Token**: Once you get the access token after installing your app on a developer team (from step 4 above), you can add the access token to the Authorization section of the API reference page. -> -> **boardId:** Get the board ID of the board you want to receive notifications for. This board should be in the same team where you installed the app. You can find board ID in the URL when you go to your board: https://miro.com/app/board/. -> -> **callbackUrl:** This is the URL where you will receive events. It should be the same as `MIRO_REDIRECT_URL` in `.env`. - -9. Select Try It! to run the API request right from the browser. If you get a 201 response, you are ready to receive events! - -10. Next, go to to the same board which you referenced in the request above, and create a sticky. You should now receive a webhook event! Great job! You've just learned how to get started with Miro's webhooks with Python 🎉. # 🗂️ Folder structure From 8a91b073e27de2eeabbff87e553a31e083b3110e Mon Sep 17 00:00:00 2001 From: Horea Porutiu Date: Wed, 4 Sep 2024 13:42:50 +0200 Subject: [PATCH 07/10] formatting --- examples/python-webhooks/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/python-webhooks/README.md b/examples/python-webhooks/README.md index e99f487af..944400e3f 100644 --- a/examples/python-webhooks/README.md +++ b/examples/python-webhooks/README.md @@ -48,13 +48,12 @@ https://github.com/user-attachments/assets/0ccffb46-daab-4fc9-8ff8-f5720237f75a > It is recommended to use a virtual environment to run this app example. Go to where you `.venv` is located and then run `source ./bin/activate` command. Read more about venvs [here](https://docs.python.org/3/library/venv.html). 1. Create a new Miro app on [developers.miro.com](https://developers.miro.com/). This will take you to the app settings page. There you will find the `MIRO_CLIENT_ID` and `MIRO_CLIENT_SECRET` to be added to your `.env` file. Ensure that your app URL is `http://localhost:5000` since that is what port Flask will be running on. - + - Ensure the `boards:read` scope is selected. - Install the app on your developer team. You will get an **access token** which you will need later to authenticate the creation of your webhook subscription. 2. In a new terminal window, run: - # 🗂️ Folder structure ``` From 4774cbe6380a368a3c7f0884d0137030f328cd90 Mon Sep 17 00:00:00 2001 From: Horea Porutiu Date: Wed, 4 Sep 2024 15:08:35 +0200 Subject: [PATCH 08/10] formatting --- examples/python-webhooks/README.md | 32 ++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/examples/python-webhooks/README.md b/examples/python-webhooks/README.md index 944400e3f..e433f1f9a 100644 --- a/examples/python-webhooks/README.md +++ b/examples/python-webhooks/README.md @@ -54,6 +54,38 @@ https://github.com/user-attachments/assets/0ccffb46-daab-4fc9-8ff8-f5720237f75a 2. In a new terminal window, run: +``` +ngrok http 5000 +``` + +This will output something like this: + +``` +Forwarding https: -> http://localhost:5000 +``` + +The `https:` is your `MIRO_REDIRECT_URL` to be used in the `.env` file and then later when calling the API to create a webhook subscription. + +3. Rename the `.sample.env` file to `.env` and then add in your `MIRO_CLIENT_ID` and `MIRO_CLIENT_SECRET` from your [developers.miro.com](https://developers.miro.com/) app settings page. Use the `forwarding URL` from the previous step for the `MIRO_REDIRECT_URL` in the .env file. Save the file as `.env` with your new variables. + +4. Run `pip install -r requirements.txt` to install dependencies. + +5. In a separate terminal from the ngrok terminal (leave ngrok running) go to `app-examples/examples/python-webhooks` directiory. Run `flask --app app run` to start the server. Your server should be running on port 5000. + +6. Go to your developer team, and open the board you want to receive webhook events for. + +7. In a separate browser tab, open up the API Exporer for the [Create Webhook Subscription endpoint](https://developers.miro.com/reference/create-board-subscription). + +8. Provide the following information in the API Explorer: + +> **Access Token**: Once you get the access token after installing your app on a developer team (from step 4 above), you can add the access token to the Authorization section of the API reference page. +> +> **boardId:** Get the board ID of the board you want to receive notifications for. This board should be in the same team where you installed the app. You can find board ID in the URL when you go to your board: https://miro.com/app/board/. +> +> **callbackUrl:** This is the URL where you will receive events. It should be the same as `MIRO_REDIRECT_URL` in `.env`. 9. Select Try It! to run the API request right from the browser. If you get a 201 response, you are ready to receive events! + +10. Next, go to to the same board which you referenced in the request above, and create a sticky. You should now receive a webhook event! Great job! You've just learned how to get started with Miro's webhooks with Python 🎉. + # 🗂️ Folder structure ``` From 492bd0233cbc5c39db735b5e9f070de47242999d Mon Sep 17 00:00:00 2001 From: Horea Porutiu Date: Wed, 4 Sep 2024 15:11:42 +0200 Subject: [PATCH 09/10] formatting --- examples/python-webhooks/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/python-webhooks/README.md b/examples/python-webhooks/README.md index e433f1f9a..48f8b3385 100644 --- a/examples/python-webhooks/README.md +++ b/examples/python-webhooks/README.md @@ -84,7 +84,7 @@ The `https:` is your `MIRO_REDIRECT_URL` to be used in the `.env > > **callbackUrl:** This is the URL where you will receive events. It should be the same as `MIRO_REDIRECT_URL` in `.env`. 9. Select Try It! to run the API request right from the browser. If you get a 201 response, you are ready to receive events! -10. Next, go to to the same board which you referenced in the request above, and create a sticky. You should now receive a webhook event! Great job! You've just learned how to get started with Miro's webhooks with Python 🎉. +9. Next, go to to the same board which you referenced in the request above, and create a sticky. You should now receive a webhook event! Great job! You've just learned how to get started with Miro's webhooks with Python 🎉. # 🗂️ Folder structure From 0ac1329d5a769e438fe8058e1fca4f9e32e37e45 Mon Sep 17 00:00:00 2001 From: Horea Porutiu Date: Wed, 4 Sep 2024 17:45:11 +0200 Subject: [PATCH 10/10] remove unnecessary dependencies --- examples/python-webhooks/requirements.txt | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/examples/python-webhooks/requirements.txt b/examples/python-webhooks/requirements.txt index f57a5d35d..f1239ada1 100644 --- a/examples/python-webhooks/requirements.txt +++ b/examples/python-webhooks/requirements.txt @@ -1,16 +1,3 @@ -annotated-types==0.7.0 -blinker==1.8.2 -click==8.1.7 Flask==3.0.3 -itsdangerous==2.2.0 -Jinja2==3.1.4 -MarkupSafe==2.1.5 miro_api==2.2.0 -pydantic==2.8.2 -pydantic_core==2.20.1 -python-dateutil==2.9.0.post0 -python-dotenv==1.0.1 -six==1.16.0 -typing_extensions==4.12.2 -urllib3==1.26.19 -Werkzeug==3.0.3 +python-dotenv==1.0.1 \ No newline at end of file