Skip to main content

statcord.py-beta

A simple API wrapper for statcord.com to connect your bot and get your bot stats. [BETA]


Installation

Install via pip (recommended)

python3 -m pip install statcord.py

Features

  • AUTOMATIC server & user counts updating.
  • AUTOMATIC commands & active users updating.
  • AUTOMATIC resource usage posting.
  • AUTOMATIC custom function usage.
  • Support provided via discord

Example Cogs System

from discord.ext import commands

import statcord


class StatcordPost(commands.Cog):
    def __init__(self, bot):
        self.bot = bot
        self.key = "statcord.com-ADDYOURKEYHERE"
        self.api = statcord.Client(self.bot,self.key,custom1=self.custom1,custom2=self.custom2)
        self.api.start_loop()
        

    @commands.Cog.listener()
    async def on_command(self,ctx):
        self.api.command_run(ctx)

    async def custom1(self):
        # Do Things Here
        return "10" # Return a string.

    async def custom2(self):
        # Do Things Here
        return "10" # Return a string.


def setup(bot):
    bot.add_cog(StatcordPost(bot))

Example non-cogs system.

import discord
from discord.ext import commands
import statcord 

bot = commands.Bot(command_prefix='!')

async def custom1(self):
    # Do Things Here
    return "10" # Return a string.

async def custom2(self):
    # Do Things Here
    return "10" # Return a string.

key = "statcord.com-ADDYOURKEYHERE"
api = statcord.Client(bot,key,custom1=custom1,custom2=custom2)
api.start_loop()

@bot.event
async def on_command(ctx):
    api.command_run(ctx)




bot.run(TOKEN)

Configuration

To turn Memory tracking off, statcord.Client(bot,key,mem = False) To turn CPU tracking off, statcord.Client(bot,key,cpu = False) To activate a custom graph, statcord.Client(bot,key,custom1 = function)

Contributing

Contributions are always welcome!
Take a look at any existing issues on this repository for starting places to help contribute towards, or simply create your own new contribution to the project.

When you are ready, simply create a pull request for your contribution and we will review it whenever we can!

Donating

You can also help me and the project out by sponsoring me through a donation on PayPal.

Discussion, Support and Issues

Need support with this project, have found an issue or want to chat with others about contributing to the project?

Please check the project's issues page first for support & bugs!

Not found what you need here?

  • If you have an issue, please create a GitHub issue here to report it, include as much detail as you can.
  • Alternatively, You can join our Discord server to discuss any issue or to get support for the project.:
Discord

Metadata

Release files for statcord.py-beta 3.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for statcord.py-beta 3.1.1
File Size Uploaded Provenance Actions
statcord.py-beta-3.1.1.tar.gz 17.8 kB Without provenance Details for statcord.py-beta-3.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for statcord.py-beta 3.1.1
File Interpreter ABI Platform Actions
statcord.py_beta-3.1.1-py3-none-any.whl Python 3 none any Details for statcord.py_beta-3.1.1-py3-none-any.whl

Total release size: 36.1 kB

Release files / statcord.py-beta-3.1.1.tar.gz

Download URL statcord.py-beta-3.1.1.tar.gz
Size 17.8 kB
Tags Source
SHA-256 checksum
How to use checksums
a3deeb3c8a80dc24166dd06404ca3bbf725dd4805d5f7ad720ea1f6d8f2cf840
BLAKE2b-256 checksum
How to use checksums
21c32c73aa6e9b3b5aea17d923e44ce2380cfaa340a8897549c2f6031bf21c43
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.7

Release files / statcord.py_beta-3.1.1-py3-none-any.whl

Download URL statcord.py_beta-3.1.1-py3-none-any.whl
Size 18.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5d8669df202b0e9b9a2c158ca3e76fedea2fd95250f18768ce7309083c90f653
BLAKE2b-256 checksum
How to use checksums
fb6bc14fc7decf64b5d481a11d8d0bfa9e51beba50cdc9c7ad9867208c8b5c85
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.7

Security for statcord.py-beta 3.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page