Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hackernews-python

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hackernews-python

Python wrapper for the official Hacker News API (v0)

  • 0.3.2
  • PyPI
  • Socket score

Maintainers
1

Hacker News API Wrapper

Installation

.. code-block:: bash

pip install hackernews-python

Usage

.. code-block:: pycon

>>> from hackernews import HackerNews
>>> hn = HackerNews()
>>> hn.top_stories()
[8422599, 8422087, 8422928, 8422581, 8423825...

>>> hn.item(1).title
'Y Combinator'

>>> hn.item(1).time
datetime.datetime(2006, 10, 9, 11, 21, 51)

>>> hn.user('pg').created
datetime.datetime(2006, 10, 9, 11, 21, 32)

>>> hn.user('pg').karma
155040

>>> hn.max_item()
8424314

>>> hn.updates()
{'items': [8423690, 8424315, 8424299...], 'profiles': ['exampleuser',...]}

API Documentation

https://github.com/HackerNews/API

Release History

0.3.1 (2014-10-12) ++++++++++++++++++

  • Fix README examples

0.3.0 (2014-10-12) ++++++++++++++++++

  • Returns Item and User objects instead of dicts.

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

FAQs


Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc