botify-api


Namebotify-api JSON
Version 0.0.1 PyPI version JSON
download
home_pageNone
SummaryAn API wrapper for the Botify API
upload_time2024-12-21 10:44:25
maintainerNone
docs_urlNone
authorTimo
requires_python>=3.9
licenseMIT
keywords discord bot botify api
VCS
bugtrack_url
requirements httpx python-dotenv
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Botify API
[![](https://img.shields.io/pypi/v/botify-api.svg?style=for-the-badge&logo=pypi&color=yellow&logoColor=white)](https://pypi.org/project/botify-api/)
[![](https://img.shields.io/pypi/l/botify-api?style=for-the-badge&color=5865F2)](https://github.com/timoo4devv/botify-api/blob/main/LICENSE)
[![](https://img.shields.io/readthedocs/botify-api?style=for-the-badge)](https://botify-api.readthedocs.io/)

Official wrapper for the Botify API.

## ⚙️ Installation
Python 3.9 or higher is required
```
pip install botify-api
```

## 🔑 How to get an API key?
1. Invite [Botify](https://discord.com/oauth2/authorize?client_id=1259624304526491669&permissions=8&integration_type=0&scope=bot+applications.commands) to your Discord server or to your Discord account
2. Run `/premium api`

## 🚀 Example Usage
The API key can be passed as a parameter or set as the environment variable `BOTIFY_KEY`.
For more information, see to our [documentation](https://botify-api.readthedocs.io/).

### Sync Example
```python
from botify import BotifyAPI

api = BotifyAPI(api_key="[YOUR_API_KEY]")

user_stats = api.get_user_stats(123456789)  # Replace with user ID
```
### Async Example
```python
import asyncio
from botify import AsyncBotifyAPI

api = AsyncBotifyAPI(api_key="[YOUR_API_KEY]")

async def main():
    user_stats = await api.get_user_stats(123456789)  # Replace with user ID
    await api.close()

asyncio.run(main())
```
You can also use an asynchronous context manager (recommended)
```python
async def main():
    async with api as con:
        user_stats = await con.get_user_stats(123456789)  # Replace with user ID
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "botify-api",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "discord, bot, botify, api",
    "author": "Timo",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/74/a1/346229c792316e6bbff17d83bdbe1e350503ba817f4a922b4ff7b7f68269/botify_api-0.0.1.tar.gz",
    "platform": null,
    "description": "# Botify API\r\n[![](https://img.shields.io/pypi/v/botify-api.svg?style=for-the-badge&logo=pypi&color=yellow&logoColor=white)](https://pypi.org/project/botify-api/)\r\n[![](https://img.shields.io/pypi/l/botify-api?style=for-the-badge&color=5865F2)](https://github.com/timoo4devv/botify-api/blob/main/LICENSE)\r\n[![](https://img.shields.io/readthedocs/botify-api?style=for-the-badge)](https://botify-api.readthedocs.io/)\r\n\r\nOfficial wrapper for the Botify API.\r\n\r\n## \u2699\ufe0f Installation\r\nPython 3.9 or higher is required\r\n```\r\npip install botify-api\r\n```\r\n\r\n## \ud83d\udd11 How to get an API key?\r\n1. Invite [Botify](https://discord.com/oauth2/authorize?client_id=1259624304526491669&permissions=8&integration_type=0&scope=bot+applications.commands) to your Discord server or to your Discord account\r\n2. Run `/premium api`\r\n\r\n## \ud83d\ude80 Example Usage\r\nThe API key can be passed as a parameter or set as the environment variable `BOTIFY_KEY`.\r\nFor more information, see to our [documentation](https://botify-api.readthedocs.io/).\r\n\r\n### Sync Example\r\n```python\r\nfrom botify import BotifyAPI\r\n\r\napi = BotifyAPI(api_key=\"[YOUR_API_KEY]\")\r\n\r\nuser_stats = api.get_user_stats(123456789)  # Replace with user ID\r\n```\r\n### Async Example\r\n```python\r\nimport asyncio\r\nfrom botify import AsyncBotifyAPI\r\n\r\napi = AsyncBotifyAPI(api_key=\"[YOUR_API_KEY]\")\r\n\r\nasync def main():\r\n    user_stats = await api.get_user_stats(123456789)  # Replace with user ID\r\n    await api.close()\r\n\r\nasyncio.run(main())\r\n```\r\nYou can also use an asynchronous context manager (recommended)\r\n```python\r\nasync def main():\r\n    async with api as con:\r\n        user_stats = await con.get_user_stats(123456789)  # Replace with user ID\r\n```\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "An API wrapper for the Botify API",
    "version": "0.0.1",
    "project_urls": {
        "Documentation": "https://botify-api.readthedocs.io",
        "GitHub": "https://github.com/timoo4devv/botify-api"
    },
    "split_keywords": [
        "discord",
        " bot",
        " botify",
        " api"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2ae58134b28a1da0d8ab2ed858fa6c2fc81acc39c7055bca62a7f65b2ca2f6fe",
                "md5": "b5883106d1c5f21099a26153c211fb9d",
                "sha256": "3e19357496f61fe29cf2bdfd804d8135119fb25b056420dc4db8d189d977d814"
            },
            "downloads": -1,
            "filename": "botify_api-0.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b5883106d1c5f21099a26153c211fb9d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 6198,
            "upload_time": "2024-12-21T10:44:23",
            "upload_time_iso_8601": "2024-12-21T10:44:23.500287Z",
            "url": "https://files.pythonhosted.org/packages/2a/e5/8134b28a1da0d8ab2ed858fa6c2fc81acc39c7055bca62a7f65b2ca2f6fe/botify_api-0.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "74a1346229c792316e6bbff17d83bdbe1e350503ba817f4a922b4ff7b7f68269",
                "md5": "23b7891e8ec8a0c5e63b37f028f9b464",
                "sha256": "ec509cd121211b788c6241040e2a2a5a023c4c9975790820b57e859db3df5563"
            },
            "downloads": -1,
            "filename": "botify_api-0.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "23b7891e8ec8a0c5e63b37f028f9b464",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 6135,
            "upload_time": "2024-12-21T10:44:25",
            "upload_time_iso_8601": "2024-12-21T10:44:25.786125Z",
            "url": "https://files.pythonhosted.org/packages/74/a1/346229c792316e6bbff17d83bdbe1e350503ba817f4a922b4ff7b7f68269/botify_api-0.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-21 10:44:25",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "timoo4devv",
    "github_project": "botify-api",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "httpx",
            "specs": []
        },
        {
            "name": "python-dotenv",
            "specs": []
        }
    ],
    "lcname": "botify-api"
}
        
Elapsed time: 0.40099s