doldol_alarm
doldol_alarm는 Webex 봇을 통해 지정된 Webex 대화방으로 간단하게 메시지를 보낼 수 있도록 도와주는 파이썬 패키지입니다. 코드 실행 중 특정 시점에 알림을 받거나, 로그를 보내는 등의 용도로 활용할 수 있습니다.
주요 기능
- 간단한 코드로 Webex 대화방에 메시지 전송
- 클래스 객체를 함수처럼 호출하여 직관적인 사용 가능
- Webex 봇 토큰을 환경 변수로 안전하게 관리
설치하기
PyPI를 통해 쉽게 설치할 수 있습니다.
pip install doldol_alarm
사전 준비
이 패키지를 사용하기 위해서는 두 가지 정보가 필요합니다.
- Webex 룸 ID (Room ID)
- 봇이 메시지를 보낼 대상 대화방의 고유 ID입니다.
- 봇을 해당 대화방에 초대한 후, Webex API 등을 통해 확인할 수 있습니다.
사용 방법
아래는 doldol_alarm를 사용하여 Webex 대화방으로 메시지를 보내는 예제 코드입니다.
from doldol_alarm import DDA
# 메시지를 보낼 Webex Room ID
MY_WEBEX_ROOM_ID = "여기에_메시지를_보낼_방의_ID를_입력하세요"
# 1. (권장) 환경변수에 설정된 봇 토큰을 사용하는 방법
# DoldolAlarm 객체를 생성합니다.
doldol_print = DDA(roomid=MY_WEBEX_ROOM_ID)
# 2. 봇 토큰을 직접 파라미터로 전달하는 방법
# MY_WEBEX_BOT_TOKEN = "여기에_봇_액세스_토큰을_입력하세요"
# doldol_print = doldol_alarm.DoldolAlarm(roomid=MY_WEBEX_ROOM_ID, webex_bot_token=MY_WEBEX_BOT_TOKEN)
# 이제 객체를 함수처럼 호출하여 메시지를 보낼 수 있습니다.
try:
print("Webex로 알림을 보냅니다.")
doldol_print("🚀 작업이 시작되었습니다.")
# ... (여기에 원하는 작업을 수행하는 코드를 작성) ...
result = 100 / 5
doldol_print(f"✔️ 작업이 성공적으로 완료되었습니다. 결과: {result}")
except Exception as e:
# 예외 발생 시 Webex로 에러 메시지 보내기
doldol_print(f"🚨 에러가 발생했습니다: {e}")
라이선스
이 프로젝트는 MIT 라이선스를 따릅니다. 자세한 내용은 LICENSE 파일을 참고하세요.
Metadata
Release files for doldol-alarm 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| doldol_alarm-0.0.4.tar.gz | 3.7 kB | Without provenance | Details for doldol_alarm-0.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| doldol_alarm-0.0.4-py3-none-any.whl | Python 3 | none | any | Details for doldol_alarm-0.0.4-py3-none-any.whl |
Total release size: 7.2 kB
Release files / doldol_alarm-0.0.4.tar.gz
| Download URL | doldol_alarm-0.0.4.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
21e52318c3a804c92364f0bf3b75d6d9e2d48e1d26ce1fdf09e41f0973bdf814
|
|
BLAKE2b-256 checksum How to use checksums |
42e553f75a2ef081af5dbefa358779c272101a014a0d041a4545fd1d4dc001e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|
Release files / doldol_alarm-0.0.4-py3-none-any.whl
| Download URL | doldol_alarm-0.0.4-py3-none-any.whl |
|---|---|
| Size | 3.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d7d0f8515cf296fd784360928380c299f388e93762f1259c822c21ba5a39348f
|
|
BLAKE2b-256 checksum How to use checksums |
33bcc0cd576ef21234f39a42bfe38c80f85f6de9747d890e6f5ab32238143c3c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|
Security for doldol-alarm 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.