write-githubstat makes it easy to collect, filter and save github statistics to csv files.
Project description
write-githubstat
write-githubstat makes it easy to collect, filter and save github statistics to csv files.
About The Project
write-githubstat makes it easy to collect, filter and save github statistics to csv files.
Installation
write-githubstat requires pandas
package.
pip install write-githubstat
Usage
import logging
from pathlib import Path
from writegithubstat import WriteGithubStat, GithubAuth, Referrers, Paths, StarsForks, ViewsClones
logging.basicConfig(level=logging.INFO)
owner = "owner"
repo = "repo"
token = "token"
auth = GithubAuth(owner, repo, token)
write_githubstat = WriteGithubStat(auth)
for stat_type in (
Referrers(owner, repo),
Paths(owner, repo),
StarsForks(owner, repo),
ViewsClones(owner, repo, write_githubstat.date),
):
year = write_githubstat.date[0:4]
outdir = "stats"
outfile = (
f"{year}_githubstat_{stat_type.__class__.__name__.lower()}.csv"
)
csv = Path(outdir) / outfile
write_githubstat.write_stat(stat_type, csv)
License
Copyright © 2023.
Released under the Apache 2.0 License.
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
Built Distribution
File details
Details for the file write_githubstat-0.1.5.tar.gz
.
File metadata
- Download URL: write_githubstat-0.1.5.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.11.4 Linux/5.15.0-1041-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c576217b3c14f185ba550a13579d09f9b79f8e1c2ffc153146c0c0a5b5122cc |
|
MD5 | 33151cf281d4f4496f7abd448ca75bfa |
|
BLAKE2b-256 | c80cf04fcbe9724adc11bb42c352653c84ca1edd071452ece52e82109c621f26 |
Provenance
File details
Details for the file write_githubstat-0.1.5-py3-none-any.whl
.
File metadata
- Download URL: write_githubstat-0.1.5-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.11.4 Linux/5.15.0-1041-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35766c5f45c1f4ef6eef744c1d8af6fabbd45c885dfebf694e56b9a6c208b645 |
|
MD5 | 6255fb3e4963228daa5ecbfd0c354772 |
|
BLAKE2b-256 | dde4def407b663a7336d88c8a266f7f78d44b6ca4770d296a1bcd94f4eeeb255 |