pyNodeBB is a Python client for the NodeBB API (still under development).
pip install pynodebb
from __future__ import print_function
from pynodebb import Client
client = Client('http://localhost:4567', 'master_token')
client.configure(**{
'page_size': 20
})
# Retrieves a NodeBB user given their `uid`.
status_code, user = client.users.get(uid)
print(user['username'])
# Updates the retrieved user's `fullname`.
client.users.update(user['uid'], **{'fullname': 'David Vuong'})
# Iterate over all topics in category given the `cid`.
status_code, topics = client.topics.list(1):
for topic in topics:
print(topic['title'])
Documentation is available at http://pynodebb.readthedocs.org/en/latest/.