Skip to main content

An unoffical asynchronous wrapper for the discord.bio API.

Project description

pydiscordbio PyPI - Downloads PyPI

An unofficial asynchronous Python wrapper for the discord.bio api.

Installing

pip install pydiscordbio

Usage

  • Setting up the client

    This will be used to make requests to the API

from pydiscordbio import Client

client = Client()
  • Exceptions
Error Description
pydiscordbio.exceptions.APIError Raised when the request to the API itself fails
pydiscordbio.exceptions.NotFound Raised when the request to the API returns status code 404
pydiscordbio.exceptions.UserNotFound Raised when a user doesn't exist in the API
pydiscordbio.exceptions.InvalidSearch Raised when a search query is invalid
  • Getting a user's details, discord info and connections via username or Discord ID

    All methods of Client are typed meaning your IDE should auto complete the attributes

user = await client.user("wa")
#or
user = await client.user(738128655145762949)
  • Getting a specific value from a user's details, e.g. description or a users banner URL
description = (await client.user("wa")).details.description

banner_url = (await client.user("wa")).details.banner
  • Getting a specific value from a user's Discord, e.g. discord ID or username
description = (await client.user("wa")).discord.id

banner_url = (await client.user("wa")).discord.username
  • Getting a user's connected website
website = (await client.user("wa")).connections.website

# Discord connections
discord_connections = (await client.user("wa")).connections.discord
# Returns a list of DiscordConnection objects
  • Miscellaneous Endpoints
top_users = await client.top()
# Returns a list of PartialUser objects from the top liked profiles
result = await client.search('Adam')
# Returns a list of PartialUser objects from the query

Attributes

  • UserDetails (from client.user)
details: User
discord: Discord
connections: UserConnections
  • User
slug: str
user_id: int
flags: int
verified: bool
premium_type: int
created_at: datetime
description: str
location: str
gender: int
birthday: Optional[datetime]
email: Optional[str]
occupation: Optional[str]
banner: Optional[str]
premium: bool
staff: bool
likes: int
  • Discord
id: int
username: str
full_username: str
avatar: Optional[str]
avatar_url: str
is_avatar_animated: bool
discriminator: str
flags: int
  • UserConnections
website: Optional[str]
instagram: Optional[str]
snapchat: Optional[str]
linkedin: Optional[str]
discord: List[DiscordConnection]
  • PartialUser
slug: str
verified: bool
staff: bool
premium: bool
likes: int
description: Optional[str]
discord: Discord
  • DiscordConnection
connection_type: str
name: str
id: str

Project details


Download files

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

Source Distribution

pydiscordbio-1.2.1.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pydiscordbio-1.2.1-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file pydiscordbio-1.2.1.tar.gz.

File metadata

  • Download URL: pydiscordbio-1.2.1.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.3

File hashes

Hashes for pydiscordbio-1.2.1.tar.gz
Algorithm Hash digest
SHA256 88495127e40e7137f5df0ef714628da87cbf87771d064e4898eb3c3f891ebe69
MD5 d9056e1ab895d3af85f1e40518a13696
BLAKE2b-256 be14424fc4bb90aa02128582e0d1fa8825437e2586c6c418f0065bfb39a69279

See more details on using hashes here.

File details

Details for the file pydiscordbio-1.2.1-py3-none-any.whl.

File metadata

  • Download URL: pydiscordbio-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.3

File hashes

Hashes for pydiscordbio-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2d7fa68a87d24e2ad2b7cef5e216b920b4de95fe38821882ac4113f05f52d3d3
MD5 9565aa35ee706b159e7c421bfe02a861
BLAKE2b-256 1556cd1fa18b26b0a92fdc3252adf81b739fceca6b560046f619ce940b026241

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page