# kickthespypet-api
A kickthespy.pet API wrapper for Python with fully documented and type-annotated. All API are made using [the javascript file from the website](https://kickthespy.pet/main.js)
## Installing
```shell
pip install git+https://github.com/timelessnesses/kickthespypet-api
# or
pip install kickthespypet-api
```
## Examples
```python
import kickthespypet_api
client = kickthespypet_api.KickTheSpyPetAPI()
client.get_bot_by_server_id(20).id
client.get_bot_by_server_invite("server invite here")
for bot in client.get_bot_user_ids_int():
await (await bot_client.fetch_user(bot)).ban()\
client.close()
# or you can use `with`
with kickthespypet_api.KickTheSpyPetAPI() as client:
# do stuff
# closed automatically once done
```
Async:
```python
import kickthespypet_api
client = kickthespypet_api.AsyncKickTheSpyPetAPI()
stuff = await client.get_bot_by_server_id(1000)
print(stuff)
await client.close()
# or you can use `async with`
async with kickthespypet_api.AsyncKickTheSpyPetAPI() as client:
# do stuff
# closed automatically once done
```
`AsyncKickTheSpyPetAPI` is same API as `KickTheSpyPetAPI` but all of HTTP requests will be made with `aiohttp` instead of `requests` and they are asynchronous so you need to `await`.
Reminder: if you don't use `(async) with`, you need to close the session by yourself.
## This is NOT fully documented and STABLE
Due to [kickthespy.pet](https://kickthespy.pet) doesn't have official documentation on their responses, I really can't document every values or states that [kickthespy.pet](https://kickthespy.pet) can send. Please open pull request for that if you know it's type and documentation. Check out at `kickthespypet_api/types.py` for list of `Unknown` types and unknown documentation of the value.
Raw data
{
"_id": null,
"home_page": "https://github.com/timelessnesses/kickthespypet-api",
"name": "kickthespypet-api",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": null,
"keywords": "async, python3, kickthespy.pet, spy.pet",
"author": "timelesnesses",
"author_email": "timelessnesses@timelessnesses.me",
"download_url": "https://files.pythonhosted.org/packages/4b/88/f10527591e314e5e5e552a85ad74c2e781c7c71991180cb42969934275bd/kickthespypet_api-0.0.5.tar.gz",
"platform": null,
"description": "# kickthespypet-api\n\nA kickthespy.pet API wrapper for Python with fully documented and type-annotated. All API are made using [the javascript file from the website](https://kickthespy.pet/main.js)\n\n## Installing\n\n```shell\npip install git+https://github.com/timelessnesses/kickthespypet-api\n# or\npip install kickthespypet-api\n```\n\n## Examples\n\n```python\nimport kickthespypet_api\n\nclient = kickthespypet_api.KickTheSpyPetAPI()\nclient.get_bot_by_server_id(20).id\nclient.get_bot_by_server_invite(\"server invite here\")\nfor bot in client.get_bot_user_ids_int():\n await (await bot_client.fetch_user(bot)).ban()\\\nclient.close()\n\n# or you can use `with`\n\nwith kickthespypet_api.KickTheSpyPetAPI() as client:\n # do stuff\n# closed automatically once done\n\n``` \n\nAsync: \n\n```python\nimport kickthespypet_api\n\nclient = kickthespypet_api.AsyncKickTheSpyPetAPI()\nstuff = await client.get_bot_by_server_id(1000)\nprint(stuff)\nawait client.close()\n\n# or you can use `async with`\n\nasync with kickthespypet_api.AsyncKickTheSpyPetAPI() as client:\n # do stuff\n# closed automatically once done\n\n```\n\n`AsyncKickTheSpyPetAPI` is same API as `KickTheSpyPetAPI` but all of HTTP requests will be made with `aiohttp` instead of `requests` and they are asynchronous so you need to `await`. \nReminder: if you don't use `(async) with`, you need to close the session by yourself.\n\n## This is NOT fully documented and STABLE\n\nDue to [kickthespy.pet](https://kickthespy.pet) doesn't have official documentation on their responses, I really can't document every values or states that [kickthespy.pet](https://kickthespy.pet) can send. Please open pull request for that if you know it's type and documentation. Check out at `kickthespypet_api/types.py` for list of `Unknown` types and unknown documentation of the value.\n",
"bugtrack_url": null,
"license": "MPL-2.0",
"summary": "kickthespy.pet API wrapper",
"version": "0.0.5",
"project_urls": {
"Bug Tracker": "https://github.com/timelessnesses/kickthespypet-api/issues",
"Homepage": "https://github.com/timelessnesses/kickthespypet-api",
"Repository": "https://github.com/timelessnesses/kickthespypet-api"
},
"split_keywords": [
"async",
" python3",
" kickthespy.pet",
" spy.pet"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "5ef655437f1543d6ff06f857c650d3616c899176fb7ef378187e21c9bf172d09",
"md5": "7d7e3ba69daa66694585de93741ac15e",
"sha256": "4de475ce2e06a0b5ce6424eeba16e450de05aba1cd827bf34a71d31db0d7ebb1"
},
"downloads": -1,
"filename": "kickthespypet_api-0.0.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7d7e3ba69daa66694585de93741ac15e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 9850,
"upload_time": "2024-05-12T02:40:11",
"upload_time_iso_8601": "2024-05-12T02:40:11.388359Z",
"url": "https://files.pythonhosted.org/packages/5e/f6/55437f1543d6ff06f857c650d3616c899176fb7ef378187e21c9bf172d09/kickthespypet_api-0.0.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4b88f10527591e314e5e5e552a85ad74c2e781c7c71991180cb42969934275bd",
"md5": "084ef04bb04d25f3c59d7645be5353a3",
"sha256": "d048f299b8511518fa1810592d2572b44648e046dd9545130e61dbbd6565c09e"
},
"downloads": -1,
"filename": "kickthespypet_api-0.0.5.tar.gz",
"has_sig": false,
"md5_digest": "084ef04bb04d25f3c59d7645be5353a3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 9224,
"upload_time": "2024-05-12T02:40:13",
"upload_time_iso_8601": "2024-05-12T02:40:13.422529Z",
"url": "https://files.pythonhosted.org/packages/4b/88/f10527591e314e5e5e552a85ad74c2e781c7c71991180cb42969934275bd/kickthespypet_api-0.0.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-12 02:40:13",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "timelessnesses",
"github_project": "kickthespypet-api",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "kickthespypet-api"
}