A small async api wrapper for the bungie api
Project description
Features
- Asynchronous.
- Simplicity.
- Statically typed.
- All endpoints will be implemented.
Installing
Official release.
$ pip install aiobungie
Development
$ pip install git+https://github.com/nxtlo/aiobungie
Quick Example
import aiobungie
from aiobungie import crate
# crates in aiobungie are implementations
# of Bungie's objects to provide
# more functionality.
client = aiobungie.Client(key='YOUR_API_KEY')
async def main() -> None:
# fetch a clan
clan: crate.Clan = await client.fetch_clan("Nuanceㅤ")
print(clan.name, clan.id, clan.owner.name, clan.owner.id, ...)
# fetch a member from the clan.
member: crate.ClanMember = await clan.fetch_member("Fate怒")
print(member.name, member.id, member.type, ...)
# fetch the clan members and return only steam players
members = await clan.fetch_members(aiobungie.MembershipType.STEAM)
print(members)
# fetch my profile.
profile: crate.Profile = await client.fetch_profile(member.id, member.type)
print(profile.name, profile.id, profile.type, ...)
# You can fetch a character in two ways.
# Whether from the player's profile or
# using `fetch_character()` method.
# The profile way.
warlock: crate.Character = await profile.warlock()
print(warlock.light, warlock.id, warlock.gender, warlock.race, ...)
# the fetch_character() way using the profile attrs.
character: crate.Character = await client.fetch_character(profile.id, profile.type, profile.warlock_id)
print(character.light, character.id, character.gender, character.race, ...)
Requirements
- Python >=3.8
- aiohttp
- attrs.
Optional Requirements for speedups.
- aiodns
- cchardet
- uvloop
Getting Help
- Discord:
Fate 怒#0008
|350750086357057537
- Docs: Here.
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
aiobungie-0.2.5b5.tar.gz
(30.5 kB
view hashes)
Built Distribution
Close
Hashes for aiobungie-0.2.5b5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dfcf4bae12dc70a7b918ffb7bcbdbbecba4df43d199532bedc2db971f8aa0f4e |
|
MD5 | 20454a3b409569ae2a206a4698beb641 |
|
BLAKE2b-256 | 86ef7a7ff79cd5139ee889fc92a5a496b1f76062f6f64c1dd9014f757630dfba |