{ "info": { "author": "PayScale, Inc.", "author_email": "pypi@payscale.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 3.7", "Topic :: Scientific/Engineering" ], "description": "# Fables - (F)ile T(ables)\n\n[![CircleCI](https://circleci.com/gh/payscale/fables.svg?style=svg)](https://circleci.com/gh/payscale/fables)\n[![Apache2.0License](https://img.shields.io/hexpm/l/plug.svg)](LICENSE)\n[![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)\n\n\n## For users:\n\nParse the tabular data in the input file:\n```\nimport fables\n\nfor parse_result in fables.parse('myfile.zip'):\n for table in parse_result.tables:\n print(table.name)\n print(table.df.head())\n for error in parse_result.errors:\n print(error.message)\n```\n\nInspect the contents of the input file:\n```\nnode = fables.detect('myfile.zip')\nprint(node.name)\nprint(node.mimetype)\n\nfor child in node.children:\n print(child.name)\n print(child.mimetype)\n```\n\nNote if you've already discovered the input tree from `detect()`,\nyou can pass it into `parse()`:\n```\nparse_results = parse(tree=node)\n```\n\nHandling encrypted `zip`, `xlsx`, and `xls` files:\n```\nnode = fables.detect('encrypted.xlsx')\nassert node.encrypted\nnode.add_password('encrypted.xlsx', 'fables')\nassert not node.encrypted\n```\nYou can also supply a passwords dictionary (filename -> password) \ninto detect and parse:\n```\nnode = fables.detect(\n 'encrypted.zip',\n passwords={\n 'encrypted.zip': 'fables',\n # an encrypted file inside the zip\n 'encrypted.xlsx': 'foobles',\n }\n)\n# and/or parse\nparse_results = fables.parse(\n 'sub_dir',\n passwords={\n 'sub_dir/encrypted.xlsx': 'fables',\n 'sub_dir/encrypted.xls': 'foobles',\n },\n)\n```\n\n\n### Installation\nThe python library [`python-magic`](https://github.com/ahupp/python-magic)\nrequires additional system dependencies. There are installation instructions\nthere, but here are recommended routes to try:\n\n- on OSX: `brew install libmagic`.\n\n- on Windows: [this](https://pypi.org/project/python-magic-bin/)\n`pip install python-magic-bin` will install a built version using\nctypes to access the libmagic file type identification library.\n\nThen `pip install -r requirements.txt` should do the trick.\n\n## For contributors:\n\n### Tests\n- all tests: `pytest`\n - coverage: `pytest --cov=fables tests`\n- integration: `pytest tests/integration`\n - coverage: `pytest --cov=fables tests/integration`\n- unit: `pytest tests/unit`\n - coverage: `pytest --cov=fables tests/unit`\n\nNote all the coverage statistics are for statements.\n\n### Type checking with mypy\n- `mypy fables` \n\n### Linting\n- We enforce flake8:\n - `flake8 .`\n\n### Run test, type checking, and linter all at once\n- `nox`\n\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/payscale/fables", "keywords": "", "license": "Apache 2.0", "maintainer": "", "maintainer_email": "", "name": "fables", "package_url": "https://pypi.org/project/fables/", "platform": "", "project_url": "https://pypi.org/project/fables/", "project_urls": { "Homepage": "https://github.com/payscale/fables" }, "release_url": "https://pypi.org/project/fables/1.1.0/", "requires_dist": [ "pandas (==0.25.1)", "chardet (==3.0.4)", "python-magic (==0.4.15)", "xlrd (==1.2.0)", "msoffcrypto-tool (==4.6.4)", "python-magic-bin (==0.4.14) ; platform_system == \"Windows\"" ], "requires_python": "", "summary": "(F)ile T(ables)", "version": "1.1.0" }, "last_serial": 5858856, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "da5faab26cede6f76a34b5e0c27c7f40", "sha256": "773fc35579f274acd01b8ed72e8f1078fb6747c63a2f1f908b794431a9dc25db" }, "downloads": -1, "filename": "fables-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "da5faab26cede6f76a34b5e0c27c7f40", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 16165, "upload_time": "2019-05-08T20:30:16", "url": "https://files.pythonhosted.org/packages/59/ff/dd2786c006a60afd051a78e99912e14cb42821f84d300f49a128aa4389ac/fables-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f2a8327a01557d26ac202ca827fe3e10", "sha256": "564e94a3b0f2604b45e29b3d748e2d60820e547c656f55153b7d338e9804ffd2" }, "downloads": -1, "filename": "fables-0.0.1.tar.gz", "has_sig": false, "md5_digest": "f2a8327a01557d26ac202ca827fe3e10", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10986, "upload_time": "2019-05-08T20:30:18", "url": "https://files.pythonhosted.org/packages/c7/f8/2180a1e4df6e6dd67b47c77fb12d07cde8419c686231c1d82393ab656816/fables-0.0.1.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "7626661c3fea70ee38516dfaab874fc9", "sha256": "7403de6c9c6978ae12fef85fd5314354abd5eba761597492b14781301bc5a0a3" }, "downloads": -1, "filename": "fables-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "7626661c3fea70ee38516dfaab874fc9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 16404, "upload_time": "2019-09-03T23:57:00", "url": "https://files.pythonhosted.org/packages/23/4d/790219330b9aa92e9a558c8ac8190511c9ed546bca03102919dfba2492c7/fables-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "60ce403c19cdb6dbc555b7d60d9fcc3a", "sha256": "389efff7cf93308ff8a4aa3209539f9d6c12f6458ee251e35c90b68f020b767f" }, "downloads": -1, "filename": "fables-1.0.0.tar.gz", "has_sig": false, "md5_digest": "60ce403c19cdb6dbc555b7d60d9fcc3a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11370, "upload_time": "2019-09-03T23:57:01", "url": "https://files.pythonhosted.org/packages/2f/8b/a0854d491b2d5e97c5e09d421dec74f9f434900ce1036f0cc228b269c54c/fables-1.0.0.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "94810a12ef759d46f58f6ee15eeb9085", "sha256": "056d88187b7fe65931367c2a0eb70a73e15a04961c13042ef15ceca0f8b07b21" }, "downloads": -1, "filename": "fables-1.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "94810a12ef759d46f58f6ee15eeb9085", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 16522, "upload_time": "2019-09-19T21:18:14", "url": "https://files.pythonhosted.org/packages/87/64/98b8677836f260f0709c57eb3a95e0961b71a24808b48edf1d9aeef219de/fables-1.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1ecbc8bf8f530bd78987a1c478147ad1", "sha256": "7e9b7e793bb7e4c0f78b2767ad8845505253a1c6e77cccf6ca4f2ab0a4ef0029" }, "downloads": -1, "filename": "fables-1.1.0.tar.gz", "has_sig": false, "md5_digest": "1ecbc8bf8f530bd78987a1c478147ad1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11480, "upload_time": "2019-09-19T21:18:16", "url": "https://files.pythonhosted.org/packages/bc/ab/08511a36be6001dbd33801c5504c80f9c15b92651d9b781c4d18a1b02f2b/fables-1.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "94810a12ef759d46f58f6ee15eeb9085", "sha256": "056d88187b7fe65931367c2a0eb70a73e15a04961c13042ef15ceca0f8b07b21" }, "downloads": -1, "filename": "fables-1.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "94810a12ef759d46f58f6ee15eeb9085", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 16522, "upload_time": "2019-09-19T21:18:14", "url": "https://files.pythonhosted.org/packages/87/64/98b8677836f260f0709c57eb3a95e0961b71a24808b48edf1d9aeef219de/fables-1.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1ecbc8bf8f530bd78987a1c478147ad1", "sha256": "7e9b7e793bb7e4c0f78b2767ad8845505253a1c6e77cccf6ca4f2ab0a4ef0029" }, "downloads": -1, "filename": "fables-1.1.0.tar.gz", "has_sig": false, "md5_digest": "1ecbc8bf8f530bd78987a1c478147ad1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11480, "upload_time": "2019-09-19T21:18:16", "url": "https://files.pythonhosted.org/packages/bc/ab/08511a36be6001dbd33801c5504c80f9c15b92651d9b781c4d18a1b02f2b/fables-1.1.0.tar.gz" } ] }