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
- Host: GitHub
- URL: https://github.com/thundergolfer/politifact-py
- Owner: thundergolfer
- License: mit
- Created: 2018-04-22T03:32:20.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T02:08:16.000Z (over 3 years ago)
- Last Synced: 2025-10-10T15:58:16.179Z (9 months ago)
- Topics: api-wrapper, facebook, fact-checking, fake-news, politifact
- Language: Python
- Homepage: http://politifact-py.readthedocs.io/en/latest/
- Size: 140 KB
- Stars: 18
- Watchers: 1
- Forks: 1
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Politifact-Py [](http://politifact-py.readthedocs.io/en/latest/?badge=latest) [](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.