{ "info": { "author": "Antonin Bourguignon", "author_email": "antonin.bourguignon@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "# lineprotocol\n\nExport data to InfluxDB's Line Protocol format based on specified input data structure (columns names) and desired output (measurement, fields, tags, timestamp).\n\nAny data going through the exporter is sanitized according to Influx's recommendations:\nhttps://docs.influxdata.com/influxdb/v1.0/write_protocols/line_protocol_tutorial/#data-types\nhttps://docs.influxdata.com/influxdb/v1.0/write_protocols/line_protocol_tutorial/#special-characters-and-keywords\n\nInfluxDB's Line Protocol documentation can be found here:\nhttps://docs.influxdata.com/influxdb/v1.0/write_protocols/\n\n\n## Usage\n\n from lineprotocol import LineProtocolExporter\n\n\n input = [\n ['1', 'foo', 'x', '24', '50.2', 'True'],\n ['2', 'bar', 'y', '25', '17.0', 'True'],\n ['3', 'baz', 'z', '26', '100', 'False'],\n ]\n\n\n exporter = LineProtocolExporter(\n labels=['id', 'name', 'some_letter', 'some_number', 'percentage', 'status'],\n measurement='example',\n tag_columns=['some_letter'],\n field_columns=['id', 'name', 'percentage', 'status'],\n field_types=['int', 'str', 'float', 'bool'],\n timestamp=1465839830100400200,\n )\n\n for line in input:\n print exporter.export(line)\n\n\n # Output:\n # example,some_letter=x id=1i,name=\"foo\",percentage=50.2,status=True 1465839830100400200\n # example,some_letter=y id=2i,name=\"bar\",percentage=17.0,status=True 1465839830100400200\n # example,some_letter=z id=3i,name=\"baz\",percentage=100,status=False 1465839830100400200\n\n## Running tests\n\n $ python -m unittest tests.smoke_test\n", "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/qn7o/lineprotocol", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "lineprotocol", "package_url": "https://pypi.org/project/lineprotocol/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/lineprotocol/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/qn7o/lineprotocol" }, "release_url": "https://pypi.org/project/lineprotocol/0.1.dev0/", "requires_dist": null, "requires_python": null, "summary": "Export data to InfluxDB's Line Protocol format", "version": "0.1.dev0" }, "last_serial": 2424168, "releases": { "0.1.dev0": [ { "comment_text": "", "digests": { "md5": "6189058a0a5f57054cbc66f1b3fd0533", "sha256": "1f89007984423f6973d0a22d148e26abc7abd375354129ab18ddfba34d7300e5" }, "downloads": -1, "filename": "lineprotocol-0.1.dev0.tar.gz", "has_sig": false, "md5_digest": "6189058a0a5f57054cbc66f1b3fd0533", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4690, "upload_time": "2016-10-26T13:49:45", "url": "https://files.pythonhosted.org/packages/2c/c3/816794c3f7cb5a84eb21939f52dc7ab7ed7184d494c6198b6b1bee3fbad2/lineprotocol-0.1.dev0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6189058a0a5f57054cbc66f1b3fd0533", "sha256": "1f89007984423f6973d0a22d148e26abc7abd375354129ab18ddfba34d7300e5" }, "downloads": -1, "filename": "lineprotocol-0.1.dev0.tar.gz", "has_sig": false, "md5_digest": "6189058a0a5f57054cbc66f1b3fd0533", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4690, "upload_time": "2016-10-26T13:49:45", "url": "https://files.pythonhosted.org/packages/2c/c3/816794c3f7cb5a84eb21939f52dc7ab7ed7184d494c6198b6b1bee3fbad2/lineprotocol-0.1.dev0.tar.gz" } ] }