Skip to main content

A destiny 2 / bungie api wrapper

Project description

BungIO Logo

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())

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

bungio-0.7.2.tar.gz (274.1 kB view details)

Uploaded Source

Built Distribution

bungio-0.7.2-py3-none-any.whl (376.1 kB view details)

Uploaded Python 3

File details

Details for the file bungio-0.7.2.tar.gz.

File metadata

  • Download URL: bungio-0.7.2.tar.gz
  • Upload date:
  • Size: 274.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for bungio-0.7.2.tar.gz
Algorithm Hash digest
SHA256 d0f852bd78f2e6f8b08f54254677a0f5b3447805993e6f4873ff3ebc18293991
MD5 4e5619de500231dad8a03bd9c2692e38
BLAKE2b-256 fa3cbbd8567572ebf66699f0959624a7a5da7d6c48f023f746843e4abd36dd38

See more details on using hashes here.

File details

Details for the file bungio-0.7.2-py3-none-any.whl.

File metadata

  • Download URL: bungio-0.7.2-py3-none-any.whl
  • Upload date:
  • Size: 376.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for bungio-0.7.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c3047cc489b3aaff2cd6329e47989ab9b91a799b8e00107364a36e1dddba4f1f
MD5 9e7e0eb82a747e864ecf0136c1ba459c
BLAKE2b-256 082530eb3e7c140499187de42c95a9a3ef045a741430adcebc6150c8b71698b6

See more details on using hashes here.

Supported by

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