Skip to content

thundergolfer/politifact-py

Repository files navigation

Politifact-Py Documentation Status Build Status

⚠️ NOTE: This API Wrapper was hastily created to facilitate another higher-priority project. It is no longer under active development and is pretty ugly and wonky.

Python REST API wrapper for the Pulitzer Prize winning Politifact organisation's public API.


Usage

from politifact import Politifact

p = Politifact()
obama_related = p.statements().people('Barack Obama')

for statement in obama_related:
  print(statement.ruling)

# OUTPUT:
# > True
# > Pants On Fire!
# > Mostly True
# > ...

Installation

pip install politifact

Documentation

NOTE: Work in progres...

See http://politifact-py.readthedocs.io/en/latest/.

Development

Dependencies

The project uses pipenv for package and virtual environment management. Install it with pip install pipenv

  1. Get all dependencies with pipenv install --dev

Testing

python -m pytest tests/

Releasing

Make sure you have twine installed. pip install twine

  1. python setup.py sdist
  2. Create a Github Release for the project
  3. twine upload dist/*

License

Released under the MIT license. See LICENSE for further details.