{ "info": { "author": "Jeremy Carbaugh", "author_email": "jcarbaugh@sunlightfoundation.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "=======================\npython-transparencydata\n=======================\n\nPython library for interacting with the TransparencyData.com API.\n\nThe TransparencyData.com API provides campaign contribution and lobbying data.\n\nhttp://transparencydata.com/api/\n\npython-transparencydata is a project of Sunlight Labs (c) 2010\nWritten by Jeremy Carbaugh \n\nAll code is under a BSD-style license, see LICENSE for details.\n\nSource: http://github.com/sunlightlabs/python-transparencydata/\n\nRequirements\n============\n\npython >= 2.4\n\nsimplejson >= 1.8 (not required with Python 2.6, will use built-in ``json`` module)\n\nUsage\n=====\n\nTo initialize the api, all that is required is for it to be imported and for an\nAPI key to be defined.\n\n(If you do not have an API key visit http://services.sunlightlabs.com/api/ to\nregister for one.)\n\nImport TransparencyData class and set your API key:\n\n\t>>> from transparencydata import TransparencyData\n\t>>> td = TransparencyData('sunlight-api-key')\n\n-------------------\nParameter Operators\n-------------------\n\nSome parameters allow multiple values or greater than, less than, or between operations. We allow operators to be added similar to the method used by the Django ORM. The operator is appended to the end of the parameter name using double underscore.\n\n\t>>> td.contributions(amount=100)\t\t\t# contributions equal to 100 dollars\n\t>>> td.contributions(amount__lt=100)\t\t# contributions less than 100 dollars\n\t\n\t>>> td.contributions(cycle=1990)\t\t\t# contributions from the 1990 election cycle\n\t>>> td.contributions(cycle__in=(1990,2008)) # contributions from the 1990 and 2008 election cycles\n\ngt\n\tGreater than specified value.\n\nlt\n\tLess than specified value.\n\nbetween\n\tBetween the lesser value and greater value. Parameters must be passed as a two-value tuple or list.\n\t\n\t\t>>> td.contributions(date__between=(start_date, end_date))\n\nin\n\tMatches any in a range of values. Parameter must be a tuple or list.\n\n\nSee the parameter documentation (http://transparencydata.com/api/) to find out which operators are valid for each parameter.\n\n----------------------\nCampaign Contributions\n----------------------\n\nTo find all contributions to Chris Van Hollen from the state of CA during the 2008 election cycle:\n\n\t>>> td.contributions(cycle=2008, contributor_state='CA', recipient_ft='van hollen')\n\nA list of valid contributions parameters can be accessed programmatically:\n\n\t>>> print td.contributions.parameters\n\nParameter documentation: http://transparencydata.com/api/#contributions\n\nResponse documentation: http://transparencydata.com/docs/#contributions\n\n--------\nLobbying\n--------\n\nTo find all lobbying conducted by John Wonderlich:\n\n\t>>> td.lobbying(lobbyist_ft='john wonderlich')\n\nA list of valid lobbying parameters can be accessed programmatically:\n\n\t>>> print td.lobbying.parameters\n\nParameter documentation: http://transparencydata.com/api/#lobbying\n\nResponse documentation: http://transparencydata.com/docs/#lobbying", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/sunlightlabs/python-transparencydata/", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "python-transparencydata", "package_url": "https://pypi.org/project/python-transparencydata/", "platform": "any", "project_url": "https://pypi.org/project/python-transparencydata/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/sunlightlabs/python-transparencydata/" }, "release_url": "https://pypi.org/project/python-transparencydata/0.1/", "requires_dist": null, "requires_python": null, "summary": "Library for interacting with the Sunlight Labs Transparency Data API", "version": "0.1" }, "last_serial": 798108, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "b48eeb522b13b174f15c6fd92f1ac19d", "sha256": "ab80ca3b36e1eea65c8d7fb00aaf32e36312afb8984e1d39f9c1b4051e78f1d9" }, "downloads": -1, "filename": "python-transparencydata-0.1.tar.gz", "has_sig": false, "md5_digest": "b48eeb522b13b174f15c6fd92f1ac19d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6732, "upload_time": "2012-02-03T21:23:25", "url": "https://files.pythonhosted.org/packages/df/57/2247f7360d77e75469c8dc46aac0d360a3a0d65f5b51855053e5120afffa/python-transparencydata-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b48eeb522b13b174f15c6fd92f1ac19d", "sha256": "ab80ca3b36e1eea65c8d7fb00aaf32e36312afb8984e1d39f9c1b4051e78f1d9" }, "downloads": -1, "filename": "python-transparencydata-0.1.tar.gz", "has_sig": false, "md5_digest": "b48eeb522b13b174f15c6fd92f1ac19d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6732, "upload_time": "2012-02-03T21:23:25", "url": "https://files.pythonhosted.org/packages/df/57/2247f7360d77e75469c8dc46aac0d360a3a0d65f5b51855053e5120afffa/python-transparencydata-0.1.tar.gz" } ] }