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': get_size(),
'Gistats Version': '2.0.1'
}
gist = gistats.Gist('name', 'gist-token', 'gist-id', 'filename')
# 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, delimiter=' ', length=30) # Return Status Code.
# https://gist.github.com/ZSendokame/4637229c389a70083784eac6d4adc1f4
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Gistats-2.0.1.tar.gz
(2.8 kB
view details)
File details
Details for the file Gistats-2.0.1.tar.gz
.
File metadata
- Download URL: Gistats-2.0.1.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7dc5755faeea114b3c88899c8daa0bd3ac01fcfabab5a1b674cdeeabed3afa3d |
|
MD5 | 2ff2ad65bc0d80ab05c2582283da0b1f |
|
BLAKE2b-256 | b6e0359f9dfd8350fb58413a7ee1c61afe4494d5a0e70b3e22fd7ba27fc2968b |