cookiebot


Namecookiebot JSON
Version 0.2.0 PyPI version JSON
download
home_pageNone
SummaryAn API wrapper for the CookieBot API
upload_time2024-07-11 12:18:13
maintainerNone
docs_urlNone
authortibue99, tobfd
requires_python>=3.9
licenseMIT
keywords cookie-bot cookie api
VCS
bugtrack_url
requirements httpx python-dotenv
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # CookieBot API
Official wrapper for the [CookieBot](https://cookie-bot.xyz) API.

## ⚙️ Installation
Python 3.9 or higher is required
```
pip install cookiebot
```

## 🔑 How to get an API key?
1. Invite [CookieBot](https://cookie-bot.xyz) 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 `COOKIE_KEY`.
For more information, see to our [documentation](https://cookie-bot.xyz/docs/api).

### Sync Example
```python
from cookiebot import CookieAPI

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

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

api = AsyncCookieAPI(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": "cookiebot",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "cookie-bot, cookie, api",
    "author": "tibue99, tobfd",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/34/a0/7708fcb7bc2207e1daa20e36c60d2ac586cb7011985bbd7252a42fc0e82e/cookiebot-0.2.0.tar.gz",
    "platform": null,
    "description": "# CookieBot API\nOfficial wrapper for the [CookieBot](https://cookie-bot.xyz) API.\n\n## \u2699\ufe0f Installation\nPython 3.9 or higher is required\n```\npip install cookiebot\n```\n\n## \ud83d\udd11 How to get an API key?\n1. Invite [CookieBot](https://cookie-bot.xyz) to your Discord server or to your Discord account\n2. Run `/premium api`\n\n## \ud83d\ude80 Example Usage\nThe API key can be passed as a parameter or set as the environment variable `COOKIE_KEY`.\nFor more information, see to our [documentation](https://cookie-bot.xyz/docs/api).\n\n### Sync Example\n```python\nfrom cookiebot import CookieAPI\n\napi = CookieAPI(api_key=\"[YOUR_API_KEY]\")\n\nuser_stats = api.get_user_stats(123456789)  # Replace with user ID\n```\n### Async Example\n```python\nimport asyncio\nfrom cookiebot import AsyncCookieAPI\n\napi = AsyncCookieAPI(api_key=\"[YOUR_API_KEY]\")\n\nasync def main():\n    user_stats = await api.get_user_stats(123456789)  # Replace with user ID\n    await api.close()\n\nasyncio.run(main())\n```\nYou can also use an asynchronous context manager (recommended)\n```python\nasync def main():\n    async with api as con:\n        user_stats = await con.get_user_stats(123456789)  # Replace with user ID\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "An API wrapper for the CookieBot API",
    "version": "0.2.0",
    "project_urls": {
        "CookieBot": "https://cookie-bot.xyz",
        "Documentation": "https://cookiebot.readthedocs.io",
        "GitHub": "https://github.com/tibue99/cookie-api"
    },
    "split_keywords": [
        "cookie-bot",
        " cookie",
        " api"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0e7b4c1658eaf0350f15a6888474311f7fece82603dff64264484ca0f0fb5cd6",
                "md5": "924111b90c2fe5644078ae500757959f",
                "sha256": "3bfe59c699ef4eb34f2d435d54cfab71f1cf567d3f467b08c755705d4f208e0b"
            },
            "downloads": -1,
            "filename": "cookiebot-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "924111b90c2fe5644078ae500757959f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 5704,
            "upload_time": "2024-07-11T12:18:11",
            "upload_time_iso_8601": "2024-07-11T12:18:11.983086Z",
            "url": "https://files.pythonhosted.org/packages/0e/7b/4c1658eaf0350f15a6888474311f7fece82603dff64264484ca0f0fb5cd6/cookiebot-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "34a07708fcb7bc2207e1daa20e36c60d2ac586cb7011985bbd7252a42fc0e82e",
                "md5": "02cadc4bb0ec841e48872657df36533f",
                "sha256": "80571850a3fe634f2a72aeda73f77e992a5ee7816a5dc0b189c87509e7acaaf8"
            },
            "downloads": -1,
            "filename": "cookiebot-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "02cadc4bb0ec841e48872657df36533f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 4938,
            "upload_time": "2024-07-11T12:18:13",
            "upload_time_iso_8601": "2024-07-11T12:18:13.480226Z",
            "url": "https://files.pythonhosted.org/packages/34/a0/7708fcb7bc2207e1daa20e36c60d2ac586cb7011985bbd7252a42fc0e82e/cookiebot-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-11 12:18:13",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "tibue99",
    "github_project": "cookie-api",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "httpx",
            "specs": []
        },
        {
            "name": "python-dotenv",
            "specs": []
        }
    ],
    "lcname": "cookiebot"
}
        
Elapsed time: 0.57580s