Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (
Help us improve Python packaging - Donate today!

Python wrapper over HackerNews Firebase API

Project Description

Unofficial Python wrapper over Hacker News’ official Firebase API.


> pip install hntop

Usage Examples

Get Item

>>> from hnapi import HnApi
>>> con = HnApi()
>>> item = con.get_item(8863)
>>> item.get('title')
u'My YC app: Dropbox - Throw away your USB drive'
>>> item.get('by')

Get User

>>> from hnapi import HnApi
>>> user = HnApi().get_user('pg')
>>> user.get('about')
u'Bug Fixer.'
>>> user.get('karma')
>>> user.type

Top Stories

>>> from hnapi import HnApi
>>> top = HnApi().get_top()
>>> top
[8959672, 8960995, 8961086, 8960029, 8960773, 8959207, 8960504, 8960280, 8960486, 8959875, 8955426, 8958731, 8961438, 8961093, 8959138]

Max Item

>>> from hnapi import HnApi
>>> con = HnApi()
>>> max_item_id = con.get_max_item()
>>> max_item_id
>>> max_item = con.get_item(max_item_id)
>>> max_item.get('type')
>>> max_item.get('text')
u'Interesting. Being partially colour blind I would have thought that the original was much greener, while the re-release is a lot bluer and..'





Release History

Release History

This version
History Node


History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
hntop-0.1.1.tar.gz (5.9 kB) Copy SHA256 Checksum SHA256 Source Nov 28, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting