Skip to main content

A Python wrapper for the Fluxpoint API

Project description

Discord server invite PyPI version info PyPI supported Python versions

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:

# 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)))

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

statspost.py-1.0.1.tar.gz (9.6 kB view hashes)

Uploaded Source

Built Distribution

statspost.py-1.0.1-py3-none-any.whl (9.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page