A simple, intuitive wrapper around the underbelly of the discord API. This library is meant to be used with the discord docs. Responses from methods in the library will return JSON just as discords api details.
Project description
DiscordWrap
A simple, intuitive wrapper around the underbelly of the discord API. This library is meant to be used with the discord docs. Responses from methods in the library will return JSON just as discords api details.
Installation
pip install discordwrap
Example
from discordwrap import Auth, channel
Auth.TOKEN = 'your token'
# your channel
channel = 111111111111111
channel.create_message(channel, json={
'content': 'Hello world!'
})
Docs
Find offical docs here!
Motivation
Using any API can be daunting. Using a library with poor documentation can be even worse. The goal of this library is to not need any documentation, other than discords. This is why users are encouraged to use raw json for bodies, and responses of requests.
So what does this library do? The most daunting part. The rate limiting, and overall python function creation, and async handling. Requests under the hood are asynchronous, however to the end user of the library, they are not. This lets consumers freely use our library without needing to worry about buckets, rate limits, or any other messy details, and focus on building their product.
Rate limiting blocks only when needed, and makes sure to only keep one thread alive. There is no class instantiation needed once the Auth token is set.
This library does NOT (yet) implement the discord gateway, as there are plenty of other libraries that are much better for bot building. This library is targeted at developers that are not building an interactive bot, but need the ability to use the discord api in another project.
Use cases
- Ping a discord server when a script is done running
- Get information about a discord channel for integration with another service
- More to come!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file discordwrap-0.9.0.tar.gz
.
File metadata
- Download URL: discordwrap-0.9.0.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/37.3 requests/2.28.2 requests-toolbelt/0.10.1 urllib3/1.26.14 tqdm/4.64.1 importlib-metadata/6.0.0 keyring/23.13.1 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1329bbe874791f8ce13b5d6d7eb8f8d499026ad74e8e240c9266421ea01ed64e |
|
MD5 | 4ae3b124b6a80adc1f5e9f067c2493c9 |
|
BLAKE2b-256 | b8f8a490bc13276ce126ef15e7a5c84dd404d574dcad9ff96b36bb61efd293bb |
File details
Details for the file discordwrap-0.9.0-py3-none-any.whl
.
File metadata
- Download URL: discordwrap-0.9.0-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/37.3 requests/2.28.2 requests-toolbelt/0.10.1 urllib3/1.26.14 tqdm/4.64.1 importlib-metadata/6.0.0 keyring/23.13.1 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 636995c4a2c8f979893763424aa57988fe38f8935d5ee0121a33eea1ea407b61 |
|
MD5 | 3bb5a652f4ee2478af93fa515cb5aa40 |
|
BLAKE2b-256 | eb04f4a4337064e5d30153be91dac64d8af4e27e80d0a79acdda04f77290fc3a |