
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
|Build Status| |Coverage Status| |Version| |License|
Unofficial Python wrapper over Hacker News' official Firebase API.
::
> pip install hntop
Get Item
.. code:: python
>>> 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')
u'dhouston'
Get User
.. code:: python
>>> from hnapi import HnApi
>>> user = HnApi().get_user('pg')
>>> user.get('about')
u'Bug Fixer.'
>>> user.get('karma')
155046
>>> user.type
u'user'
Top Stories
.. code:: python
>>> 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
~~~~~~~~
.. code:: python
>>> from hnapi import HnApi
>>> con = HnApi()
>>> max_item_id = con.get_max_item()
>>> max_item_id
8967822
>>> max_item = con.get_item(max_item_id)
>>> max_item.get('type')
u'comment'
>>> 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..'
Documentation
-------------
`Documentation <https://github.com/rylans/hackernews-top/blob/master/docs/index.md>`__
License
-------
Apache
.. |Build Status| image:: https://travis-ci.org/rylans/hackernews-top.svg?branch=master
:target: https://travis-ci.org/rylans/hackernews-top
.. |Coverage Status| image:: https://coveralls.io/repos/rylans/hackernews-top/badge.svg?branch=master
:target: https://coveralls.io/r/rylans/hackernews-top?branch=master
.. |Version| image:: https://badge.fury.io/py/hntop.svg
:target: https://badge.fury.io/py/hntop
.. |License| image:: https://img.shields.io/pypi/l/hntop.svg
:target: https://github.com/rylans/hackernews-top
FAQs
Python wrapper over HackerNews Firebase API
We found that hntop demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.