statspost.py
[![Discord server invite](https://discord.com/api/guilds/920190307595874304/embed.png)](https://discord.gg/vfXHwS3nmQ) [![PyPI version info](https://img.shields.io/pypi/v/statspost.py.svg)](https://pypi.python.org/pypi/statspost.py) [![PyPI supported Python versions](https://img.shields.io/pypi/pyversions/statspost.py.svg)](https://pypi.python.org/pypi/statspost.py)
A python pakage to post the stats to some known botlists.
Key Features
- Modern Pythonic API using `async` and `await`.
- Proper rate limit handling.
- Optimised in both speed and memory.
Installing
**Python 3.8 or higher is required**
To install the library, you can just run the following command:
sh
Linux/macOS
python3 -m pip install -U statspost.py
Windows
py -3 -m pip install -U statspost.py
To speedup the api wrapper you should run the following command:
sh
Linux/macOS
python3 -m pip install -U "statspost.py[speed]"
Windows
py -3 -m pip install -U statspost.py[speed]
To install the development version, do the following:
sh
$ git clone https://github.com/Dhruvacube/statspost.py
$ cd statspost.py
$ python3 -m pip install -U .[speed]
Quick Example
py
from statspost import StatsPost
import asyncio
import sys
defining run function
run = asyncio.get_event_loop().run_until_complete
setting up the statpost client handler
a=StatsPost(bot_id=935242576343224352,servers=80)
a.add_botlist('topgg','topgg_token')
setting up the windows loop policy according to the operating system
if sys.platform.startswith(('win32', 'cygwin')):
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
Post stats, and return the data
print(run(a.post_stats(return_post_data=True)))
Links
- [Documentation](https://statspostpy.readthedocs.io/en/latest/)
- [Official Support Discord Server](https://discord.gg/vfXHwS3nmQ)
What's Changed
* Format code with black by deepsource-autofix in https://github.com/Dhruvacube/statspost.py/pull/1
* Format code with black by deepsource-autofix in https://github.com/Dhruvacube/statspost.py/pull/3
* Merge `isinstance` calls by deepsource-autofix in https://github.com/Dhruvacube/statspost.py/pull/4
* Remove methods with unnecessary super delegation. by deepsource-autofix in https://github.com/Dhruvacube/statspost.py/pull/5
* Merge collapsible `if` statements by deepsource-autofix in https://github.com/Dhruvacube/statspost.py/pull/6
* Create Code of conduc by Dhruvacube in https://github.com/Dhruvacube/statspost.py/pull/7
* Update README.rst by Dhruvacube in https://github.com/Dhruvacube/statspost.py/pull/8
* Format code with black by deepsource-autofix in https://github.com/Dhruvacube/statspost.py/pull/9
* Format code with black by deepsource-autofix in https://github.com/Dhruvacube/statspost.py/pull/10
* Format code with black by deepsource-autofix in https://github.com/Dhruvacube/statspost.py/pull/11
* Remove blank lines after docstring by deepsource-autofix in https://github.com/Dhruvacube/statspost.py/pull/14
* Remove redundant `None` default by deepsource-autofix in https://github.com/Dhruvacube/statspost.py/pull/13
* Remove unnecessary f-string by deepsource-autofix in https://github.com/Dhruvacube/statspost.py/pull/12
* Format code with black by deepsource-autofix in https://github.com/Dhruvacube/statspost.py/pull/15
* Format code with black by deepsource-autofix in https://github.com/Dhruvacube/statspost.py/pull/17
* added tbl by Miya25 in https://github.com/Dhruvacube/statspost.py/pull/18
* Format code with black by deepsource-autofix in https://github.com/Dhruvacube/statspost.py/pull/19
New Contributors
* deepsource-autofix made their first contribution in https://github.com/Dhruvacube/statspost.py/pull/1
* Dhruvacube made their first contribution in https://github.com/Dhruvacube/statspost.py/pull/7
* Miya25 made their first contribution in https://github.com/Dhruvacube/statspost.py/pull/18
**Full Changelog**: https://github.com/Dhruvacube/statspost.py/commits/v1.0.0