{
"info": {
"author": "Yoshihisa Tanaka",
"author_email": "yt.hisa@gmail.com",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: System :: Logging",
"Topic :: System :: Networking"
],
"description": "Introduction\n============\npyfluent is a python client library for `Fluentd `_.\nIt is simple, fast and reliable.\n\nThe primary purpose is to provide pythonic way to transmit JSON message to fluentd.\n\nFor better performance, pyfluent connects to fluentd's in_forward plugin and transmit messages that are serialized by MessagePack.\nWhile a connection is failed, messages are automatically queued for latter retransmit.\nWhen a connection is re-established, all queued messages are retransmitted automatically.\nSo, you don't worry about losing messages.\n\npyfluent is available under Apache License, Version 2.0.\n\n*Note: due to long time inactivity, I decided to reset the develop branch to 0.2.0 release. All commits in the old develop branch now exist in the server branch.*\n\nInstallation\n============\npyfluent requires python 2.5 or above (include python 3).\n\nYou can install using pip::\n\n $ pip install pyfluent\n\nclient\n======\nSending message is super simple. Just like this::\n\n from pyfluent.client import FluentSender\n fluent = FluentSender()\n fluent.send('Hello pyfluent!')\n\nBy default, FluentSender connects localhost:24224 and use empty string for tag.\nYou can change this by passing arguments. ::\n\n fluent = FluentSender('fluent.example.com', 10000, 'pyfluent')\n fluent.send('Hello pyfluent!')\n\nAbove examples, we passed string as argument of FluentSender.send.\nFor convenience, FluentSender.send make dict automatically before sending.\n\nOn the other hand, you can pass dict as argument. ::\n\n fluent.send({'hello': 'fluent'})\n\nAdditionally, you can change tag and timestamp of each message if you want. ::\n\n import time\n fluent.send({'hello': 'fluent'}, 'pyfluent.info', time.time() - 60)\n\nlogging\n=======\nSince pyfluent logging library implemented like python standard logging library,\nit is very easy to introduce pyfluent into existing programs.\n\nHere is a basic usage::\n\n import logging\n from pyfluent.logging import SafeFluentHandler\n handler = SafeFluentHandler('localhost', 24224, 'pyfluent')\n handler.setLevel(logging.INFO)\n logger = logging.getLogger()\n logger.setLevel(logging.INFO)\n logger.addHandler(handler)\n logger.info('hello pyfluent!')\n\nYou can obtain a json message like below through fluentd. ::\n\n 2012-03-02 11:50:46 +0900 pyfluent.info: {\"message\":\"hello pyfluent!\"}\n\nAs you can see, FluentHandler automatically append log level to the tag.\n\nFor convenience, pyfluent provide FluentFormatter to emit more information. ::\n\n from pyfluent.logging import FluentFormatter\n formatter = FluentFormatter('%(asctime)s %(levelname)s %(message)s')\n handler.setFormatter(formatter)\n logger.info('get more information')\n\nYou can obtain a json message like below. ::\n\n 2012-03-02 11:52:18 +0900 pyfluent.info: {\"threadName\":\"MainThread\",\"name\":\"r\n oot\",\"process\":88908,\"hostname\":\"host.example.com\",\"module\":\"\",\"filename\":\"\",\"processName\":\"\n MainProcess\",\"pathname\":\"\",\"lineno\":1,\"exc_tex\n t\":null,\"message\":\"2012-03-02 12:35:18,321 INFO get more information\",\"funcNa\n me\":\"\",\"levelname\":\"info\"}\n\nThe default behavior is emit all items in __dict__ of LogRecord except ``args``, ``asctime``, ``created``, ``exc_info``, ``levelno``, ``msecs``, ``msg``, ``relativeCreated``, ``thread`` and ``message``. It is customizable if you want, for example, except ``threadName``, ``module``, ``filename``, ``processName``, ``pathname``, ``lineno`` and ``funcName`` in addition to the default. ::\n\n formatter.exclude += ['threadName', 'module', 'filename', 'process',\n 'processName', 'pathname', 'lineno', 'funcName']\n logger.info('suppress unnecessary information')\n\nAs a result, you can obtain like below. ::\n\n 2012-03-02 11:54:21 +0900 pyfluent.info: {\"exc_text\":null,\"message\":\"2012-03-\n 02 14:23:21,504 INFO suppress unnecessary information\",\"hostname\":\"host.examp\n le.com\",\"name\":\"root\",\"levelname\":\"info\"}\n\nPlease note that:\n\n - ``hostname`` is added automatically by FluentFormatter, so you cannot remove ``hostname`` from output information.\n - ``created`` is converted to the fluentd's time.\n\nHistory\n=======\n0.2.1 (2019-01-10)\n - Improve reliability\n\n0.2.0 (2012-04-21)\n - Add FluentSender.\n - Rewrite SafeFluentHandler to use FluentSender internally.\n - Change license to Apache License, Version 2.0 from MIT License.\n\n0.1.2 (2012-03-02)\n - Support python 2.5, 2.6, 3.0, 3.1, 3.2.\n\n0.1.1 (2012-02-26)\n - Fix issue on install from PyPI.\n\n0.1.0 (2012-02-26)\n - First release.",
"description_content_type": "",
"docs_url": null,
"download_url": "",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/yosisa/pyfluent",
"keywords": "logging,fluentd,json",
"license": "MIT",
"maintainer": "",
"maintainer_email": "",
"name": "pyfluent",
"package_url": "https://pypi.org/project/pyfluent/",
"platform": "",
"project_url": "https://pypi.org/project/pyfluent/",
"project_urls": {
"Homepage": "https://github.com/yosisa/pyfluent"
},
"release_url": "https://pypi.org/project/pyfluent/0.2.1/",
"requires_dist": null,
"requires_python": "",
"summary": "A python client library for Fluentd",
"version": "0.2.1"
},
"last_serial": 4681111,
"releases": {
"0.1.1": [
{
"comment_text": "",
"digests": {
"md5": "ed26a943cf25446b1ac0583569adbaf0",
"sha256": "b5235103cc0fb58891f32d1ec11ed41ca98911d887ae87bac5f1dfbd29d1429c"
},
"downloads": -1,
"filename": "pyfluent-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "ed26a943cf25446b1ac0583569adbaf0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 2707,
"upload_time": "2012-02-26T03:21:18",
"url": "https://files.pythonhosted.org/packages/e8/9c/853d00ae84c21d6e328f8a9d678dcd6e5821799ccee5f594dbacb12f96fc/pyfluent-0.1.1.tar.gz"
}
],
"0.1.2": [
{
"comment_text": "",
"digests": {
"md5": "0632000570861726f870d734d97aae90",
"sha256": "af70638b90369c7cabdbed8a54db7997aa2e21773a819cf4f330494c256bce9f"
},
"downloads": -1,
"filename": "pyfluent-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "0632000570861726f870d734d97aae90",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3798,
"upload_time": "2012-03-02T13:06:28",
"url": "https://files.pythonhosted.org/packages/3d/c1/101c42e3513a335a1119b21ee411f2740be19b88d30e9c1d22b9754db429/pyfluent-0.1.2.tar.gz"
}
],
"0.2.0": [
{
"comment_text": "",
"digests": {
"md5": "24f519627b530bdb7ebf0fa022ff4ab5",
"sha256": "fc3f183e1346a5da7ab17edd30ad228168ed66958693dc22d78e871580bd7ce6"
},
"downloads": -1,
"filename": "pyfluent-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "24f519627b530bdb7ebf0fa022ff4ab5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 5150,
"upload_time": "2012-04-21T10:01:49",
"url": "https://files.pythonhosted.org/packages/9c/aa/f9c61e221413064ba8be9f133161e73f139dc6669f2deb646303067b58cf/pyfluent-0.2.0.tar.gz"
}
],
"0.2.1": [
{
"comment_text": "",
"digests": {
"md5": "3fd68c0c7cc4a80808fac3cd4e02896b",
"sha256": "b212e7a8de90fb6b86a9f04c15ff0a89d67a73f8ffe4308002bd773bf09dd1f2"
},
"downloads": -1,
"filename": "pyfluent-0.2.1.tar.gz",
"has_sig": false,
"md5_digest": "3fd68c0c7cc4a80808fac3cd4e02896b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 5400,
"upload_time": "2019-01-10T13:42:01",
"url": "https://files.pythonhosted.org/packages/06/4b/96f9ac3237ed70648da3194c8da59c514c4a325031f32948b9b1a99b950a/pyfluent-0.2.1.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "3fd68c0c7cc4a80808fac3cd4e02896b",
"sha256": "b212e7a8de90fb6b86a9f04c15ff0a89d67a73f8ffe4308002bd773bf09dd1f2"
},
"downloads": -1,
"filename": "pyfluent-0.2.1.tar.gz",
"has_sig": false,
"md5_digest": "3fd68c0c7cc4a80808fac3cd4e02896b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 5400,
"upload_time": "2019-01-10T13:42:01",
"url": "https://files.pythonhosted.org/packages/06/4b/96f9ac3237ed70648da3194c8da59c514c4a325031f32948b9b1a99b950a/pyfluent-0.2.1.tar.gz"
}
]
}