# -*- coding: utf-8 -*-
from setuptools import setup

package_dir = \
{'': 'src'}

packages = \
['littlesis']

package_data = \
{'': ['*']}

install_requires = \
['pandas>=1.3.5,<2.0.0', 'ratelimit>=2.2.1,<3.0.0', 'requests>=2.26.0,<3.0.0']

setup_kwargs = {
    'name': 'littlesis',
    'version': '0.1.1',
    'description': 'Python wrapper for the LittleSis API.',
    'long_description': '# littlesis\n[![MIT License](https://img.shields.io/npm/l/starwars-names.svg?style=flat-square)](http://test.pypi.org/project/littlesis/)\n[![travis build](https://img.shields.io/travis/kentcdodds/starwars-names.svg?style=flat-square)](https://littlesis.readthedocs.io/en/latest/autoapi/littlesis/littlesis/index.html)\n\nPython wrapper for the LittleSisAPI. Makes using the LittleSis API more efficient for the Python user, and allows for simpler data exploration on API calls, specifically get requests. View the docs for the LittleSis API [here](https://littlesis.org/api) to better understand exactly the types of get requests this package performs. View documentation on readthedocs.org [here](https://littlesis.readthedocs.io/en/main/). Find jupyter notebook vignettes on github repo [here](https://github.com/brendanmapes/littlesis).\n\n## Installation\n#### pip\n```bash\n$ pip install littlesis\n```\n#### github\n[Download latest version here](https://github.com/brendanmapes/littlesis)\n\n## Usage\n### import littlesis module\n```python\nimport littlesis\nfrom littlesis import littlesis\n```\n#### id_to_name()\n```python\nid_to_name(96583)\n\'Ted Cruz\'\n```\nConverts any ID number in the LittleSis database to the name of the individual or entity which it represents. \n\n#### name_to_id()\n```python\nname_to_id(\'Ted Cruz\')\n96583\n```\nConverts any name within the LittleSis database to the corresponding ID number. If shortened versions of the name are used, the function will return the ID number of the entity with the highest number of relationships documented on the site.\n```python\nname_to_id(\'Cruz\')\n96583\n```\n\n#### entity()\n```python\nentity(\'Barack Obama\')\n```\nThis returns a JSON of an entity get request to the LittleSis API, which includes basic information on who/what the entity is. Originally, get requests to this API require knowledge of the ID for each entity, but this function allows for entry of entities by name instead.\n\n#### relationships()\n```python\nrelationships(\'Barack Obama\')\n```\nThis returns a JSON of a relationship get request to the LittleSis API, which includes a list of related entities to the individual entered in the function, and information on the nature of each of those relationships. Again, this function avoids the necessity of knowledge for the ID for a given entity in the original API requests, and allows for entry of entities by name. As with all functions in this package, shortened versions of the names used in the function (last names) will call for information on the entity that has the highest number of relationships documented in the database. \n\n#### list_entities()\n```python\nlist_entities(\'Trump\', \'Obama\', \'Bill Clinton\')\n```\nThis returns a pandas dataframe from entity get requests to the LittleSis API for all entities listed in the function call. This allows for basic exploration of the information within these get requests, without manual individual calls to the API, which only allows for one entity to be entered at a time. Due to rate limiting restrictions on the LittleSis API, this function has been throttled down to work at a rate that avoids rate limit related failure (1 request per second). \n\n#### relationships_df()\n```python\nrelationsihps_df(\'Lebron James\')\n```\nThis returns a dataframe of information for all related entities for the entity entered into the function. This function performs a relationship get request to the LittleSis API, and parses it into a dataframe, converting all ID numbers for each related entity to the names of the entity, which isn\'t included in the standard API get request. Again, to avoid rate limit related failure, this function works at a rate of one call per second, which results in a total run time of about 1 second per related entity listed. \n\n#### timelines()\n```python\ntimelines(\'Lebron James\')\n```\nThis returns a dataframe of information on the time period of relationships for the entity entered into the function by name. ID numbers in the original relationship get request are converted to the name of the entity, again, requiring throttling to avoid rate limit related failure. \n\n#### bio()\n```python\nbio(\'Obama\')\n\'The 44th President of the United States, he was sworn into office on January 20,\n    2009; born in Honolulu, Hawaii, August 4, 1961; obtained early education in Jakarta,\n    Indonesia, and Hawaii; continued education at Occidental College, Los Angeles, Calif.;\n    received a B.A. in 1983 from Columbia University, New York City; worked as a community \n    organizer in Chicago, Ill.; studied law at Harvard University, where he became the \n    first African American president of the Harvard Law Review, and received J.D. in 1991;\n    lecturer on constitutional law, University of Chicago; member, Illinois State senate\n    1997-2004; elected as a Democrat to the U.S. Senate in 2004 for term beginning January\n    3, 2005.\'\n```\nThis returns a string of biographical/background information on the entity entered to the function by name. \n\n#### lists()\n```python\nlists(\'Lebron James\')\nBloomberg Business Week Most Powerful Athletes (2011)\nThe World\'s Highest Paid Celebrities (2017)\n```\nThis returns a list of the lists to which the entity belongs within the LittleSis database.\n\n#### lists_w_descriptions()\n```python\nlists(\'Lebron James\')\nBloomberg Business Week Most Powerful Athletes (2011) (description: The 100 most\n    powerful athletes on and off the field. No coaches, owners, managers, executives or\n    retired athletes were considered. Off-field metrics included the results of polls on\n    individual athletes by E-Poll Market Research and estimated endorsement dollars. On\n    field metrics were tallied on those who outscored, out-tackled, or outskated the\n    competition during 2009 and 2010. Sports were weighted according to their popularity\n    in the U.S. )\n    The World\'s Highest Paid Celebrities (2017) (description: FORBES\' annual ranking of\n    the highest-earning entertainers in the world, published June 12 2017. The list\n    evaluates front of camera talent; fees for agents, managers and lawyers are not\n    deducted. )\n```\nThis returns a similar list to that produced by the lists() function, but includes expanded descriptions for the lists to which the entity belongs. \n\n#### relationship_blurbs()\n```python\nrelationship_blurbs(\'Lebron James\')\n    LeBron James  gave money to  Children’s Aid Society \n    LeBron James  and  Savannah Brinson James  are/were in a family\n    LeBron James  and  Rich Paul  are/were business partners\n    Randy Mims  and  LeBron James  have/had a professional relationship\n    LeBron James  has a position (Founder  ) at  James Family Foundation \n    Maverick Carter  and  LeBron James  are/were business partners\n    LeBron James  is an owner of  Blaze Pizza LLC \n    LeBron James  has a position (Co founder  ) at  Klutch Sports \n    LeBron James  gave money to  Democratic National Committee \n    LeBron James  gave money to  Democratic White House Victory Fund \n    Aaron Goodwin  and  LeBron James  have/had a professional relationship\n```\nThis returns a list of all relationships documented for the given entity within the LittleSis database. This function is performing a relationship get request for the given entity, and filtering that information to select simply the relationship descriptors, for quick read and analysis. \n\n#### relationship_blurbs_w_amounts()\n```python\nrelationship_blurbs_w_amounts(\'Lebron James\')\n    LeBron James  gave money to  Children’s Aid Society  None\n    LeBron James  and  Savannah Brinson James  are/were in a family None\n    LeBron James  and  Rich Paul  are/were business partners None\n    Randy Mims  and  LeBron James  have/had a professional relationship None\n    LeBron James  has a position (Founder  ) at  James Family Foundation  None\n    Maverick Carter  and  LeBron James  are/were business partners None\n    LeBron James  is an owner of  Blaze Pizza LLC  None\n    LeBron James  has a position (Co founder  ) at  Klutch Sports  None\n    LeBron James  gave money to  Democratic National Committee  20000\n    LeBron James  gave money to  Democratic White House Victory Fund  20000\n    Aaron Goodwin  and  LeBron James  have/had a professional relationship None\n```\nSimilarly to relationship_blurbs(), this function returns a list of all relationships for the given entity, but includes dollar amounts that relationship involved, which is often a primary piece of information being searched for when using the LittleSis API to understand things like political campaign contributions.\n\n\n## Contributing\n\nInterested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.\n\n## License\n\n`littlesis` was created by Brendan Mapes. It is licensed under the terms of the MIT license. See below.\n\nCopyright (c) 2021 Brendan Mapes\nMIT License:\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the "Software"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n## Credits\n\n`littlesis` was created with [`cookiecutter`](https://cookiecutter.readthedocs.io/en/latest/) and the `py-pkgs-cookiecutter` [template](https://github.com/py-pkgs/py-pkgs-cookiecutter).\n\n## Further Guidance\nView more in depth usage guide [here](https://littlesis.readthedocs.io/en/latest/autoapi/littlesis/littlesis/index.html).\n',
    'author': 'Brendan Mapes',
    'author_email': None,
    'maintainer': None,
    'maintainer_email': None,
    'url': 'https://github.com/brendanmapes/littlesis',
    'package_dir': package_dir,
    'packages': packages,
    'package_data': package_data,
    'install_requires': install_requires,
    'python_requires': '>=3.9,<4.0',
}


setup(**setup_kwargs)
