Skip to main content

Simple HipChat client library

Project description

hipchatpy is HipChat client library for specific logging.

Install

pip install hipchatpy

Dependencies

  • requests

Sample Code

import hipchatpy

AUTH_TOKEN = 'hogehoge'
ROOM_ID = 10000

# Create a new instance.
logging = hipchatpy.HipChatLogging(AUTH_TOKEN, ROOM_ID)

# LogLevel: INFO
logging.info(message='INFO Message')

# LogLevel: WARN
logging.warn(message='WARN Message')

# LogLevel: ERROR
logging.error(message='ERROR Message')

Correspondence table

Method

LogLevel

Notify

Color

info()

INFO (1)

False

green

warn()

WARNING (2)

True

yellow

error()

ERROR (3)

True

red

Command line

export HIPCHAT_TOKEN=your_api_token

# LogLevel: INFO
hipchatpy -r 10000 -m 'INFO Message' -l 1

# LogLevel: WARN
hipchatpy -r 10000 -m 'WARN Message' -l 2

# LogLevel: ERROR
hipchatpy -r 10000 -m 'ERROR Message' -l 3

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hipchatpy-0.1.8.tar.gz (3.0 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page