pydiscourse
"A Python library for the Discourse API"
What it is and what it does
pydiscourse is a Python wrapper around the Discourse forum API. It lets you programmatically create and manage users, topics, posts, groups, and other forum objects on a Discourse server. The library exposes Discourse's HTTP API as Python methods, so you can automate forum administration, integrate Discourse into your application, or build tools that interact with forum data.
The package is a maintained fork of an earlier version, with a focus on documentation and broad Python version support. It includes a command-line tool for experimenting with API calls and supports Discourse-specific features like SSO integration. The only runtime dependency is requests, making it lightweight to install.
Use it for:
- Automate user creation and management on a Discourse forum from a Python application or admin script.
- Integrate Discourse SSO (single sign-on) into your Python web application so users log in via your site.
- Build a bot or tool that monitors forum activity, creates posts, or manages groups programmatically.
- Query forum data (users, topics, posts) from Python to feed into analytics or reporting systems.
- Migrate or synchronize user data between Discourse and another system via the API.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A Python client library for the Discourse API that provides methods to interact with Discourse servers—managing users, topics, posts, groups, and other forum resources programmatically.
Yes, if you need to interact with Discourse from Python. The library is stable, has no known vulnerabilities, and depends only on requests. However, be aware that the last release was 850 days ago; if you need support for very recent Discourse API changes, verify compatibility first or check whether the repository has unreleased fixes on the main branch.
Install
pydiscourse on PyPI
pip
pip install pydiscourseuv
uv add pydiscoursepoetry
poetry add pydiscourseInstalling pydiscourse
Before you install
Low install friction; depends only on requests. Maintenance status is aging—last release was 850 days ago (April 2024), though the repository remains active with a recent commit in February 2025. No known vulnerabilities.
License in practice
MIT license is permissive; you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install pydiscourse
from pydiscourse import DiscourseClient
client = DiscourseClient(
'http://example.com',
api_username='username',
api_key='your_api_key')
user = client.user('username')
Verify before relying
- Current Discourse API version compatibility—the fact sheet notes the Discourse API is a moving target but does not specify which versions are supported by 1.7.0.
- Whether Python support is truly unspecified or if there is a practical minimum version given the codebase history (Python 2.7 dropped in 1.2.0, but requires_python is null).
Package facts
| License | "MIT" (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — requests |
| Maintenance | aging — 850 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 89,172/month — #13,676 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pydiscourse-1.7.0-py2.py3-none-any.whl
Tags
More WWW/HTTP packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
h11h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
httpxHTTPX is a fully featured HTTP client library…
permissive · top 100 on PyPI
httpcoreA minimal low-level HTTP client library that…
permissive · top 100 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI
pysignalclirestapiPython client library for the Signal Cli REST…
permissive · top 15,000 on PyPI
apiclientA lightweight framework for building HTTP API…
permissive · top 15,000 on PyPI
nv-ingest-clientPython client library for submitting and…
permissive · top 15,000 on PyPI
django-esiDjango-ESI provides a Django app that wraps the…
copyleft · top 15,000 on PyPI
workosA Python client library for the WorkOS API that…
permissive · top 5,000 on PyPI
requests-toolbeltProvides utilities for the requests library,…
permissive · top 1,000 on PyPI
pylxdpylxd provides a Python interface to the LXD…
permissive · top 15,000 on PyPI
azure-ai-language-conversationsA Python client library for Azure…
permissive · top 15,000 on PyPI
python-intercomA Python client library for the Intercom API,…
unclear · top 15,000 on PyPI
azure-communication-chatPython SDK for Azure Communication Services…
permissive · top 15,000 on PyPI