[![](https://img.shields.io/pypi/v/bungio?label=Version&logo=pypi)](https://pypi.org/project/bungio/)
[![](https://img.shields.io/pypi/dm/bungio?label=Downloads&logo=pypi)](https://pypi.org/project/bungio/)
[![](https://img.shields.io/readthedocs/bungio?label=Docs&logo=readthedocs)](https://bungio.readthedocs.io/en/latest/)
![](https://img.shields.io/badge/Python-3.10+-1081c1?logo=python)
[![](https://img.shields.io/github/workflow/status/Kigstn/BungIO/Black%20Formatting/master?label=Black%20Formatting&logo=github)](https://github.com/Kigstn/BungIO/actions/workflows/black.yml)
[![](https://img.shields.io/github/workflow/status/Kigstn/BungIO/Flake8%20Styling/master?label=Flake%20Styling&logo=github)](https://github.com/Kigstn/BungIO/actions/workflows/flake.yml)
<h1 align="center">
<p>
<img src="https://raw.githubusercontent.com/Kigstn/BungIO/master/docs/src/images/favicon.png" alt="BungIO Logo">
</p>
BungIO
</h1>
---
BungIO is a modern and pythonic wrapper for Bungies Destiny 2 API.
- [X] Python 3.10+
- [X] Asynchronous
- [X] 100% typed and raw api coverage
- [X] Ratelimit compliant
- [X] Manifest support
- [X] OAuth2 support
- [X] Easily used in combination with other libraries like FastApi
Click [here](https://bungio.readthedocs.io/en/latest/installation) to get started or visit
the [guides](https://bungio.readthedocs.io/en/latest/Guides/basic)
or [api reference](https://bungio.readthedocs.io/en/latest/API%20Reference/client/).
## Basic Example
```py
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())
```
Raw data
{
"_id": null,
"home_page": "https://github.com/Kigstn/BungIO",
"name": "bungio",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.10,<4.0",
"maintainer_email": "",
"keywords": "asyncio,destiny,destiny 2,bungie,api",
"author": "Daniel J",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/eb/cd/24200349eb358bfed7b3a562d23c523e6cb453ae9b7c0856acdea44363c7/bungio-0.8.2.tar.gz",
"platform": null,
"description": "[![](https://img.shields.io/pypi/v/bungio?label=Version&logo=pypi)](https://pypi.org/project/bungio/)\n[![](https://img.shields.io/pypi/dm/bungio?label=Downloads&logo=pypi)](https://pypi.org/project/bungio/)\n[![](https://img.shields.io/readthedocs/bungio?label=Docs&logo=readthedocs)](https://bungio.readthedocs.io/en/latest/)\n![](https://img.shields.io/badge/Python-3.10+-1081c1?logo=python)\n[![](https://img.shields.io/github/workflow/status/Kigstn/BungIO/Black%20Formatting/master?label=Black%20Formatting&logo=github)](https://github.com/Kigstn/BungIO/actions/workflows/black.yml)\n[![](https://img.shields.io/github/workflow/status/Kigstn/BungIO/Flake8%20Styling/master?label=Flake%20Styling&logo=github)](https://github.com/Kigstn/BungIO/actions/workflows/flake.yml)\n\n\n<h1 align=\"center\">\n <p>\n <img src=\"https://raw.githubusercontent.com/Kigstn/BungIO/master/docs/src/images/favicon.png\" alt=\"BungIO Logo\">\n </p>\n BungIO\n</h1>\n\n---\n\nBungIO is a modern and pythonic wrapper for Bungies Destiny 2 API.\n\n- [X] Python 3.10+\n- [X] Asynchronous\n- [X] 100% typed and raw api coverage\n- [X] Ratelimit compliant\n- [X] Manifest support\n- [X] OAuth2 support\n- [X] Easily used in combination with other libraries like FastApi\n\nClick [here](https://bungio.readthedocs.io/en/latest/installation) to get started or visit\nthe [guides](https://bungio.readthedocs.io/en/latest/Guides/basic)\nor [api reference](https://bungio.readthedocs.io/en/latest/API%20Reference/client/).\n\n\n## Basic Example\n\n```py\nimport asyncio\nimport os\n\nfrom bungio import Client\nfrom bungio.models import BungieMembershipType, DestinyActivityModeType, DestinyUser\n\n\n# create the client obj with our bungie authentication\nclient = Client(\n bungie_client_id=os.getenv(\"bungie_client_id\"),\n bungie_client_secret=os.getenv(\"bungie_client_secret\"),\n bungie_token=os.getenv(\"bungie_token\"),\n)\n\nasync def main():\n # create a user obj using a known bungie id\n user = DestinyUser(membership_id=4611686018467765462, membership_type=BungieMembershipType.TIGER_STEAM)\n\n # iterate thought the raids that user has played\n async for activity in user.yield_activity_history(mode=DestinyActivityModeType.RAID):\n\n # print the date of the activity\n print(activity.period)\n\n# bungio is by nature asynchronous, it can only be run in an asynchronous context\nasyncio.run(main())\n```\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A destiny 2 / bungie api wrapper",
"version": "0.8.2",
"split_keywords": [
"asyncio",
"destiny",
"destiny 2",
"bungie",
"api"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "01c63d8349cf63902378a9d43c6dc37ff1aa366964a4dbb396c960a17a04efff",
"md5": "3b907630915630c37c124684332aba61",
"sha256": "70a52d717fac2d3dbd96147bbeba133c1bc48277d5b23cd0dfb8b7f543077e58"
},
"downloads": -1,
"filename": "bungio-0.8.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3b907630915630c37c124684332aba61",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10,<4.0",
"size": 383991,
"upload_time": "2023-03-12T15:24:57",
"upload_time_iso_8601": "2023-03-12T15:24:57.054120Z",
"url": "https://files.pythonhosted.org/packages/01/c6/3d8349cf63902378a9d43c6dc37ff1aa366964a4dbb396c960a17a04efff/bungio-0.8.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ebcd24200349eb358bfed7b3a562d23c523e6cb453ae9b7c0856acdea44363c7",
"md5": "42f020347009fa023450c9a5d413dee3",
"sha256": "91041fe2ff8c26b5f779c9b3b1999fa96acc7ce68e9884449fbfe1099c492d29"
},
"downloads": -1,
"filename": "bungio-0.8.2.tar.gz",
"has_sig": false,
"md5_digest": "42f020347009fa023450c9a5d413dee3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10,<4.0",
"size": 278197,
"upload_time": "2023-03-12T15:24:58",
"upload_time_iso_8601": "2023-03-12T15:24:58.829459Z",
"url": "https://files.pythonhosted.org/packages/eb/cd/24200349eb358bfed7b3a562d23c523e6cb453ae9b7c0856acdea44363c7/bungio-0.8.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-03-12 15:24:58",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "Kigstn",
"github_project": "BungIO",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "bungio"
}