### Setup and Run Bolt Python Starter Template Source: https://github.com/slack-samples/bolt-python-starter-template/blob/main/README.md Clones the project repository, sets up a Python virtual environment, installs project dependencies using pip, and starts the local development server by running the `app.py` script. ```zsh # Clone this project onto your machine git clone https://github.com/slack-samples/bolt-python-starter-template.git # Change into this project directory cd bolt-python-starter-template # Setup your python virtual environment python3 -m venv .venv source .venv/bin/activate # Install the dependencies pip install -r requirements.txt # Start your local server python3 app.py ``` -------------------------------- ### Start Ngrok for External Access Source: https://github.com/slack-samples/bolt-python-starter-template/blob/main/README.md Starts the `ngrok` utility to create a secure tunnel from the internet to your local development server (e.g., running on port 3000). This is crucial for Slack to send events to your app. ```zsh ngrok http 3000 ``` -------------------------------- ### Lint and Format Python Code Source: https://github.com/slack-samples/bolt-python-starter-template/blob/main/README.md Executes code quality checks using `flake8` for linting and `black` for code formatting. These commands ensure the codebase adheres to style guides and best practices. ```zsh # Run flake8 from root directory for linting flake8 *.py && flake8 listeners/ # Run black from root directory for code formatting black . ``` -------------------------------- ### Project Dependencies (Python) Source: https://github.com/slack-samples/bolt-python-starter-template/blob/main/requirements.txt This section details the Python packages and their pinned versions required for the project. These dependencies are crucial for setting up the development environment and ensuring the application runs as expected. They are typically installed using a package manager like pip. ```python slack-bolt==1.23.0 pytest==8.4.1 flake8==7.3.0 black==25.1.0 ``` -------------------------------- ### Run Python Unit Tests Source: https://github.com/slack-samples/bolt-python-starter-template/blob/main/README.md Executes the project's unit tests using the `pytest` framework. This helps verify the functionality and correctness of the application's components. ```zsh # Run pytest from root directory for unit testing pytest . ``` -------------------------------- ### Set Slack Environment Variables Source: https://github.com/slack-samples/bolt-python-starter-template/blob/main/README.md Exports Slack bot token and app token as environment variables. These are required for the Bolt application to authenticate with Slack and establish WebSocket connections. ```zsh # Replace with your app token and bot token export SLACK_BOT_TOKEN= export SLACK_APP_TOKEN= ``` -------------------------------- ### Slack OAuth Redirect URL Configuration Source: https://github.com/slack-samples/bolt-python-starter-template/blob/main/README.md Specifies the redirect URL for Slack's OAuth flow. This URL, typically provided by `ngrok`, must be added to your Slack app's OAuth & Permissions settings to complete the OAuth handshake. ```APIDOC Slack App Configuration -> OAuth & Permissions -> Add a Redirect URL Example: https://.ngrok.io/slack/oauth_redirect ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.