bungio


Namebungio JSON
Version 1.2.0 PyPI version JSON
download
home_pageNone
SummaryA destiny 2 / bungie api wrapper
upload_time2024-10-11 21:22:20
maintainerNone
docs_urlNone
authorDaniel J
requires_python>=3.10
licenseMIT License Copyright (c) 2022 - present Kigstn Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords asyncio destiny destiny 2 bungie api
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![](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())
```
---

## Dev Setup

#### Install Dependencies
- `pip install uv`
- `uv pip install -e .[speedups,cache,docs,test,dev]`

#### Run Tests
- `pytest .`

#### Run Docs
- `mkdocs serve`

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "bungio",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "asyncio, destiny, destiny 2, bungie, api",
    "author": "Daniel J",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/5c/09/5eaefe9f721aae918a89b0dc40b57860a0ad0731e93ad5bcf5e3ebe69453/bungio-1.2.0.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\n## Dev Setup\n\n#### Install Dependencies\n- `pip install uv`\n- `uv pip install -e .[speedups,cache,docs,test,dev]`\n\n#### Run Tests\n- `pytest .`\n\n#### Run Docs\n- `mkdocs serve`\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2022 - present Kigstn  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "A destiny 2 / bungie api wrapper",
    "version": "1.2.0",
    "project_urls": {
        "Documentation": "https://bungio.readthedocs.io/en/latest/",
        "Repository": "https://github.com/Kigstn/BungIO"
    },
    "split_keywords": [
        "asyncio",
        " destiny",
        " destiny 2",
        " bungie",
        " api"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4794db1c60a2f68d4d910f7846cd0a8b1b290491fefd2937f7cbf35a483f40ac",
                "md5": "992325def271571cfbc0d1416b0d07ea",
                "sha256": "6aca8c112e69132c70a5d2945a6f53fbe255a09564de657da5269f5b9cd78d7e"
            },
            "downloads": -1,
            "filename": "bungio-1.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "992325def271571cfbc0d1416b0d07ea",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 403847,
            "upload_time": "2024-10-11T21:22:17",
            "upload_time_iso_8601": "2024-10-11T21:22:17.665630Z",
            "url": "https://files.pythonhosted.org/packages/47/94/db1c60a2f68d4d910f7846cd0a8b1b290491fefd2937f7cbf35a483f40ac/bungio-1.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5c095eaefe9f721aae918a89b0dc40b57860a0ad0731e93ad5bcf5e3ebe69453",
                "md5": "3c1c33e64dce06c75f0f4ca682810460",
                "sha256": "d64a3efab6fb5fa1cedc742896f03a7d053383db5b4b3f0ef2d50e110c48bbaa"
            },
            "downloads": -1,
            "filename": "bungio-1.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "3c1c33e64dce06c75f0f4ca682810460",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 298795,
            "upload_time": "2024-10-11T21:22:20",
            "upload_time_iso_8601": "2024-10-11T21:22:20.277883Z",
            "url": "https://files.pythonhosted.org/packages/5c/09/5eaefe9f721aae918a89b0dc40b57860a0ad0731e93ad5bcf5e3ebe69453/bungio-1.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-11 21:22:20",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Kigstn",
    "github_project": "BungIO",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "bungio"
}
        
Elapsed time: 2.14234s