{ "info": { "author": "Paul Watts", "author_email": "paulcwatts@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7" ], "description": "============================================================\ndjhipchat2: The most complete HipChat integration for Django\n============================================================\n\ndjhipchat2 is the Swiss Army knife for HipChat integration. It provides:\n\n- Configurable backend support, including local memory for testing\n- Logging integration\n- Out-of-the-box integration with Celery_ for asynchronous sending\n- Management command\n- Testing\n\nInstallation\n============\n\n1. Install: ``pip install djhipchat2``\n2. Add ``djhipchat2`` to your ``INSTALLED_APPS``.\n3. Configure your backend, or leave it as the default.\n\nUsage\n=====\n\ndjhipchat.send_message\n----------------------\n\nThis will send a HipChat message using the default backend. The parameters mirror those of the HipChat messaging API, defined here: https://www.hipchat.com/docs/api/method/rooms/message.\n\nThese are the parameters:\n\n* ``room_id``: The ID of the HipChat room to send to. Room IDs can be found here: https://{{your-account}}.hipchat.com/rooms/ids\n* ``sender``: The sender of the message. Must be less than 15 characters long. May contain letters, numbers, -, _, and spaces. (Note: in the HipChat API this is specified as ``from``. It's been changed so it's not a Python keyword.)\n* ``message``: The text or HTML of the message.\n* ``message_format``: Should be ``text`` or ``html``. The default is ``html``\n* ``notify``: Should be `True` if the message should trigger a notification in the room. The default is ``False``\n* ``color``: The color of the message. One of \"yellow\", \"red\", \"green\", \"purple\", \"gray\", or \"random\". The default is \"yellow\".\n\ndjhipchat.get_backend\n---------------------\n\nGet a reference to a HipChat backend. Each backend has one defined method: ``send_message`` which has the same parameters as ``djhipchat.send_message``.\n\nLogger\n------\n\nIntegrate HipChat into your server logging: this defines a logging handler that sends the message to a HipChat room. You can configure a logger to notify members of the room, or also configure multiple colors for log levels using the same handler. Here is a sample:\n\n::\n\n LOGGING = {\n 'version': 1,\n 'disable_existing_loggers': False,\n 'handlers': {\n 'djhipchat': {\n 'level': 'INFO',\n 'class': 'djhipchat.logger.HipChatHandler',\n 'token': '{{your_token_here}}',\n 'room' : '{{your_room_id_here}}',\n 'sender': 'Myapp',\n 'notify': True,\n 'color':'green',\n 'colors': {\n 'ERROR':'red',\n 'CRITICAL':'red',\n 'WARNING':'yellow',\n }\n }\n },\n 'loggers': {\n 'test_handler': {\n 'handlers': ['djhipchat'],\n 'level': 'INFO',\n 'propagate': False,\n },\n }\n }\n\nThis is inspired by: https://gist.github.com/hugorodgerbrown/3176710\n\nManagement command\n------------------\n\nThis app provides a management command to easily send a message to the configured backend. The usage is simple: ``python manage.py hipchat ``\n\nOptions are available at: ``python manage.py help hipchat``\n\nConfiguration\n=============\n\nHIPCHAT_BACKEND\n---------------\n\nSpecifies the default backend to use. The default is ``djhipchat.backends.locmem.HipChatBackend``\n\nHIPCHAT_API_TOKEN\n-----------------\n\nSpecifies the HipChat API token. This is theoretically optional except for the request backend, but that's probably what you want to use in production anyway.\n\nHIPCHAT_DEFAULT_SENDER\n----------------------\n\nThe default sender if not specified in a send_message call. If not specified, the default is \"Django\".\n\nHIPCHAT_CELERY_BACKEND\n----------------------\n\nWhen using the Celery backend, it needs a \"synchronous\" backend to actually send the message. There is no default, so you must specify this in order to use the Celery backend.\n\nBackends\n========\n\ndjhipchat.backends.celery.HipChatBackend\n----------------------------------------\n\nThis backend sends all messages through a Celery_ task. In order to use this backend, you must have celery installed and specify a synchronous backend in the ``HIPCHAT_CELERY_BACKEND`` setting.\n\ndjhipchat.backends.dummy.HipChatBackend\n---------------------------------------\n\nJust what is sounds like: this backend does nothing.\n\ndjhipchat.backends.locmem.HipChatBackend\n----------------------------------------\n\nSimilar to the locmem email backend in Django, this collects all messages into an array at ``djhipchat.sent_messages``. You can use this for testing.\n\ndjhipchat.backends.request.HipChatBackend\n-----------------------------------------\n\nThis is the default backend, which actually sends your message to HipChat.\n\n\n.. _Celery: http://www.celeryproject.org/", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/paulcwatts/djhipchat2", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "djhipchat2", "package_url": "https://pypi.org/project/djhipchat2/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/djhipchat2/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/paulcwatts/djhipchat2" }, "release_url": "https://pypi.org/project/djhipchat2/0.5.1/", "requires_dist": null, "requires_python": null, "summary": "The most complete and configurable HipChat library for Django.", "version": "0.5.1" }, "last_serial": 718216, "releases": { "0.5": [ { "comment_text": "", "digests": { "md5": "c7a4af5394d31521a4a27fa7d8b01b60", "sha256": "fc228b59fc626077bdc757e7f5f6fe1743639363cfb8e5d55ef6a08bf658bdf5" }, "downloads": -1, "filename": "djhipchat2-0.5.tar.gz", "has_sig": false, "md5_digest": "c7a4af5394d31521a4a27fa7d8b01b60", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7030, "upload_time": "2013-06-03T18:58:02", "url": "https://files.pythonhosted.org/packages/f0/ad/f1b33e80af79dc754c473e358ad441200fb3a2ebed856c0d92c0164a5c8b/djhipchat2-0.5.tar.gz" } ], "0.5.1": [ { "comment_text": "", "digests": { "md5": "b4967d37edf6cc3793348d556134e840", "sha256": "1fb6a6bdb00214f962fe72893ad25b5410f6b16b023a1f87460fb84a8fd8e6f5" }, "downloads": -1, "filename": "djhipchat2-0.5.1.tar.gz", "has_sig": false, "md5_digest": "b4967d37edf6cc3793348d556134e840", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7552, "upload_time": "2013-06-03T19:23:47", "url": "https://files.pythonhosted.org/packages/4f/0b/4b5eed01fe5c40873c81a2d9151e3d03dfaf4a3d73e22da817cc62a9e47b/djhipchat2-0.5.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b4967d37edf6cc3793348d556134e840", "sha256": "1fb6a6bdb00214f962fe72893ad25b5410f6b16b023a1f87460fb84a8fd8e6f5" }, "downloads": -1, "filename": "djhipchat2-0.5.1.tar.gz", "has_sig": false, "md5_digest": "b4967d37edf6cc3793348d556134e840", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7552, "upload_time": "2013-06-03T19:23:47", "url": "https://files.pythonhosted.org/packages/4f/0b/4b5eed01fe5c40873c81a2d9151e3d03dfaf4a3d73e22da817cc62a9e47b/djhipchat2-0.5.1.tar.gz" } ] }