tankioapi


Nametankioapi JSON
Version 1.0.1 PyPI version JSON
download
home_pagehttps://github.com/stngularity/tankioapi
SummaryA Python written wrapper for the Tanki Online game API
upload_time2023-05-19 17:54:14
maintainer
docs_urlNone
authorstngularity
requires_python>=3.8
licenseMIT License
keywords game api to tanki online
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align=center>
    <a href="https://github.com/stngularity"><img src="https://img.shields.io/badge/-stngularity's%20project-%2346df11"></a>
    <a href="https://pypi.org/project/tankioapi/"><img src="https://img.shields.io/pypi/v/tankioapi?color=%2346df11&label=Version"></a>
    <a href="https://pypi.org/project/tankioapi/"><img src="https://img.shields.io/pypi/dd/tankioapi?color=%2346df11&label=Downloads"></a>
</p>
<p align=center>
    <a href="https://github.com/stngularity/tankioapi/issues"><img src="https://img.shields.io/github/issues/stngularity/tankioapi?color=%2346df11&label=Issues"></a>
    <a href="https://github.com/stngularity/tankioapi"><img src="https://img.shields.io/github/license/stngularity/tankioapi?color=%2346df11&label=License"></a>
</p>

## Notification
This project was created just to exist. Of course, I will update it when the API itself changes, but not immediately. Well, if You want to support this project, You can give it a star.

## Information
As mentioned earlier, this project is created just to exist. And so, the module itself is needed to get the top of players and get information about the player separately. If You know more functionality of the API of the game `Tanki Online`, then please report this functionality in the [`Issues`](https://github.com/stngularity/tankioapi/issues).

###### Features
- Fully `async`/`await`
- Getting top of players
- Getting information of any player by him name
- Getting status of stable server `Maybe deprecated`
- Getting status of test servers

## Installing
**[Python 3.8](https://www.python.org/downloads/) or higher is required**

To install a non-`speedup` version of the library, do the following:
> ```sh
> # Linux/macOS
> python3 -m pip install -U tankioapi
>
> # Windows
> py -3 -m pip install -U tankioapi
> ```

Or, to install the `speedup` version, do the following:
> ```sh
> # Linux/macOS
> python3 -m pip install -U "tankioapi[speedup]"
>
> # Windows
> py -3 -m pip install -U tankioapi[speedup]
> ```

And, to install the development version, do the following:
> ```sh
> $ git clone https://github.com/stngularity/tankioapi
> $ cd tankioapi
> $ python3 -m pip install -U .[speedup]
> ```

## Examples
Here are examples of some of the features of the library. More examples in [`examples/`](/examples)

###### Getting all tops of players
```py
import asyncio
from toapi import Top, TopLists, get_tops

tops: TopLists = asyncio.run(get_tops())
efficiency_top: Top = tops.efficiency
print("----- Efficiency top -----")
for number, user in enumerate(efficiency_top.users):
    print(f"#{number+1}   {user.name} ({user.top_value})")
```

###### Getting information of player
```py
import asyncio
from toapi import User, get_user

user: User = asyncio.run(get_user("sty"))
# and You can specify language
# user: User = asyncio.run(get_user("sty", lang="ru"))

print(f"Name: {user.name}")
rank: str = user.rank.name.title()
print(f"Rank: {rank} ({user.score}/{user.score_next} {round(user.score/user.score_next*100)}%)")
print(f"Has premium: {'Yes' if user.premium else 'No'}")
print()
print(f"KD: {user.kills}/{user.deaths} ({user.kd_ratio})")
print(f"Caught golds: {user.caught_golds}")
print(f"Crystals: {user.crystals}")
print(f"GS: {user.gear_score}")
```

## License
This project is distributed under the `MIT` license. You can learn more from the [**LICENSE**](/LICENSE) file.

```
Made with ❤ and 🍵 by stngularity for everyone
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/stngularity/tankioapi",
    "name": "tankioapi",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "game,api,to,tanki online",
    "author": "stngularity",
    "author_email": "stngularity <stngularity@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/1e/b6/dfa3d6f89e48a4723f66e95a99ec844fd49453b825c3f03f9a613cae2624/tankioapi-1.0.1.tar.gz",
    "platform": null,
    "description": "<p align=center>\r\n    <a href=\"https://github.com/stngularity\"><img src=\"https://img.shields.io/badge/-stngularity's%20project-%2346df11\"></a>\r\n    <a href=\"https://pypi.org/project/tankioapi/\"><img src=\"https://img.shields.io/pypi/v/tankioapi?color=%2346df11&label=Version\"></a>\r\n    <a href=\"https://pypi.org/project/tankioapi/\"><img src=\"https://img.shields.io/pypi/dd/tankioapi?color=%2346df11&label=Downloads\"></a>\r\n</p>\r\n<p align=center>\r\n    <a href=\"https://github.com/stngularity/tankioapi/issues\"><img src=\"https://img.shields.io/github/issues/stngularity/tankioapi?color=%2346df11&label=Issues\"></a>\r\n    <a href=\"https://github.com/stngularity/tankioapi\"><img src=\"https://img.shields.io/github/license/stngularity/tankioapi?color=%2346df11&label=License\"></a>\r\n</p>\r\n\r\n## Notification\r\nThis project was created just to exist. Of course, I will update it when the API itself changes, but not immediately. Well, if You want to support this project, You can give it a star.\r\n\r\n## Information\r\nAs mentioned earlier, this project is created just to exist. And so, the module itself is needed to get the top of players and get information about the player separately. If You know more functionality of the API of the game `Tanki Online`, then please report this functionality in the [`Issues`](https://github.com/stngularity/tankioapi/issues).\r\n\r\n###### Features\r\n- Fully `async`/`await`\r\n- Getting top of players\r\n- Getting information of any player by him name\r\n- Getting status of stable server `Maybe deprecated`\r\n- Getting status of test servers\r\n\r\n## Installing\r\n**[Python 3.8](https://www.python.org/downloads/) or higher is required**\r\n\r\nTo install a non-`speedup` version of the library, do the following:\r\n> ```sh\r\n> # Linux/macOS\r\n> python3 -m pip install -U tankioapi\r\n>\r\n> # Windows\r\n> py -3 -m pip install -U tankioapi\r\n> ```\r\n\r\nOr, to install the `speedup` version, do the following:\r\n> ```sh\r\n> # Linux/macOS\r\n> python3 -m pip install -U \"tankioapi[speedup]\"\r\n>\r\n> # Windows\r\n> py -3 -m pip install -U tankioapi[speedup]\r\n> ```\r\n\r\nAnd, to install the development version, do the following:\r\n> ```sh\r\n> $ git clone https://github.com/stngularity/tankioapi\r\n> $ cd tankioapi\r\n> $ python3 -m pip install -U .[speedup]\r\n> ```\r\n\r\n## Examples\r\nHere are examples of some of the features of the library. More examples in [`examples/`](/examples)\r\n\r\n###### Getting all tops of players\r\n```py\r\nimport asyncio\r\nfrom toapi import Top, TopLists, get_tops\r\n\r\ntops: TopLists = asyncio.run(get_tops())\r\nefficiency_top: Top = tops.efficiency\r\nprint(\"----- Efficiency top -----\")\r\nfor number, user in enumerate(efficiency_top.users):\r\n    print(f\"#{number+1}   {user.name} ({user.top_value})\")\r\n```\r\n\r\n###### Getting information of player\r\n```py\r\nimport asyncio\r\nfrom toapi import User, get_user\r\n\r\nuser: User = asyncio.run(get_user(\"sty\"))\r\n# and You can specify language\r\n# user: User = asyncio.run(get_user(\"sty\", lang=\"ru\"))\r\n\r\nprint(f\"Name: {user.name}\")\r\nrank: str = user.rank.name.title()\r\nprint(f\"Rank: {rank} ({user.score}/{user.score_next} {round(user.score/user.score_next*100)}%)\")\r\nprint(f\"Has premium: {'Yes' if user.premium else 'No'}\")\r\nprint()\r\nprint(f\"KD: {user.kills}/{user.deaths} ({user.kd_ratio})\")\r\nprint(f\"Caught golds: {user.caught_golds}\")\r\nprint(f\"Crystals: {user.crystals}\")\r\nprint(f\"GS: {user.gear_score}\")\r\n```\r\n\r\n## License\r\nThis project is distributed under the `MIT` license. You can learn more from the [**LICENSE**](/LICENSE) file.\r\n\r\n```\r\nMade with \u2764 and \ud83c\udf75 by stngularity for everyone\r\n```\r\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "A Python written wrapper for the Tanki Online game API",
    "version": "1.0.1",
    "project_urls": {
        "Bug Tracker": "https://github.com/stngularity/tankioapi/issues",
        "Changelog": "https://github.com/stngularity/tankioapi/blob/main/CHANGELOG.md",
        "Documentation": "https://stngularity.github.io/tankioapi",
        "Homepage": "https://github.com/stngularity/tankioapi",
        "Source Code": "https://github.com/stngularity/tankioapi"
    },
    "split_keywords": [
        "game",
        "api",
        "to",
        "tanki online"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1eb6dfa3d6f89e48a4723f66e95a99ec844fd49453b825c3f03f9a613cae2624",
                "md5": "7d37acc39ab6ed47a1ca78fef6defdbd",
                "sha256": "6533d175759492eba53af14807ec5a254bb53f69135f97c0bce29a4bc6704026"
            },
            "downloads": -1,
            "filename": "tankioapi-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "7d37acc39ab6ed47a1ca78fef6defdbd",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 13771,
            "upload_time": "2023-05-19T17:54:14",
            "upload_time_iso_8601": "2023-05-19T17:54:14.539195Z",
            "url": "https://files.pythonhosted.org/packages/1e/b6/dfa3d6f89e48a4723f66e95a99ec844fd49453b825c3f03f9a613cae2624/tankioapi-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-19 17:54:14",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "stngularity",
    "github_project": "tankioapi",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "tankioapi"
}
        
Elapsed time: 0.08392s