Metadata-Version: 2.3
Name: githubcontribs
Version: 0.3.0
Summary: Simple analytics for GitHub contributions across an organization.
Author-email: Lamin Labs <open-source@lamin.ai>
Requires-Python: >=3.10,<3.14
Description-Content-Type: text/markdown
Requires-Dist: pandas
Requires-Dist: requests
Requires-Dist: dotenv
Requires-Dist: seaborn
Requires-Dist: tqdm
Requires-Dist: pre-commit ; extra == "dev"
Requires-Dist: nox ; extra == "dev"
Requires-Dist: pytest>=6.0 ; extra == "dev"
Requires-Dist: pytest-cov ; extra == "dev"
Requires-Dist: nbproject_test ; extra == "dev"
Project-URL: Home, https://github.com/laminlabs/githubcontribs
Provides-Extra: dev

# githubcontribs: Analyze GitHub contributions

A simple Python API to fetch and plot GitHub contributions across repositories.

Install:

```bash
pip install githubcontribs
```

Fetch data:

```python
import githubcontribs
fetcher = githubcontribs.Fetcher("laminlabs")  # pass the organization
df = fetcher.fetch_contribs("lamindb")  # pass one or multiple repositories
df.head()
#>	date		author		repo	type	title											...
#>	2025-10-11	falexwolf	lamindb	commit	🚸 Better UX for `lamin annotate` CLI command	...
#>	2025-10-10	Koncopd		lamindb	commit	🐛 Various fixes for filtering (#3147)			...
#>	2025-10-10	falexwolf	lamindb	commit	🐛 Do not retrieve records from trash based on	...
```

Plot data:

```python
plotter = githubcontribs.Plotter(df)
plotter.plot_total_number_by_author_by_type()
```

<img width="500" height="624" alt="image" src="https://github.com/user-attachments/assets/29a872ac-e244-4ac8-a24f-a66706a20761" />

```python
plotter.plot_number_by_month_by_author()
```

<img width="500" height="624" alt="image" src="https://github.com/user-attachments/assets/cfa31614-352b-469f-bf48-eeaca29cd5dd" />

If you want to make such analyses reproducible: [here](https://lamin.ai/laminlabs/lamindata/transform/X1ZxsmZxISxW) is how to track the notebooks, environments, and input & ouput data for these plots.

PS: You can also fetch all repos with activity in a year.

```python
fetcher.fetch_repos()
```

