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

pip install git+https://github.com/ZSendokame/gistats.git

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.0.tar.gz (1.5 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: Gistats-1.0.0.tar.gz
  • Upload date:
  • Size: 1.5 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.0.tar.gz
Algorithm Hash digest
SHA256 d981d158c55e97a5999f88eb36667b20b491a5afc12ad7d85027063c592a2ff3
MD5 549eab2bd0e0b025cef7550cd62fb5b2
BLAKE2b-256 8f635ab64a87a53010526384fb36be5ee3d7d6203295d6e5a21120800173d68d

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