Skip to content

Getting Started

Connecticator is built using Bolt, Slack's official Python framework for creating apps. You might wanna check out their docs, or view Resources, before continuing.

Installation

Install and run Connecticator locally.

Note

If you are not a part of West Davaneel, you will have to create a Slack App.

Clone Repository

$ git clone https://github.com/West-Davaneel/connectinator.git
---> 100%

🔍 Navigate into the repository

$ cd connectinator
// Now you are in the repostiory 😁

Looking into the repository folder, you should be seeing something like this:

└───connecticator           <-- The repository folder
    ├───connecticator       <-- Helper modules, classes, functions
    ├───docs                <-- Documentation
    ├───.env.example        <-- Example .env file
    ├───requirements.txt    <-- Requirements (dependencies)
    └───app.py              <-- Runs the Connecticator App

Set up environment

🤫 Get environmental variables

These are variables that should not be hardcoded in, either for customization or security.

Warning

We keep the API keys in environmental variables -- NEVER commit them!

└───connecticator           
    ├───connecticator       
    ├───docs               
    ├───.env.example        
    ├───requirements.txt    
    ├───app.py             
    └───.env                <-- Create this file!
You must create a file named .env and supply these variables. These variables are either given to you or you must obtain them following the Bolt Python tutorial.

Example

You can see the .env.example as an example:

SLACK_BOT_TOKEN=secretbottoken
SLACK_APP_TOKEN=westdavaneelisgoingtowin

🐍 Create Python virtual environment

There are a good amount of depencies for this project -- it will be good practice to use a virtual environment, albeit not necessary.

python3 -m venv env
python -m venv env
python -m venv env

The last argument is the location to create the virtual environment. Generally, you can just create this in your project and call it env.

✅ Activate virtual environment

source env/bin/activate
.\env\Scripts\activate.bat
.\env\Scripts\activate.ps1

📦 Install packages

$ python -m pip install -r requirements.txt

---> 100%

Run the app

The app does not Hot Reload when changes are made -- you will have to restart the app for any changes to come into effect.

$ python .\app.py

DEBUG:slack_bolt.App:Sending a request 
INFO:slack_bolt.App:A new session has been established (session id: 123456)
INFO:slack_bolt.App:Bolt app is running!