# Losuapi
Python wrapper for the [Osu apiV2](https://osu.ppy.sh/docs/index.html)
```bash
pip install losuapi
```
```bash
poetry add losuapi
```
## Important
Development in progress
---
## Setup
- Register an Oauth application on the osu [account settings page](https://osu.ppy.sh/home/account/edit#new-oauth-application).
- Do not set an Application callback URL, the current version of this package does not need one.
creating client_id and client_secret variables example
``` python
CLIENT_ID = "registerd client id"
CLIENT_SECRET = "registered client secret"
```
## Basic usage
example:
``` python
import losuapi
# instantiate OsuApi object
api: losuapi.OsuApi = losuapi.OsuApi(client_id=CLIENT_ID, cleint_secret=CLIENT_SECRET)
# instantiate async compatible OsuApi object
asyncApi: losuapi.AsyncOsuApi = losuapi.AsyncOsuApi(client_id=CLIENT_ID, cleint_secret=CLIENT_SECRET)
# lookup_beatmap method returns a losuapi.Beatmap object
beatmap: losuapi.Beatmap = api.lookup_beatmap(beatmap_id=1920615)
```
## Working endpoints
```python
from losuapi import OsuApi
OsuApi.lookup_beatmap(beatmap_id, checksum, filename)
OsuApi.user_beatmap_score(beatmap_id, user_id, mode, mods)
OsuApi.user_beatmap_scores(beatmap_id, user_id, mode)
OsuApi.beatmap_scores(beatmap_id, mode, mods, Type)
OsuApi.beatmaps(beatmap_ids)
OsuApi.beatmap(beatmap_id)
OsuApi.beatmap_attributes(beatmap_id, mods ruleset, ruleset_id)
OsuApi.user_kudosu(user_id, limit, offset)
OsuApi.user_scores(user_id, Type, include_fails, mode, limit, offset)
OsuApi.user_beatmaps(user_id, Type, limit, offset)
OsuApi.user_recent_activity(user_id, limit, offset)
OsuApi.user(username, mode, key)
OsuApi.users(user_ids)
OsuApi.ranking(mode, Type, filter, country, cursor, spotlight_id, variant)
OsuApi.spotlights()
```
Raw data
{
"_id": null,
"home_page": "https://github.com/LiskIsBest/Losuapi/",
"name": "losuapi",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.10,<4.0",
"maintainer_email": "",
"keywords": "python,osu,api,wrapper",
"author": "Darien Moore",
"author_email": "LiskIsBest@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/1f/e7/6c9c5253222356abd01d6441d7fd66e175b4ee6fd02736123a544c7c8253/losuapi-0.2.2.tar.gz",
"platform": null,
"description": "# Losuapi\nPython wrapper for the [Osu apiV2](https://osu.ppy.sh/docs/index.html)\n\n```bash\npip install losuapi\n```\n```bash\npoetry add losuapi\n```\n\n## Important\n\nDevelopment in progress\n\n---\n\n## Setup\n\n- Register an Oauth application on the osu [account settings page](https://osu.ppy.sh/home/account/edit#new-oauth-application).\n - Do not set an Application callback URL, the current version of this package does not need one.\n\ncreating client_id and client_secret variables example\n``` python\nCLIENT_ID = \"registerd client id\"\nCLIENT_SECRET = \"registered client secret\"\n```\n\n## Basic usage\nexample:\n``` python\nimport losuapi\n\n# instantiate OsuApi object\napi: losuapi.OsuApi = losuapi.OsuApi(client_id=CLIENT_ID, cleint_secret=CLIENT_SECRET)\n\n# instantiate async compatible OsuApi object\nasyncApi: losuapi.AsyncOsuApi = losuapi.AsyncOsuApi(client_id=CLIENT_ID, cleint_secret=CLIENT_SECRET)\n\n# lookup_beatmap method returns a losuapi.Beatmap object\nbeatmap: losuapi.Beatmap = api.lookup_beatmap(beatmap_id=1920615)\n```\n\n## Working endpoints\n```python\nfrom losuapi import OsuApi\n\nOsuApi.lookup_beatmap(beatmap_id, checksum, filename)\nOsuApi.user_beatmap_score(beatmap_id, user_id, mode, mods)\nOsuApi.user_beatmap_scores(beatmap_id, user_id, mode)\nOsuApi.beatmap_scores(beatmap_id, mode, mods, Type)\nOsuApi.beatmaps(beatmap_ids)\nOsuApi.beatmap(beatmap_id)\nOsuApi.beatmap_attributes(beatmap_id, mods ruleset, ruleset_id)\nOsuApi.user_kudosu(user_id, limit, offset)\nOsuApi.user_scores(user_id, Type, include_fails, mode, limit, offset)\nOsuApi.user_beatmaps(user_id, Type, limit, offset)\nOsuApi.user_recent_activity(user_id, limit, offset)\nOsuApi.user(username, mode, key)\nOsuApi.users(user_ids)\nOsuApi.ranking(mode, Type, filter, country, cursor, spotlight_id, variant)\nOsuApi.spotlights()\n```",
"bugtrack_url": null,
"license": "MIT",
"summary": "Python wrapper for the Osu apiV2",
"version": "0.2.2",
"split_keywords": [
"python",
"osu",
"api",
"wrapper"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "022f1fd5785e2b4782739fdac177b3e79bbbb40257538b0a568a3b9d3cc71532",
"md5": "3ddaf4c1e19956709181ed50984fd5b2",
"sha256": "d6d14e816f050c304246db33816c2aea3991c83400af00b57ab854e10d5ae90f"
},
"downloads": -1,
"filename": "losuapi-0.2.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3ddaf4c1e19956709181ed50984fd5b2",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10,<4.0",
"size": 21435,
"upload_time": "2023-03-18T03:39:59",
"upload_time_iso_8601": "2023-03-18T03:39:59.577662Z",
"url": "https://files.pythonhosted.org/packages/02/2f/1fd5785e2b4782739fdac177b3e79bbbb40257538b0a568a3b9d3cc71532/losuapi-0.2.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1fe76c9c5253222356abd01d6441d7fd66e175b4ee6fd02736123a544c7c8253",
"md5": "aeeb6f48f15e2703c85cae3c022e8412",
"sha256": "206ce6bd99e665380f33a09ac5a07cd9ebabb92c6a2c721f96c00bcd26fa187a"
},
"downloads": -1,
"filename": "losuapi-0.2.2.tar.gz",
"has_sig": false,
"md5_digest": "aeeb6f48f15e2703c85cae3c022e8412",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10,<4.0",
"size": 13894,
"upload_time": "2023-03-18T03:40:01",
"upload_time_iso_8601": "2023-03-18T03:40:01.965157Z",
"url": "https://files.pythonhosted.org/packages/1f/e7/6c9c5253222356abd01d6441d7fd66e175b4ee6fd02736123a544c7c8253/losuapi-0.2.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-03-18 03:40:01",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "LiskIsBest",
"github_project": "Losuapi",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "losuapi"
}