{ "info": { "author": "Joe Cabrera", "author_email": "jcabrera@eminorlabs.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Topic :: Office/Business :: Financial", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "|PyPI version| |Travis-CI| |license|\n\n**python-xbrl** is a library for parsing\n`xbrl `__\ndocuments providing output as both a basic model object and serialized\nobjects thur\n`marshmallow `__ for\nrendering into standards formats like JSON or HTTP API\n\nInstallation\n------------\n\nThe easiest way to install python-xbrl is with pip\n\n::\n\n pip install python-xbrl\n\nOr install the latest dev version from github (or replace `@master` with a \n`release vergitsion like @v1.1.0 `__)\n\n::\n \n pip install git+https://github.com/greedo/python-xbrl.git@master\n \nOr\n\n::\n\n git clone https://github.com/greedo/python-xbrl.git\n\nOr\n\nCopy the python-xbrl directory into your python path. Zip \n`here `__\n \nMade sure your **sys.path** is correct.\n\nRequirements\n------------\n\n- Python >= 2.6 or >= 3.3\n\npython-xbrl relies on `beautifulsoup4 `__ \nwhich sits on top of the python XML parser `lxml `__. It also requires \n`marshmallow `__ for serializing objects.\nFor more details see `requirements.txt `__\n\nFor PyPI support it is recommended you use `https://github.com/amauryfa/lxml `__ for lxml as this is a fork that uses cffi instead of the python capi.\n\nInitialization\n--------------\n\nTo start using the library, first import the ``XBRLParser``\n\n::\n\n from xbrl import XBRLParser, GAAP, GAAPSerializer\n\nSimple Parsing Workflow\n-----------------------\n\nFirst parse the incoming XRBL file into a new ``XBRL`` basic object\n\n::\n\n xbrl_parser = XBRLParser()\n xbrl = xbrl_parser.parse(file(\"sam-20131228.xml\"))\n\nThen you can parse the document using different parsers\n\n::\n\n gaap_obj = xbrl_parser.parseGAAP(xbrl, doc_date=\"20131228\", context=\"current\", ignore_errors=0)\n\nNow we have a ``GAAP`` model object that has the GAAP parsed elements\nfrom the document.\n\nThis model object supports the several different features including:\n\n- ``context`` current, year, and instant contexts are supported. If available you can also get previous quarter information by number of days from doc date. Example: 90, 180, etc.\n- Error handling. ``0`` raise exception for all parsing errors and halt parsing, ``1`` Supress all parsing errors and continue parsing, ``2`` Log all parsing errors and continue parsing \n\nYou can serialize the GAAP model object into a serialized object\nacceptable for rending into a standard format such as JSON or HTTP API.\n\n::\n\n serializer = GAAPSerializer()\n result = serializer.dump(gaap_obj)\n\nYou can also just view the data in the serialized object\n\n::\n\n print result.data\n\nYou can apply various parsers to the base ``XBRLParser`` object to get\ndifferent data than just GAAP data from the document. In addition as\nexpected you can also create different serialized objects on the\nresulting parsed data object.\n\n\n**Extracting DEI Data**\n\n::\n \n dei_obj = xbrl_parser.parseDEI(xbrl)\n serializer = DEISerializer()\n result = serializer.dump(dei_obj)\n \n**Extracting Custom Data**\n\n::\n \n custom_obj = xbrl_parser.parseCustom(xbrl)\n print custom_obj()\n\nTesting\n-------\n\nTo run the unit tests, you need pytest\n\n::\n\n pip install pytest\n\nOnce you have that, ``cd`` into the root directory of this repo and\n\n::\n\n py.test --tb=line -vs\n \nBugs\n-------\n\nFor any bugs you encounter please open a Github\n`issue `__\n\nContribute\n----------\n\n#. Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug. \n#. If you feel uncomfortable or uncertain about an issue or your changes, feel free to email @greedo and he will happily help you via email, Skype, remote pairing or whatever you are comfortable with.\n#. Fork `the repository `__ on GitHub to start making your changes to the **master** branch (or branch off of it).\n#. Write a test which shows that the bug was fixed or that the feature works as expected.\n#. Send a pull request and bug the maintainer until it gets merged and published. :) Make sure to add yourself to `AUTHORS `__.\n\n\nLicense\n-------\n\n::\n\n Licensed to the Apache Software Foundation (ASF) under one\n or more contributor license agreements. See the NOTICE file\n distributed with this work for additional information\n regarding copyright ownership. The ASF licenses this file\n to you under the Apache License, Version 2.0 (the\n \"License\"); you may not use this file except in compliance\n with the License. You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing,\n software distributed under the License is distributed on an\n \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n KIND, either express or implied. See the License for the\n specific language governing permissions and limitations\n under the license.\n\n.. |PyPI version| image:: https://badge.fury.io/py/python-xbrl.png?style=flat\n :target: http://badge.fury.io/py/python-xbrl\n.. |Travis-CI| image:: https://travis-ci.org/greedo/python-xbrl.png?branch=master\n :target: https://travis-ci.org/greedo/python-xbrl\n.. |license| image:: https://img.shields.io/pypi/l/python-xbrl.svg?style=flat\n :target: https://pypi.python.org/pypi/python-xbrl", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/greedo/python-xbrl/", "keywords": "xbrl,Financial,Accounting,file formats", "license": "Apache License", "maintainer": "", "maintainer_email": "", "name": "python-xbrl", "package_url": "https://pypi.org/project/python-xbrl/", "platform": "", "project_url": "https://pypi.org/project/python-xbrl/", "project_urls": { "Homepage": "https://github.com/greedo/python-xbrl/" }, "release_url": "https://pypi.org/project/python-xbrl/1.1.1/", "requires_dist": null, "requires_python": "", "summary": "library for parsing xbrl documents", "version": "1.1.1" }, "last_serial": 2541098, "releases": { "1.0.1": [ { "comment_text": "", "digests": { "md5": "256af377d8e782368458e1a99ca63745", "sha256": "b1e5d4fe815717250f25161e3f59ebc309c050182e9ce7be71f6db837906e2f0" }, "downloads": -1, "filename": "python-xbrl-1.0.1.tar.gz", "has_sig": false, "md5_digest": "256af377d8e782368458e1a99ca63745", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6659, "upload_time": "2014-08-30T03:22:42", "url": "https://files.pythonhosted.org/packages/fa/2e/a1526f9aad36d55057dda9c4179d958e2378b5138a86be132c6a430eff1c/python-xbrl-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "9a8cbd1380dd9ae80b9d3cf9c848972a", "sha256": "249b1adda5c17731c01a4f225febabce1010307ea40ae7c758a890527ab86f4e" }, "downloads": -1, "filename": "python-xbrl-1.0.2.tar.gz", "has_sig": false, "md5_digest": "9a8cbd1380dd9ae80b9d3cf9c848972a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2703, "upload_time": "2014-09-01T04:26:35", "url": "https://files.pythonhosted.org/packages/84/f9/16e694595c17834375817dcabd5aeb094c60fc60c87ba3d7090aa194d0c2/python-xbrl-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "c2552889da91e0256dc2c4e551bd903e", "sha256": "e82ae78794201e6405a218c8894e71299c3b0f4475d5c5335eb66fe488939b2e" }, "downloads": -1, "filename": "python-xbrl-1.0.3.tar.gz", "has_sig": false, "md5_digest": "c2552889da91e0256dc2c4e551bd903e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7515, "upload_time": "2014-09-11T04:01:05", "url": "https://files.pythonhosted.org/packages/78/e8/a50163f1f48164df944b2adef6009efa5b837a797fd2635fe809267217cb/python-xbrl-1.0.3.tar.gz" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "5f1c480c695ac2a581851c7c4a218c89", "sha256": "f6fb99e484a1a72b6f0c3a6d24122636c38846f3712eba1bd4af18ac15975840" }, "downloads": -1, "filename": "python-xbrl-1.0.4.tar.gz", "has_sig": false, "md5_digest": "5f1c480c695ac2a581851c7c4a218c89", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7540, "upload_time": "2014-09-13T04:14:36", "url": "https://files.pythonhosted.org/packages/15/49/f0f872d48ea292776227b326b204c09d4de318ba23cf61dc6a1f48b618be/python-xbrl-1.0.4.tar.gz" } ], "1.0.5": [ { "comment_text": "", "digests": { "md5": "9d9fda535bf6de7c9939b0a55333f5aa", "sha256": "2828584560480f8019277355e23ed6f69c3b8100c3008b3a9a4750a2c695c601" }, "downloads": -1, "filename": "python-xbrl-1.0.5.tar.gz", "has_sig": false, "md5_digest": "9d9fda535bf6de7c9939b0a55333f5aa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7901, "upload_time": "2014-09-13T23:42:59", "url": "https://files.pythonhosted.org/packages/b3/19/183f81525bcd3e562d34b5765dcb64ad0917507b430db4aca27d5598bb04/python-xbrl-1.0.5.tar.gz" } ], "1.0.6": [ { "comment_text": "", "digests": { "md5": "8990e2eb3d69ce1381f7201e26f93df2", "sha256": "ef3ebec554cdf05de9f977673079b0270613c115d3a23f522e68d152a8e2b6ee" }, "downloads": -1, "filename": "python-xbrl-1.0.6.tar.gz", "has_sig": false, "md5_digest": "8990e2eb3d69ce1381f7201e26f93df2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8010, "upload_time": "2014-10-03T01:05:28", "url": "https://files.pythonhosted.org/packages/62/05/a806bd87a7c4297ab969f893ee16a609c22ebb922976db1619999a0c4905/python-xbrl-1.0.6.tar.gz" } ], "1.0.7": [ { "comment_text": "", "digests": { "md5": "8bc8b547de32ddb76aacdc1b5eb7b39f", "sha256": "fec34a82c5b3ceac4361f69b628e51f1fcedaeb23ce4c840b20068a4f7f50cdc" }, "downloads": -1, "filename": "python-xbrl-1.0.7.tar.gz", "has_sig": false, "md5_digest": "8bc8b547de32ddb76aacdc1b5eb7b39f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8218, "upload_time": "2014-11-16T16:53:59", "url": "https://files.pythonhosted.org/packages/b5/0a/6e18be40d0eb590d4647100985e2b19db231d0c786d2aad97ba2a05c5c3b/python-xbrl-1.0.7.tar.gz" } ], "1.0.8": [ { "comment_text": "", "digests": { "md5": "4132d2c7df9d657bffb97e0b27174d9f", "sha256": "bb5f9977419627b62b49055bdb77b2fab8258a7118ff2e8d82b42e10f5c623a2" }, "downloads": -1, "filename": "python-xbrl-1.0.8.tar.gz", "has_sig": false, "md5_digest": "4132d2c7df9d657bffb97e0b27174d9f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9132, "upload_time": "2014-11-24T04:52:15", "url": "https://files.pythonhosted.org/packages/37/33/2d904418e5ce7bda47f121939b823051919f84273411d6e5e504191584f3/python-xbrl-1.0.8.tar.gz" } ], "1.0.9": [ { "comment_text": "", "digests": { "md5": "d5a97e3dfa8d19b7372ca22e3864659b", "sha256": "821d4ebaf1e3e7fc742d34408066fa836bbc967fd7924c88c60350fa2ade1b05" }, "downloads": -1, "filename": "python-xbrl-1.0.9.tar.gz", "has_sig": false, "md5_digest": "d5a97e3dfa8d19b7372ca22e3864659b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9351, "upload_time": "2014-12-20T16:45:05", "url": "https://files.pythonhosted.org/packages/03/2b/57db86c055146e12f92ef6a247fb461d74daac254f3099e91add921857cd/python-xbrl-1.0.9.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "50d697c92f8012ddc7abcd267ee60cb3", "sha256": "059fd6d22a548570c0d2402fac3382c1a34d494f90feecc945d672fba39d9a0e" }, "downloads": -1, "filename": "python-xbrl-1.1.0.tar.gz", "has_sig": false, "md5_digest": "50d697c92f8012ddc7abcd267ee60cb3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9376, "upload_time": "2014-12-21T19:05:00", "url": "https://files.pythonhosted.org/packages/7e/8a/03172b32006c6db1beb58730ceec39f0f739ae76094ad5180843f0c634f2/python-xbrl-1.1.0.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "f765f5c9f4260e97ce96c83298de177b", "sha256": "cbf7748aacf2fd4b8691911ce9b380979f67653cfa3c9df279e9994f0139690c" }, "downloads": -1, "filename": "python-xbrl-1.1.1.tar.gz", "has_sig": false, "md5_digest": "f765f5c9f4260e97ce96c83298de177b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10371, "upload_time": "2016-12-27T17:14:07", "url": "https://files.pythonhosted.org/packages/c5/ba/a775eb59368287827dede54acede3748886a9ae3ba38e591a42936a2030b/python-xbrl-1.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f765f5c9f4260e97ce96c83298de177b", "sha256": "cbf7748aacf2fd4b8691911ce9b380979f67653cfa3c9df279e9994f0139690c" }, "downloads": -1, "filename": "python-xbrl-1.1.1.tar.gz", "has_sig": false, "md5_digest": "f765f5c9f4260e97ce96c83298de177b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10371, "upload_time": "2016-12-27T17:14:07", "url": "https://files.pythonhosted.org/packages/c5/ba/a775eb59368287827dede54acede3748886a9ae3ba38e591a42936a2030b/python-xbrl-1.1.1.tar.gz" } ] }