Skip to main content

write-githubstat

write-githubstat makes it easy to collect, filter and save github statistics to csv files.

PyPI version

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.

Release files for write-githubstat 0.2.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 write-githubstat 0.2.1
File Size Uploaded
write_githubstat-0.2.1.tar.gz 7.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for write-githubstat 0.2.1
File Interpreter ABI Platform
write_githubstat-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 15.2 kB

Release files / write_githubstat-0.2.1.tar.gz

Download URL write_githubstat-0.2.1.tar.gz
Size 7.1 kB
Tags Source
SHA-256 checksum
How to use checksums
0891424b8a1ebb16f28360b62fa2efcc15b1c98ed4fa3e9e7d980b24e5b73b5a
BLAKE2b-256 checksum
How to use checksums
325fe36c1acc00a3977cc343564fc91aa43627cdff2b5b09d773d625453ceb57
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.12.4 Linux/6.5.0-1022-azure

Release files / write_githubstat-0.2.1-py3-none-any.whl

Download URL write_githubstat-0.2.1-py3-none-any.whl
Size 8.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4bbe40b756da512dd830f32e43c8f1af9cad16c2f1c2d578d9e0d3ed57c9f225
BLAKE2b-256 checksum
How to use checksums
e3bdb6ee738ee2213cad11845fecf1231e68d639eb2b3203f4442b4d824dbf0f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.12.4 Linux/6.5.0-1022-azure

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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