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

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


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

Uploaded Source

Built Distribution

bungio-1.1.0-py3-none-any.whl (403.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bungio-1.1.0.tar.gz
  • Upload date:
  • Size: 299.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.14

File hashes

Hashes for bungio-1.1.0.tar.gz
Algorithm Hash digest
SHA256 ab9ecaaa4e8411cfc6ebee7060f632de04834aa66052697ce6ad5b60fdbf3f9a
MD5 0ba82720fa9171eafd0b977b95baa828
BLAKE2b-256 4a95c561c265f98e0fa73d30534be4c8e239e9ef6190395f98e22716d8bef1d8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bungio-1.1.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.14

File hashes

Hashes for bungio-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b599d13ddea94b6a316c1a66e1e6970ee64fd62ff118a37a141158d0ad3ab148
MD5 2500a5336d3eff20b12499dc8a896fb9
BLAKE2b-256 08f2d76adce4d12e9e6ebdeef1b8c03bab7bf46e2a058d3b0e0df64fd18d129e

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