An asynchronous wrapper for the discord.bio api
Project description
discordbio
An asynchronous Python wrapper for the discord.bio API
Installing
pip install discordbio
Usage
- Setting up the client
This will be used to make requests to the API
from discordbio import DBioClient
client = DBioClient()
- Getting a user's details, via username or Discord ID
All methods of DBioClient are typed meaning your IDE should auto complete the attributes If not, you can import the types (UserDetails and UserConnections) and manually set the type
details = await client.details("geek")
# With Type
from discordbio import UserDetails
details: UserDetails = await client.details("geek")
- Getting a specific value from a user's details, e.g. description
description = (await client.details("geek")).settings.description
- Getting a user's connections
connections = await client.connections("geek")
# With Discord connections
connections = await client.connections("geek", with_discord=True)
# With Type
from discordbio import UserConnections
connections: UserConnections = await client.connections("geek", with_discord=True)
Attributes
- Details (from client.details)
settings: Settings
discord: Discord
- Settings
user_id: int
name: str
status: Optional[str]
description: Optional[str]
verified: bool
upvotes: int
premium: bool
location: Optional[str]
gender: Optional[str]
birthday: Optional[datetime]
email: Optional[str]
occupation: Optional[str]
created_at: datetime
banner: Optional[str]
- Discord
id: int
username: str
avatar: Optional[str]
discriminator: str
- Connections (from client.connections)
github: Optional[str]
website: Optional[str]
instagram: Optional[str]
snapchat: Optional[str]
linkedin: Optional[str]
discord: List[DiscordConnection]
- Discord Connections
connection_type: str
name: str
url: str
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
discordbio-1.1.0.tar.gz
(4.7 kB
view hashes)
Built Distribution
Close
Hashes for discordbio-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b59632c92c07fdcb2c2b7b91b9119d0110d37420856de293ea532336345ca59 |
|
MD5 | e9e9466eb8e462131b5a3e20978441ec |
|
BLAKE2b-256 | c5257f327ab4e4493043bfa6bb02dd2442945dd8f10cc0b354b385b8c69182b3 |