An open API service indexing awesome lists of open source software.

https://github.com/thundergolfer/politifact-py

Python wrapper for the Politifact REST API
https://github.com/thundergolfer/politifact-py

api-wrapper facebook fact-checking fake-news politifact

Last synced: 5 months ago
JSON representation

Python wrapper for the Politifact REST API

Awesome Lists containing this project

README

          

# Politifact-Py [![Documentation Status](https://readthedocs.org/projects/politifact-py/badge/?version=latest)](http://politifact-py.readthedocs.io/en/latest/?badge=latest) [![Build Status](https://travis-ci.org/thundergolfer/politifact-py.svg?branch=master)](https://travis-ci.org/thundergolfer/politifact-py)

##### ⚠️ **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](http://www.politifact.com/) organisation's [public API](http://static.politifact.com/api/doc.html).

-----

## Usage

```python
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](https://github.com/pypa/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](https://github.com/thundergolfer/politifact-py/releases)
3. `twine upload dist/*`

### License

Released under the MIT license. See [LICENSE](LICENSE) for further details.