A Python wrapper for the official Hacker News API (v0)
Project description
Installation
pip install hackernews-python
Usage
>>> from hackernews import HackerNews
>>> hn = HackerNews()
>>> hn.top_stories()
[8422599, 8422087, 8422928, 8422581, 8423825...
>>> hn.user('pg')
{'delay': 2, 'id': 'pg', 'submitted': [7494555, 7494520, 749411...
>>> hn.user('pg')['created']
datetime.datetime(2006, 10, 9, 11, 21, 32)
>>> hn.item(1)['title']
'Y Combinator'
>>> hn.item(1)['time']
datetime.datetime(2006, 10, 9, 11, 21, 51)
>>> hn.max_item()
8424314
>>> hn.updates()
{'items': [8423690, 8424315, 8424299...], 'profiles': ['exampleuser',...]}
API Documentation
Release History
0.2.0 (2014-10-10)
Convert timestamps to native datetime objects (breaking change)
Added tests.py (100% line coverage)
Add link to official API docs to README.rst
0.1.1 (2014-10-09)
Improve syntax highlighting in README.rst
0.1.0 (2014-10-07)
1st release
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for hackernews_python-0.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1538385596360e2dfcc3a2eb6a8997f438473eca4261268f38f2ffc3f4061fe5 |
|
MD5 | 0370d8aad26f36a99f7ef9d905307910 |
|
BLAKE2b-256 | 8aec95d936103b414c815454e868647c05db3d9ec59c3b09dbcde5bdbb402ff9 |