{ "info": { "author": "Andrew Roden", "author_email": "andrew.roden@crowdstrike.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "EAM CSV to JSON\n=================\n\nExample script for converting data from EAM, i.e. splunk, CSV files to json. \nThis provides a useful example of how to export and use data.\n\n usage: eamcsv2json [-h] -i INPUT [-o OUTPUT] [-e ERRORS] [-l LOG] [-c CONFIG]\n [-t TYPE_COLUMN]\n\n EAM (Splunk) CSV to JSON conversion script meant to handle larger files with\n potential errors. New lines and quotes are handled gracefully when data\n fields are quoted in double quotes (\") and escaped with backslash (\\).\n This is outside RFC-4180 specification\n\n optional arguments:\n -h, --help show this help message and exit\n -i INPUT, --input INPUT\n CSV file name to be read\n -o OUTPUT, --output OUTPUT\n (optional) Output file name; else stdout\n -e ERRORS, --errors ERRORS\n (optional) Error file name; when provided CSV 3 lines\n of context will be printed. Default is content to log\n file only\n -l LOG, --log LOG (optional) Log file name; when provided log message\n will go to file. Default is stderr\n -c CONFIG, --config CONFIG\n (optional) Configuration for type mappings; else first\n row is considered for labels. When provided type\n column setting is used\n -t TYPE_COLUMN, --type-column TYPE_COLUMN\n (optional) When config set use this column to expect\n type mapping. Default 4\n\nInstall\n-------\n\n pip install eamcsv2json\n\n\nLibrary\n-------\nAvailable for usage as library\n\n from eamcsv2json.eamcsv2dict import EamCsv2Dict\n\n type_mappings = {\n 'TypeA': ['field1', 'field2'],\n 'TypeB': ['fieldA', 'fieldB'],\n }\n converter = EamCsv2Dict('input.csv', 'error.csv', type_mappings, 2)\n for a_dict in converter.covert():\n print(a_dict)\n\n\nExamples\n-------\n\nConvert data with first row as columns\n\n eamcsv2json --input ./data/20180629_test2.csv -e ./errors.txt\n\n\nConvert data with a type mapping and CSV error lines going to a file\n\n eamcsv2json \\\n --input ./data/main10M.csv \\\n --errors ./data/main10M-errors.txt \\\n --config ./data/transforms.conf \\\n --output ./data/main10M.json\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/crowdstrike/eamcsv2json", "keywords": "", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "eamcsv2json", "package_url": "https://pypi.org/project/eamcsv2json/", "platform": "", "project_url": "https://pypi.org/project/eamcsv2json/", "project_urls": { "Homepage": "https://github.com/crowdstrike/eamcsv2json" }, "release_url": "https://pypi.org/project/eamcsv2json/1.0.5/", "requires_dist": null, "requires_python": "", "summary": "Converts EAM CSV export to JSON", "version": "1.0.5" }, "last_serial": 4027133, "releases": { "1.0.5": [ { "comment_text": "", "digests": { "md5": "bfe920051b31f81ef94d5c2a6d52e6e2", "sha256": "2d2c1c245cb8e1032e71b05594ac5eb7dcfd1d0a20114cd7325cc70dcbc67e02" }, "downloads": -1, "filename": "eamcsv2json-1.0.5-py2-none-any.whl", "has_sig": false, "md5_digest": "bfe920051b31f81ef94d5c2a6d52e6e2", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 6714, "upload_time": "2018-07-03T16:59:08", "url": "https://files.pythonhosted.org/packages/ec/92/1c3812cb08ea5931db10ab9f6e8a09f406b9f958a33baa1054a8a780e0dc/eamcsv2json-1.0.5-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4a5e911ce244c2f0e72abf78848e1f4d", "sha256": "21e6a5332ef2061a6577f5127510bdb9f888377c3c245e4dfb0709c70d4c1354" }, "downloads": -1, "filename": "eamcsv2json-1.0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "4a5e911ce244c2f0e72abf78848e1f4d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6717, "upload_time": "2018-07-03T16:59:09", "url": "https://files.pythonhosted.org/packages/e5/d8/c6017cbda4185687b479e9a82610b1841210e99a313a66ba91d1374502ce/eamcsv2json-1.0.5-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "bfe920051b31f81ef94d5c2a6d52e6e2", "sha256": "2d2c1c245cb8e1032e71b05594ac5eb7dcfd1d0a20114cd7325cc70dcbc67e02" }, "downloads": -1, "filename": "eamcsv2json-1.0.5-py2-none-any.whl", "has_sig": false, "md5_digest": "bfe920051b31f81ef94d5c2a6d52e6e2", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 6714, "upload_time": "2018-07-03T16:59:08", "url": "https://files.pythonhosted.org/packages/ec/92/1c3812cb08ea5931db10ab9f6e8a09f406b9f958a33baa1054a8a780e0dc/eamcsv2json-1.0.5-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4a5e911ce244c2f0e72abf78848e1f4d", "sha256": "21e6a5332ef2061a6577f5127510bdb9f888377c3c245e4dfb0709c70d4c1354" }, "downloads": -1, "filename": "eamcsv2json-1.0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "4a5e911ce244c2f0e72abf78848e1f4d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6717, "upload_time": "2018-07-03T16:59:09", "url": "https://files.pythonhosted.org/packages/e5/d8/c6017cbda4185687b479e9a82610b1841210e99a313a66ba91d1374502ce/eamcsv2json-1.0.5-py3-none-any.whl" } ] }