{"id":21908634,"url":"https://github.com/tibue99/cookie-api","last_synced_at":"2025-10-13T00:03:26.300Z","repository":{"id":241967393,"uuid":"800087404","full_name":"tibue99/cookie-api","owner":"tibue99","description":"Official wrapper for the Cookie API","archived":false,"fork":false,"pushed_at":"2025-04-05T11:30:30.000Z","size":70,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T11:31:56.172Z","etag":null,"topics":["api","bot","cookie","discord"],"latest_commit_sha":null,"homepage":"https://cookie-api.readthedocs.io/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tibue99.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-13T17:17:10.000Z","updated_at":"2025-04-05T11:30:33.000Z","dependencies_parsed_at":"2025-01-07T17:39:16.690Z","dependency_job_id":"20fc5dbd-1759-4f74-8045-7ac8090a0f7b","html_url":"https://github.com/tibue99/cookie-api","commit_stats":null,"previous_names":["tibue99/cookie-api"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tibue99%2Fcookie-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tibue99%2Fcookie-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tibue99%2Fcookie-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tibue99%2Fcookie-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tibue99","download_url":"https://codeload.github.com/tibue99/cookie-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249183064,"owners_count":21226140,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","bot","cookie","discord"],"created_at":"2024-11-28T17:13:04.131Z","updated_at":"2025-10-13T00:03:26.146Z","avatar_url":"https://github.com/tibue99.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cookie API\n[![](https://img.shields.io/pypi/v/cookie-api.svg?style=for-the-badge\u0026logo=pypi\u0026color=yellow\u0026logoColor=white)](https://pypi.org/project/cookie-api/)\n[![](https://img.shields.io/pypi/l/cookie-api?style=for-the-badge\u0026color=5865F2)](https://github.com/tibue99/cookie-api/blob/main/LICENSE)\n[![](https://img.shields.io/readthedocs/cookie-api?style=for-the-badge)](https://cookie-api.readthedocs.io/)\n[![](https://img.shields.io/badge/Cookie-Website-orange?style=for-the-badge)](https://cookieapp.me/)\n\nOfficial wrapper for the [Cookie](https://cookieapp.me) API.\n\n## ⚙️ Installation\nPython 3.9 or higher is required\n```\npip install cookie-api\n```\n\n## 🔑 How to get an API key?\n1. Invite [Cookie](https://cookieapp.me) to your Discord server or to your Discord account\n2. Run `/premium api`\n\n## 🚀 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-api.readthedocs.io/).\n\n### Sync Example\n```python\nfrom cookie 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 cookie 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\n## ⚡ OpenAPI Docs\nIf you want to use the API without this wrapper, you can find the OpenAPI docs [here](https://api.cookieapp.me/docs).\n\nThe models in this package are automatically generated using the OpenAPI spec:\n```\npython cookie/_internal/model_generator.py\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftibue99%2Fcookie-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftibue99%2Fcookie-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftibue99%2Fcookie-api/lists"}