- Notifications
You must be signed in to change notification settings - Fork0
Python library for the iHackerNews API
License
NotificationsYou must be signed in to change notification settings
dmpayton/python-ihackernews
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
A python library for theiHackerNews API.
- Author:Derek Payton
- Version: 1.0.0
- License: MIT
- Requests is used to make the HTTP request.
- A JSON library of some sort (json,simplejson, ordjango.utils.simplejson)
iHackerNews can be installed in any number of the usual ways:
easy_install ihackernewspip install ihackernewspip install -e git+git://github.com/dmpayton/python-ihackernews.git#egg=python-ihackernewsgit clone git://github.com/dmpayton/python-ihackernews.gitcd python-ihackernewspython setup.py installBasic example:
```>>> from ihackernews import iHackerNewsAPI>>> hn = iHackerNewsAPI()>>> response = hn.profile('dmpayton')>>> response<iHackerNewsResponse: http://api.ihackernews.com/profile/dmpayton>>>> response.response # The raw response from the requests library<Response [200]>>>> response.data # The parsed JSON data{u'username': u'dmpayton', u'about': u"24 year old software developer (Python) in Southern California.<p>Me: <a href='http://dmpayton.com'>http://dmpayton.com</a>\nDay job: <a href='http://cukerinteractive.com'>http://cukerinteractive.com</a><p>derek.payton (at) Google's mail service.", u'createdAgo': u'1560 days ago', u'cachedOnUTC': u'/Date(1323325776265)/', u'version': u'1.0', u'karma': 578}```More examples can be found in tests.py.
python tests.pyNote: Potential instabilities in the iHackerNews API service may cause test failures. It's not entirely uncommon to receive 500's or empty data from the API, which sucks, but c'est la vie.
- Better documentation
- Automatically parse Dates to datetime.datetime objects
- Retry logic (?) -- See note under Testing
About
Python library for the iHackerNews API
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.