A simple API wrapper for discordbots.org written in Python
Install via pip (recommended)
pip install dblpyInstall from source
git clone https://github.com/DiscordBotList/DBL-Python-Library
cd DBL-Python-Library
pip install -R requirements.txtDocumentation can be found here
- POST server count
- GET bot info, server count, upvote count, upvote info
- GET all bots
- GET user info
- GET widgets (large and small) including custom ones. See discordbots.org/api/docs for more info.
- Searching for bots via the api
import dblpy
from dblpy import Client
import asyncio
import aiohttp
import json
dbl = dblpy.Client()
botid = 264811613708746752 # your bots user id (client id on newer bots)
token = 'abcxyz' # DBL Bot Token. Obtainable from https://discordbots.org/api
class Example:
def __init__(bot):
bot = bot
session = aiohttp.ClientSession(loop=bot.loop)
async def poststats():
await dblpy.post_server_count(botid, dbltoken, 65)
async def getstats():
resp = await dblpy.get_server_count(botid)
print(json.dumps(resp))