Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/disqus/disqus-python
Disqus API bindings for Python
https://github.com/disqus/disqus-python
Last synced: 3 months ago
JSON representation
Disqus API bindings for Python
- Host: GitHub
- URL: https://github.com/disqus/disqus-python
- Owner: disqus
- License: apache-2.0
- Created: 2010-11-22T19:25:33.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2020-02-03T01:49:06.000Z (over 4 years ago)
- Last Synced: 2024-03-18T21:46:57.274Z (3 months ago)
- Language: Python
- Homepage: https://disqus.com/api/docs/
- Size: 260 KB
- Stars: 165
- Watchers: 30
- Forks: 50
- Open Issues: 13
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGES
- License: LICENSE
Lists
- my-awesome-awesomeness - disqus-python
README
disqus-python
~~~~~~~~~~~~~.. image:: https://travis-ci.org/disqus/disqus-python.svg?branch=master
:target: https://travis-ci.org/disqus/disqus-pythonLet's start with installing the API:
pip install disqus-python
Use the API by instantiating it, and then calling the method through dotted notation chaining::
from disqusapi import DisqusAPI
disqus = DisqusAPI(secret_key, public_key)
for result in disqus.get('trends.listThreads'):
print resultParameters (including the ability to override version, api_secret, and format) are passed as keyword arguments to the resource call::
disqus.get('posts.details', post=1, version='3.0')
Paginating through endpoints is easy as well::
from disqusapi import Paginator
paginator = Paginator(api.get, 'trends.listThreads', forum='disqus')
for result in paginator:
print result# pull in a maximum of 500 results (this limit param differs from the endpoint's limit param)
for result in paginator(limit=500):
print resultDocumentation on all methods, as well as general API usage can be found at https://disqus.com/api/docs/