https://github.com/samamorgan/discourse
A Python wrapper of the Discourse API
https://github.com/samamorgan/discourse
discourse-api python-wrapper
Last synced: 6 months ago
JSON representation
A Python wrapper of the Discourse API
- Host: GitHub
- URL: https://github.com/samamorgan/discourse
- Owner: samamorgan
- License: gpl-3.0
- Created: 2019-09-12T16:19:22.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-07-07T18:09:32.000Z (almost 4 years ago)
- Last Synced: 2024-12-15T04:09:52.533Z (6 months ago)
- Topics: discourse-api, python-wrapper
- Language: Python
- Size: 140 KB
- Stars: 8
- Watchers: 3
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# discourse
## A Python wrapper of the Discourse API[](https://pypi.org/project/discourse/)
[](https://www.gnu.org/licenses/gpl-3.0)This package allows Python developers to write software that makes use of the Discourse API. Functions available in the API are mirrored in this package as closely as possible, translating JSON responses to Python objects. You can find the current documentation for the Discourse API here:
[Discourse API Documentation](http://docs.discourse.org/)
### Installing
```
pip install discourse
```### Quick Start
```python
import discourseclient = discourse.Client(
host='http://127.0.0.1:3000/',
api_username='discourse1',
api_key='714552c6148e1617aeab526d0606184b94a80ec048fc09894ff1a72b740c5f19',
)latest = client.get_latest_topics('default')
for topic in latest:
print(topic.title)
```Full documentation for this package is not yet available. One of the milestones is complete documentation coverage, including currently undocumented portions of the Discourse API. For now, I encourage you to read the source code and use the Discourse API docs, it should be fairly straightforward.
Pull requests welcome!