A destiny 2 / bungie api wrapper
Project description
BungIO
BungIO is a modern and pythonic wrapper for Bungies Destiny 2 API.
- Python 3.10+
- Asynchronous
- 100% typed and raw api coverage
- Ratelimit compliant
- Manifest support
- OAuth2 support
- Easily used in combination with other libraries like FastApi
Click here to get started or visit the guides or api reference.
Basic Example
import asyncio
import os
from bungio import Client
from bungio.models import BungieMembershipType, DestinyActivityModeType, DestinyUser
# create the client obj with our bungie authentication
client = Client(
bungie_client_id=os.getenv("BUNGIE_CLIENT_ID"),
bungie_client_secret=os.getenv("BUNGIE_CLIENT_SECRET"),
bungie_token=os.getenv("BUNGIE_TOKEN"),
)
async def main():
# create a user obj using a known bungie id
user = DestinyUser(membership_id=4611686018467765462, membership_type=BungieMembershipType.TIGER_STEAM)
# iterate thought the raids that user has played
async for activity in user.yield_activity_history(mode=DestinyActivityModeType.RAID):
# print the date of the activity
print(activity.period)
# bungio is by nature asynchronous, it can only be run in an asynchronous context
asyncio.run(main())
Dev Setup
Install Dependencies
pip install uv
uv pip install -e .[speedups,cache,docs,test,dev]
Run Tests
pytest .
Run Docs
mkdocs serve
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
bungio-1.2.0.tar.gz
(298.8 kB
view details)
Built Distribution
bungio-1.2.0-py3-none-any.whl
(403.8 kB
view details)
File details
Details for the file bungio-1.2.0.tar.gz
.
File metadata
- Download URL: bungio-1.2.0.tar.gz
- Upload date:
- Size: 298.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d64a3efab6fb5fa1cedc742896f03a7d053383db5b4b3f0ef2d50e110c48bbaa |
|
MD5 | 3c1c33e64dce06c75f0f4ca682810460 |
|
BLAKE2b-256 | 5c095eaefe9f721aae918a89b0dc40b57860a0ad0731e93ad5bcf5e3ebe69453 |
File details
Details for the file bungio-1.2.0-py3-none-any.whl
.
File metadata
- Download URL: bungio-1.2.0-py3-none-any.whl
- Upload date:
- Size: 403.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6aca8c112e69132c70a5d2945a6f53fbe255a09564de657da5269f5b9cd78d7e |
|
MD5 | 992325def271571cfbc0d1416b0d07ea |
|
BLAKE2b-256 | 4794db1c60a2f68d4d910f7846cd0a8b1b290491fefd2937f7cbf35a483f40ac |