{ "info": { "author": "Charles Watkins", "author_email": "charles@titandws.com", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.7" ], "description": "# flextable\n\ntabular data formatter, for code, cli or pipes\n\n## Purpose\n\nPrimarilary developed for ddb. It seemed prudent to seperate the concerns involved into different projects\n\n### Pipe a file into a table\n\n```bash\ncat file | flextable -d ',' -cc 9\n```\n\n### From the Terminal or Script\n\n- This will load a text file \n- that has a ',' delimiter \n- starting at line 1\n- for 10 lines\n- with a column count of 9\n- from a file named MOCK_DATA.csv\n\n```bash\nflextable -d , --line 1 --length 10 -cc 9 --file MOCK_DATA.csv\n```\n\n### format with code\n\n```python\nimport flextable\n\n\n config = flextable.table_config()\n config.columns = ['column1','column2','column3','column4','column5','column6']\n results=[some python object with an array of arrays]\n flextable.table(data=results, args=config)\n```\n\n### Configuration\n\n- flextanble accepts switches and environment variables\n- switches take precidence\n\n### Options\n\n|Short|Long |Default| Description |\n|----|-----------------|-------|------------------------------------------------------------|\n| |--file | | The input file to read |\n|-c |--columns | | column names, comma seperated |\n|-cc |--column-count | | column count, auto names columns 1-n |\n|-hol|--header-on-line | | auto populate column count/names from this row |\n|-rq |--remove-quote |True | unwrap fields with block quotes |\n|-bq |--block-quote | | field block quote identifier |\n|-ds |--data-on-line |1 | data starts on this line |\n|-bs |--border-style |SINGLE | change table style, SINGLE, DOUBBLE, ASCII |\n|-nft|--no-footer |True | dont show the footer |\n|-nhd|--no-header |True | dont show header |\n|-ftc|--footer-columns |True | footer has column names |\n|-hde|--header-every | | show header every (n) rows |\n|-e |--error |True | rows with invalid number of columns are considered errors |\n|-cm |--comment |'#' | character that denotes line is comment |\n|-d |--delimiter |',' | field delimiter |\n|-he |--hide-errors |False | do not display errors |\n|-hc |--hide-comments |False | do not display comments |\n|-hw |--hide-whitespace|False | do not display whitespace |\n|-l |--line |1 | line number to start displaying data |\n|-len|--length | | number of lines to show, hidden elements count |\n|-p |--page | | page to start displaying, requires length parameter |\n|-ow |--width | auto | width of output in characters, if not specified calculated |\n|-oh |--height | | height of output window in characters |\n|-nc |--no-color |False | disale color output |\n|-o |--output |ASCII | ASCII, YAML, JSON |\n\n\n## Environment vars\n\n|Long |Environment Var |\n|-----------------|------------------|\n|--file |FT_FILE |\n|--columns |FT_COLUMNS |\n|--column-count |FT_COLUMN_COUNT |\n|--header-on-line |FT_HEADER_ON_LINE |\n|--remove-quote |FT_REMOVE_QUOTE |\n|--block-quote |FT_BLOCK_QUOTE |\n|--data-on-line |FT_DATA_ON_LINE |\n|--border-style |FT_BORDER_STYLE |\n|--no-footer |FT_NO_FOOTER |\n|--no-header |FT_NO_HEADER |\n|--footer-columns |FT_FOOTER_COLUMNS |\n|--header-every |FT_HEADER_EVERY |\n|--error |FT_ERROR |\n|--comment |FT_COMMENT |\n|--delimiter |FT_DELIMITER |\n|--hide-errors |FT_HIDE_ERRORS |\n|--hide-comments |FT_HIDE_COMMENTS |\n|--hide-whitespace|FT_HIDE_WHITESPACE|\n|--line |FT_LINE |\n|--length |FT_LENGTH |\n|--page |FT_PAGE |\n|--width |FT_WIDTH |\n|--height |FT_HEIGHT |\n|--no-color |FT_NO_COLOR |\n|--output |FT_OUTPUT |\n\n### CLI Results\n\n```text\n #flextable MOCK_DATA.csv -l 1 -len 10 -cc 6 -d , \n\u250c\u2524column1 \u251c\u252c\u2524column2 \u251c\u252c\u2524column3 \u251c\u252c\u2524column4 \u251c\u252c\u2524column5 \u251c\u252c\u2524column6 \u251c\u2510\n\u2502id \u2502first_name \u2502last_name \u2502email \u2502gender \u2502ip_address \u2502\n\u25022 \u2502Redford \u2502Ornils \u2502rornils1@amaz\u2502Male \u250224.42.186.82 \u2502\n\u25023 \u2502Grenville \u2502Buckley \u2502gbuckley2@giz\u2502Male \u2502143.223.126.2\u2502\n\u25024 \u2502Thalia \u2502Badrock \u2502tbadrock3@xin\u2502Female \u2502113.57.179.78\u2502\n\u25025 \u2502Julie \u2502Minchell \u2502jminchell4@sk\u2502Female \u2502105.165.149.1\u2502\n\u25026 \u2502Lancelot \u2502Archibold \u2502larchibold5@p\u2502Male \u2502213.155.189.4\u2502\n\u25027 \u2502Bernie \u2502Matteucci \u2502bmatteucci6@b\u2502Male \u2502109.156.49.36\u2502\n\u25028 \u2502Flinn \u2502Mulchrone \u2502fmulchrone7@n\u2502Male \u250222.84.116.46 \u2502\n\u25029 \u2502Seamus \u2502Tocque \u2502stocque8@cnet\u2502Male \u250279.30.35.75 \u2502\n\u250210 \u2502Lazare \u2502Abbett \u2502labbett9@who.\u2502Male \u250217.173.76.145\u2502\n\u2514[column1 ]\u2534[column2 ]\u2534[column3 ]\u2534[column4 ]\u2534[column5 ]\u2534[column6 ]\u2518\n\n```\n\n## JSON RESULTS\n\n```json\n#flextable MOCK_DATA.csv -l 1 -len 10 -cc 6 -d , -o json\n{\"header\": [\"column1\", \"column2\", \"column3\", \"column4\", \"column5\", \"column6\"], \"rows\": [{\"type\": 3, \"data\": [\"id\", \"first_name\", \"last_name\", \"email\", \"gender\", \"ip_address\"], \"file_line_number\": 1, \"error\": null}, {\"type\": 3, \"data\": [\"2\", \"Redford\", \"Ornils\", \"rornils1@amazon.co.uk\", \"Male\", \"24.42.186.82\"], \"file_line_number\": 2, \"error\": null}, {\"type\": 3, \"data\": [\"3\", \"Grenville\", \"Buckley\", \"gbuckley2@gizmodo.com\", \"Male\", \"143.223.126.204\"], \"file_line_number\": 3, \"error\": null}, {\"type\": 3, \"data\": [\"4\", \"Thalia\", \"Badrock\", \"tbadrock3@xinhuanet.com\", \"Female\", \"113.57.179.78\"], \"file_line_number\": 4, \"error\": null}, {\"type\": 3, \"data\": [\"5\", \"Julie\", \"Minchell\", \"jminchell4@skyrock.com\", \"Female\", \"105.165.149.121\"], \"file_line_number\": 5, \"error\": null}, {\"type\": 3, \"data\": [\"6\", \"Lancelot\", \"Archibold\", \"larchibold5@pinterest.com\", \"Male\", \"213.155.189.44\"], \"file_line_number\": 6, \"error\": null}, {\"type\": 3, \"data\": [\"7\", \"Bernie\", \"Matteucci\", \"bmatteucci6@bravesites.com\", \"Male\", \"109.156.49.36\"], \"file_line_number\": 7, \"error\": null}, {\"type\": 3, \"data\": [\"8\", \"Flinn\", \"Mulchrone\", \"fmulchrone7@naver.com\", \"Male\", \"22.84.116.46\"], \"file_line_number\": 8, \"error\": null}, {\"type\": 3, \"data\": [\"9\", \"Seamus\", \"Tocque\", \"stocque8@cnet.com\", \"Male\", \"79.30.35.75\"], \"file_line_number\": 9, \"error\": null}, {\"type\": 3, \"data\": [\"10\", \"Lazare\", \"Abbett\", \"labbett9@who.int\", \"Male\", \"17.173.76.145\"], \"file_line_number\": 10, \"error\": null}]}\n\n```\n\n### YAML RESULTS\n\n```yaml\n#flextable MOCK_DATA.csv -l 1 -len 10 -cc 6 -d , -o yaml\nheader: [column1, column2, column3, column4, column5, column6]\nrows:\n- data: [id, first_name, last_name, email, gender, ip_address]\n error: null\n file_line_number: 1\n type: 3\n- data: ['2', Redford, Ornils, rornils1@amazon.co.uk, Male, 24.42.186.82]\n error: null\n file_line_number: 2\n type: 3\n- data: ['3', Grenville, Buckley, gbuckley2@gizmodo.com, Male, 143.223.126.204]\n error: null\n file_line_number: 3\n type: 3\n- data: ['4', Thalia, Badrock, tbadrock3@xinhuanet.com, Female, 113.57.179.78]\n error: null\n file_line_number: 4\n type: 3\n- data: ['5', Julie, Minchell, jminchell4@skyrock.com, Female, 105.165.149.121]\n error: null\n file_line_number: 5\n type: 3\n- data: ['6', Lancelot, Archibold, larchibold5@pinterest.com, Male, 213.155.189.44]\n error: null\n file_line_number: 6\n type: 3\n- data: ['7', Bernie, Matteucci, bmatteucci6@bravesites.com, Male, 109.156.49.36]\n error: null\n file_line_number: 7\n type: 3\n- data: ['8', Flinn, Mulchrone, fmulchrone7@naver.com, Male, 22.84.116.46]\n error: null\n file_line_number: 8\n type: 3\n- data: ['9', Seamus, Tocque, stocque8@cnet.com, Male, 79.30.35.75]\n error: null\n file_line_number: 9\n type: 3\n- data: ['10', Lazare, Abbett, labbett9@who.int, Male, 17.173.76.145]\n error: null\n file_line_number: 10\n type: 3\n```", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/chris17453/flextable/", "keywords": "", "license": "Creative Commons Attribution-Noncommercial-Share Alike license", "maintainer": "", "maintainer_email": "", "name": "flextable", "package_url": "https://pypi.org/project/flextable/", "platform": "", "project_url": "https://pypi.org/project/flextable/", "project_urls": { "Homepage": "https://github.com/chris17453/flextable/" }, "release_url": "https://pypi.org/project/flextable/1.0.43/", "requires_dist": null, "requires_python": "", "summary": "", "version": "1.0.43" }, "last_serial": 4607718, "releases": { "1.0.43": [ { "comment_text": "", "digests": { "md5": "67ae151ed9d1c89602398ef95e1b82dd", "sha256": "40f8e0e8c863cb6d78a514cde359d8cb7814b4622a3f449325de780f9e213553" }, "downloads": -1, "filename": "flextable-1.0.43.tar.gz", "has_sig": false, "md5_digest": "67ae151ed9d1c89602398ef95e1b82dd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12413, "upload_time": "2018-12-17T02:43:07", "url": "https://files.pythonhosted.org/packages/c6/dc/2ed77aaccd0281812aea0bb6eab745f68d432f34b17971cbfdda32ca1fea/flextable-1.0.43.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "67ae151ed9d1c89602398ef95e1b82dd", "sha256": "40f8e0e8c863cb6d78a514cde359d8cb7814b4622a3f449325de780f9e213553" }, "downloads": -1, "filename": "flextable-1.0.43.tar.gz", "has_sig": false, "md5_digest": "67ae151ed9d1c89602398ef95e1b82dd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12413, "upload_time": "2018-12-17T02:43:07", "url": "https://files.pythonhosted.org/packages/c6/dc/2ed77aaccd0281812aea0bb6eab745f68d432f34b17971cbfdda32ca1fea/flextable-1.0.43.tar.gz" } ] }