Skip to main content

Generate nice Statistics in your gists.

Project description

Gistats

Gistats is a small library for generating Statistics on Gists using dictionaries
based on @sciencepal chess.com statistics

Installation

# Unstable
pip install git+https://github.com/ZSendokame/Gistats.git

# Stable
pip install Gistats 

How to use

import os
import gistats

def get_size():
    size = 0

    for element in os.scandir('./gistats'):
        size += os.stat(element).st_size

    return size

statistics = {
    'Total size': {'value': str(get_size()), 'emoji': '💾'},
    'Gistats Version': {'value': '1.0.0', 'emoji': '✔'}
}
gist = gistats.Login('name', 'gist-token', 'gist-id')

# Separator is the character that will separate Statistic name from its value.
# Until is the maximum of characters on the string, so it gets at the same column.
gist.update(statistics, separator=':', until=30)  # Return Status Code.
# https://gist.github.com/ZSendokame/4637229c389a70083784eac6d4adc1f4

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

Gistats-1.0.1.tar.gz (2.2 kB view details)

Uploaded Source

File details

Details for the file Gistats-1.0.1.tar.gz.

File metadata

  • Download URL: Gistats-1.0.1.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for Gistats-1.0.1.tar.gz
Algorithm Hash digest
SHA256 1326ea68c854d5b079882357d6af50a3b3098cfd0552cccb72d677fa026a6782
MD5 7662ee0795b8afcdcb3e08c3259569a4
BLAKE2b-256 89fb54108fde95f976c6c21950601240222a7216f2a0c4fa1afb2a6f6bf52e33

See more details on using hashes here.

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