This repository has been archived by the owner on Jul 15, 2023. It is now read-only.
Releases: Dhruvacube/statspost.py
Releases · Dhruvacube/statspost.py
v1.0.0
statspost.py
A python pakage to post the stats to some known botlists.
Key Features
- Modern Pythonic API using
async
andawait
. - 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:
# 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:
# 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:
$ git clone https://github.com/Dhruvacube/statspost.py
$ cd statspost.py
$ python3 -m pip install -U .[speed]
Quick Example
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
What's Changed
- Format code with black by @deepsource-autofix in #1
- Format code with black by @deepsource-autofix in #3
- Merge
isinstance
calls by @deepsource-autofix in #4 - Remove methods with unnecessary super delegation. by @deepsource-autofix in #5
- Merge collapsible
if
statements by @deepsource-autofix in #6 - Create Code of conduc by @Dhruvacube in #7
- Update README.rst by @Dhruvacube in #8
- Format code with black by @deepsource-autofix in #9
- Format code with black by @deepsource-autofix in #10
- Format code with black by @deepsource-autofix in #11
- Remove blank lines after docstring by @deepsource-autofix in #14
- Remove redundant
None
default by @deepsource-autofix in #13 - Remove unnecessary f-string by @deepsource-autofix in #12
- Format code with black by @deepsource-autofix in #15
- Format code with black by @deepsource-autofix in #17
- added tbl by @Miya25 in #18
- Format code with black by @deepsource-autofix in #19
New Contributors
- @deepsource-autofix made their first contribution in #1
- @Dhruvacube made their first contribution in #7
- @Miya25 made their first contribution in #18
Full Changelog: https://github.com/Dhruvacube/statspost.py/commits/v1.0.0