Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

A simple API wrapper for written in Python

Project Description

A simple API wrapper for written in Python


Install via pip (recommended)

pip install dblpy

Install from source

pip install git+


Documentation 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 for more info.

Not Working / Implemented

  • Searching for bots via the api


import dbl
import discord
from discord.ext import commands

import aiohttp
import asyncio
import logging

class DiscordBotsOrgAPI:
    """Handles interactions with the API"""

    def __init__(self, bot): = bot
        self.token = 'dbl_token'  #  set this to your DBL token
        self.dblpy = dbl.Client(, self.token)

    async def update_stats(self):
        """This function runs every 30 minutes to automatically update your server count"""

        while True:
  'attempting to post server count')
                await self.dblpy.post_server_count()
      'posted server count ({})'.format(len(
            except Exception as e:
                logger.exception('Failed to post server count\n{}: {}'.format(type(e).__name__, e))
            await asyncio.sleep(1800)

    def __unload(self):

def setup(bot):
    global logger
    logger = logging.getLogger('bot')

Release History

This version
History Node


History Node


History Node


Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(9.3 kB) Copy SHA256 Hash SHA256
Source None Feb 19, 2018

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers DreamHost DreamHost Log Hosting