Commit bb42b780 authored by Samy Haffoudhi's avatar Samy Haffoudhi

maj variables env

parent 23af4a65
SLACK_TOKEN=xoxb-17091197537-2808341799910-Rt1jxyQ7BTZ9HU7TmtYBqY1m export SLACK_BOT_TOKEN=xoxb-17091197537-2808341799910-Rt1jxyQ7BTZ9HU7TmtYBqY1m
export SLACK_SIGNING_SECRET=bde8ff61717e3e84be1e9b21f159a1d7
import slack
import os
from pathlib import Path
from dotenv import load_dotenv
env_path = Path('.') / '.env'
load_dotenv(dotenv_path=env_path)
client = slack.WebClient(token=os.environ['SLACK_TOKEN'])
client.chat_postMessage(channel='#3_proj_i2', text="Salut!")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment