Skip to main content

For interacting with the Bungie.net API

Project description

Installation

pip install pybungie

Features

  • Painless interaction with the Bungie.net API
  • Supports most calls and enumeration types, later versions will expand functionality
  • OAuth2 implementation*

*Not suitable for production code

Getting Started

In your working directory, after installing pybungie, edit the ini file before getting started. The file should be located here.

External Libraries
|— site-packages
|      |— pybungie
|            |— config
|                  |— pybungie.ini

This is essential to generate a self-sign certificate in order to use OAuth2 required api calls.

Usage

from pybungie import BungieAPI, MembershipType, VendorHash, Components

my_membership_type = MembershipType.STEAM
bungie_api = BungieAPI(api_key="api_key")
bungie_api.input_xbox_credentials(xbox_live_email="example@example.com", xbox_live_password="password")
bungie_api.start_oauth2(client_id="client_id", client_secret="client_secret")
membership_id = bungie_api.search_destiny_player(membership_type=my_membership_type, display_name="Hayden23")[0]['membershipId']
character_id = bungie_api.get_profile(membership_type=my_membership_type, membership_id=membership_id,
                                     components=Components.Profiles)['profile']['data']['characterIds'][0]
zavala = bungie_api.get_vendor(membership_type=my_membership_type, membership_id=membership_id,
                              character_id=character_id, vendor_hash=VendorHash.ZAVALA.value,
                              components=Components.VendorSales)
bungie_api.close_oauth2()

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

pybungie-0.6.3.tar.gz (9.0 kB view hashes)

Uploaded Source

Built Distribution

pybungie-0.6.3-py3-none-any.whl (8.9 kB view hashes)

Uploaded Python 3

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