Token : https://api.slack.com/custom-integrations/legacy-tokens
Slack에 채널을 만들고, 토큰을 복사
pip install slacker 설치
import slacker
token = 'token key'
slack = slacker.Slacker(token)
# send message
slack.chat.post_message('#channel', 'messages')
# file upload
slack.files.upload(file, channels='#channel')
'Python > Python Programming' 카테고리의 다른 글
[Python] 디렉토리 / 파일 유효성 확인 (0) | 2019.09.25 |
---|---|
[Python] 정규식을 이용하여 문자열에서 숫자와 문자를 제외한 나머지 일괄 변경 시키기 (0) | 2019.09.23 |
[Python] isinstance 내장함수 - 리스트나 튜플에서 타입별로 요소 추출하기 (0) | 2019.09.11 |
[Python] max, min, sum 내장함수 (0) | 2019.08.24 |
jupyter notebook install (windows) 설치 (0) | 2019.07.27 |
[Python] 로그스탬프 UTC 한국시간 계산하기 (0) | 2019.07.02 |
[Python] Access Log 유니코드를 한글로 변환 (0) | 2019.04.18 |
[Python] datetime.strftime를 이용한 날짜와 시간 변환 (0) | 2019.04.11 |