{ "info": { "author": "Evan Sonderegger", "author_email": "evan@rpy.xyz", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python" ], "description": "Microsoft Excel can be a powerful tool for analyzing FEC filings. This library (hopefully) makes it easy to create multi-sheet Excel files from files in the .fec file format, with a sheet for the summary data and a sheet for each type of itemization.\n\n\n\n## Usage\n\n\n\nNote: this library works best with version 3.7+ of Python due to the ordering of dictionary keys being [guaranteed](https://docs.python.org/3.7/library/stdtypes.html#typesmapping) to be in insertion order. The library should still work in older version of Python, but the columns on each sheet might be in a nonsensical order.\n\n\n\nFirst, install from PyPi:\n\n\n\n```\n\npip install fec2xlsx\n\n```\n\n\n\nThen, call one of the two methods for generating Excel files:\n\n\n\n```\n\nimport fec2xlsx\n\n\n\nfec2xlsx.file_number_xlsx(1326061, 'Gillibrand_Q1.xlsx')\n\n\n\nfec2xlsx.file_location_xlsx('/path/to/1326016.fec', 'Harris_Q1.xlsx')\n\n```\n\n\n\nThe `file_number_xlsx` method requests the specified `file_number` via http from the FEC's server's, first trying the URL for digital filings, then trying the URL for paper filings if the first response returns a 404 status code.\n\n\n\nThe `file_location_xlsx` method reads from the specified `file_path` (which takes anything you might pass to Python's [open](https://docs.python.org/3/library/functions.html#open) method) then writes to the specified `filename` output.\n\n\n\nBoth methods take an optional `options` keyword argument.\n\n\n\n## Options\n\n\n\n- `filter_memo_x`: (default: `True`) if True, ignores rows that have \"X\" as their `memo_code`. If, for example, a contribution comes in through a conduit committee like ActBlue, there are two rows: one for the contribution from an individual to the conduit and one from the conduit to the committee filing the report. Generally the second of those rows is marked with an \"X\" in the `memo_code` field and is the less useful of the two.\n\n\n\n- `money_format`: (default: `$#,##0.00`) The format used for displaying monetary values. See [here](https://xlsxwriter.readthedocs.io/format.html#set_num_format) for more details/documentation.\n\n\n\n- `date_format`: (default: `d mmm yyyy`) The format used for displaying date values. See [here](https://xlsxwriter.readthedocs.io/working_with_dates_and_time.html) for more details/documentation.\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/esonderegger/fec2xlsx", "keywords": "fec campaign finance politics", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "fec2xlsx", "package_url": "https://pypi.org/project/fec2xlsx/", "platform": "", "project_url": "https://pypi.org/project/fec2xlsx/", "project_urls": { "Bug Tracker": "https://github.com/esonderegger/fec2xlsx/issues", "Homepage": "https://github.com/esonderegger/fec2xlsx", "Source Code": "https://github.com/esonderegger/fec2xlsx/" }, "release_url": "https://pypi.org/project/fec2xlsx/0.1.2/", "requires_dist": [ "fecfile (>=0.6.1)", "XlsxWriter (>=1.1.6)" ], "requires_python": "", "summary": "A python library for making Excel files from FEC filings", "version": "0.1.2" }, "last_serial": 5161859, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "157bc066fbc2513579482d3975c33754", "sha256": "4492415d0e7db554389bec3e8eb12853584b569cf8995bc2da030cff28e62672" }, "downloads": -1, "filename": "fec2xlsx-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "157bc066fbc2513579482d3975c33754", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4485, "upload_time": "2019-04-18T16:48:33", "url": "https://files.pythonhosted.org/packages/90/fd/ac719ee66dbb695dcdf69dee8455bbd47da4c40e04a16f4f802bedeb73a6/fec2xlsx-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a1a670d5c0aa7377a4ac82edd7cf50f7", "sha256": "6b4d3ea462d25b339dfce70e2d66cbc15d6b4d087f56d53146ff1acf84958e42" }, "downloads": -1, "filename": "fec2xlsx-0.1.0.tar.gz", "has_sig": false, "md5_digest": "a1a670d5c0aa7377a4ac82edd7cf50f7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3454, "upload_time": "2019-04-18T16:48:35", "url": "https://files.pythonhosted.org/packages/42/4e/09de58c231c66986190aa83ac019a09077eb2c9404893be05541e0d49316/fec2xlsx-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "bf51ff52b6529a23127907081da43006", "sha256": "645fad93e245b314f92477effb29afd03a8973d06fb5ab7436ae60c46225a70c" }, "downloads": -1, "filename": "fec2xlsx-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "bf51ff52b6529a23127907081da43006", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4501, "upload_time": "2019-04-18T18:08:58", "url": "https://files.pythonhosted.org/packages/b8/23/fbdcccafa6359d6c567ad97fb2a589ea2e83ceb1bf4647fd63786e08858a/fec2xlsx-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "eb4a10c5fce8afba5f7391727c9fccaa", "sha256": "3777ad026d1c0480a45bad278985f155e531f7bae58358279a75f9831c080e89" }, "downloads": -1, "filename": "fec2xlsx-0.1.1.tar.gz", "has_sig": false, "md5_digest": "eb4a10c5fce8afba5f7391727c9fccaa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3487, "upload_time": "2019-04-18T18:08:59", "url": "https://files.pythonhosted.org/packages/17/a6/8ba00dd556e42ef3942487bf916a2d6ff164b2b8ad4a8c42b38192c64432/fec2xlsx-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "cdad7e991a5e9a47d2da585deb26d033", "sha256": "f8d79555c08dec9b491ce7d6109f4a3b8188ff51ae12ad9f76a79c8403713ded" }, "downloads": -1, "filename": "fec2xlsx-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "cdad7e991a5e9a47d2da585deb26d033", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4508, "upload_time": "2019-04-18T19:44:52", "url": "https://files.pythonhosted.org/packages/af/62/345462e9028375813f998c723fe152189a0548c4e869913869282eb7362c/fec2xlsx-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "03df434beee2cfd2b8faf819dddf2e3f", "sha256": "1096273278acd16c7ca442e82cf5d129c03b4be89c95ad7182baea4d0c74886d" }, "downloads": -1, "filename": "fec2xlsx-0.1.2.tar.gz", "has_sig": false, "md5_digest": "03df434beee2cfd2b8faf819dddf2e3f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3485, "upload_time": "2019-04-18T19:44:54", "url": "https://files.pythonhosted.org/packages/ec/11/c0191a09839acbfbcbaeac2b9f1cdf548e39e745bd6220b390f2e41173d3/fec2xlsx-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "cdad7e991a5e9a47d2da585deb26d033", "sha256": "f8d79555c08dec9b491ce7d6109f4a3b8188ff51ae12ad9f76a79c8403713ded" }, "downloads": -1, "filename": "fec2xlsx-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "cdad7e991a5e9a47d2da585deb26d033", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4508, "upload_time": "2019-04-18T19:44:52", "url": "https://files.pythonhosted.org/packages/af/62/345462e9028375813f998c723fe152189a0548c4e869913869282eb7362c/fec2xlsx-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "03df434beee2cfd2b8faf819dddf2e3f", "sha256": "1096273278acd16c7ca442e82cf5d129c03b4be89c95ad7182baea4d0c74886d" }, "downloads": -1, "filename": "fec2xlsx-0.1.2.tar.gz", "has_sig": false, "md5_digest": "03df434beee2cfd2b8faf819dddf2e3f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3485, "upload_time": "2019-04-18T19:44:54", "url": "https://files.pythonhosted.org/packages/ec/11/c0191a09839acbfbcbaeac2b9f1cdf548e39e745bd6220b390f2e41173d3/fec2xlsx-0.1.2.tar.gz" } ] }