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.4.0.tar.gz (272.0 kB view details)

Uploaded Source

Built Distribution

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

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: bungio-0.4.0.tar.gz
  • Upload date:
  • Size: 272.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for bungio-0.4.0.tar.gz
Algorithm Hash digest
SHA256 5240f3adf784e363e762c6f8bede115528a38298ec1e2994912681aaabb2adc0
MD5 eb6ee11d26659f183e2adcd973b3fcdf
BLAKE2b-256 00fb9f4e792d0ddc4ddd358a34a700fb0fc718f340b8e1043939bae3503db7b8

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for bungio-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f04761bda65fea629ac73fcf0859e42a057bbd7df84bc87d6871627659a263ed
MD5 00ad5c5aae0a1271f61f12f07d084962
BLAKE2b-256 1b38ec4457fc89c4c73daed06e5b5fac04bbde564c4b7a016540881ee398554b

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