2014-05-26 14:26:50 -07:00
2014-04-22 12:50:33 -04:00
2014-05-12 13:08:32 -07:00
2014-04-21 16:57:13 -04:00
2014-04-22 12:50:33 -04:00
2014-04-04 23:15:11 -07:00
2014-04-04 23:20:46 -07:00
2014-04-04 13:25:42 -07:00
2014-04-21 16:57:13 -04:00
2014-04-04 22:37:47 -07:00
2014-04-08 08:30:58 -07:00

pydiscourse

A Python library for the Discourse API. Its pretty basic right now but you need to start somewhere.

Examples

Create a client connection to a Discourse server::

from pydiscourse.client import DiscourseClient
client = DiscourseClient('http://example.com', api_username='username', api_key='areallylongstringfromdiscourse')

Get info about a user::

user = client.user('eviltrout')
print user

user_topics = client.topics_by('johnsmith')
print user_topics

Create a new user::

user = client.create_user('The Black Knight', 'blacknight', 'knight@python.org', 'justafleshwound')

Command line

To help experiment with the Discourse API, pydiscourse provides a simple command line client::

export DISCOURSE_API_KEY=your_master_key
pydiscoursecli --host=http://yourhost --api-username=system latest_topics
pydiscoursecli --host=http://yourhost --api-username=system topics_by johnsmith
pydiscoursecli --host=http://yourhost --api-username=system user eviltrout
Description
A Python library for the Discourse API
Readme MIT 423 KiB
Languages
Python 97.6%
Makefile 2.4%