gitlytics 0.7.0__tar.gz → 0.7.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {gitlytics-0.7.0 → gitlytics-0.7.2}/LICENSE +1 -1
- gitlytics-0.7.2/MANIFEST.in +9 -0
- gitlytics-0.7.2/PKG-INFO +332 -0
- gitlytics-0.7.2/README.md +296 -0
- {gitlytics-0.7.0 → gitlytics-0.7.2}/pyproject.toml +27 -6
- gitlytics-0.7.2/requirements.txt +6 -0
- {gitlytics-0.7.0 → gitlytics-0.7.2}/src/gitlytics/__init__.py +175 -32
- gitlytics-0.7.2/src/gitlytics/api.py +729 -0
- gitlytics-0.7.2/src/gitlytics/automation.py +505 -0
- {gitlytics-0.7.0 → gitlytics-0.7.2}/src/gitlytics/cli.py +131 -29
- gitlytics-0.7.2/src/gitlytics/core.py +1328 -0
- {gitlytics-0.7.0 → gitlytics-0.7.2}/src/gitlytics/process.py +107 -41
- {gitlytics-0.7.0 → gitlytics-0.7.2}/src/gitlytics/static/_headers +3 -2
- gitlytics-0.7.2/src/gitlytics/static/_redirects +9 -0
- gitlytics-0.7.2/src/gitlytics/static/assets/AuthCallback-BZRv0dDx.js +1 -0
- gitlytics-0.7.2/src/gitlytics/static/assets/CardModal-Cxkcj1h_.js +1 -0
- gitlytics-0.7.2/src/gitlytics/static/assets/CommitActivity-D9llWZjw.js +2 -0
- gitlytics-0.7.2/src/gitlytics/static/assets/DashboardPage-ao6PnR-o.js +8 -0
- gitlytics-0.7.2/src/gitlytics/static/assets/DashboardView-CiHKx_rK.js +2 -0
- gitlytics-0.7.2/src/gitlytics/static/assets/DeepAnalysisView-Y6yWeyi8.js +16 -0
- gitlytics-0.7.2/src/gitlytics/static/assets/DeveloperCard-DM2nWIq5.js +1 -0
- gitlytics-0.7.2/src/gitlytics/static/assets/ExportModal-CsURKObW.js +1 -0
- gitlytics-0.7.2/src/gitlytics/static/assets/ExportOverlay-CIH-K-N3.js +1 -0
- gitlytics-0.7.2/src/gitlytics/static/assets/GithubIcon-DQ0K1Pjq.js +4 -0
- gitlytics-0.7.2/src/gitlytics/static/assets/HeaderNavbar-DlO42Oi_.js +1 -0
- gitlytics-0.7.2/src/gitlytics/static/assets/IntegrationsPage-C1lTdkJz.js +1 -0
- gitlytics-0.7.2/src/gitlytics/static/assets/LanguagePill-Cj9nUU1t.js +1 -0
- gitlytics-0.7.2/src/gitlytics/static/assets/SettingsPage-Bc1f1wVF.js +1 -0
- gitlytics-0.7.2/src/gitlytics/static/assets/UsernameView-RQNzgISl.js +2 -0
- gitlytics-0.7.2/src/gitlytics/static/assets/WidgetPage-BdNMOgyZ.js +2 -0
- gitlytics-0.7.2/src/gitlytics/static/assets/WorkspaceView-DrGl4zNB.js +2 -0
- gitlytics-0.7.2/src/gitlytics/static/assets/analytics-CYMSCHR6.js +1 -0
- gitlytics-0.7.2/src/gitlytics/static/assets/exports-Bwypdker.js +46 -0
- gitlytics-0.7.2/src/gitlytics/static/assets/index-CuEBHdAz.css +2 -0
- gitlytics-0.7.2/src/gitlytics/static/assets/index-bvN1FsLj.js +3 -0
- gitlytics-0.7.0/src/gitlytics/static/assets/index.es-zEcWcC3I.js → gitlytics-0.7.2/src/gitlytics/static/assets/index.es-Dgvl53Sx.js +1 -1
- gitlytics-0.7.2/src/gitlytics/static/assets/query-keys-D0R_JjMY.js +1 -0
- gitlytics-0.7.2/src/gitlytics/static/assets/session-traffic-store-CWDRoP_g.js +1 -0
- gitlytics-0.7.2/src/gitlytics/static/assets/vendor-charts-c52wq6rV.js +59 -0
- gitlytics-0.7.2/src/gitlytics/static/assets/vendor-icons-B7qKqFPQ.js +1 -0
- gitlytics-0.7.2/src/gitlytics/static/assets/vendor-pdf-0_h89gnr.js +85 -0
- gitlytics-0.7.2/src/gitlytics/static/assets/vendor-query-DlE7hwEz.js +1 -0
- gitlytics-0.7.2/src/gitlytics/static/assets/vendor-radix-BsUTY_uy.js +41 -0
- gitlytics-0.7.2/src/gitlytics/static/assets/vendor-react-B6nnNKyz.js +9 -0
- gitlytics-0.7.2/src/gitlytics/static/assets/vendor-router-BG3eF-jK.js +3 -0
- gitlytics-0.7.2/src/gitlytics/static/assets/vendor-ui-C9IATfL8.js +1 -0
- {gitlytics-0.7.0 → gitlytics-0.7.2}/src/gitlytics/static/index.html +20 -9
- {gitlytics-0.7.0 → gitlytics-0.7.2}/src/gitlytics/static/llms-full.txt +7 -7
- gitlytics-0.7.2/src/gitlytics/static/og-cover.png +0 -0
- gitlytics-0.7.2/src/gitlytics/static/site.webmanifest +1 -0
- gitlytics-0.7.2/src/gitlytics/static/sitemap.xml +8 -0
- gitlytics-0.7.2/src/gitlytics/username.py +16 -0
- gitlytics-0.7.2/src/gitlytics.egg-info/PKG-INFO +332 -0
- gitlytics-0.7.2/src/gitlytics.egg-info/SOURCES.txt +73 -0
- gitlytics-0.7.0/PKG-INFO +0 -357
- gitlytics-0.7.0/README.md +0 -323
- gitlytics-0.7.0/src/gitlytics/api.py +0 -444
- gitlytics-0.7.0/src/gitlytics/automation.py +0 -293
- gitlytics-0.7.0/src/gitlytics/core.py +0 -814
- gitlytics-0.7.0/src/gitlytics/static/_redirects +0 -1
- gitlytics-0.7.0/src/gitlytics/static/assets/ExportModal-CqawRJQe.js +0 -1
- gitlytics-0.7.0/src/gitlytics/static/assets/html2canvas-Bw0OShmD.js +0 -5
- gitlytics-0.7.0/src/gitlytics/static/assets/html2canvas-pro.esm-R_8Rc3By.js +0 -7
- gitlytics-0.7.0/src/gitlytics/static/assets/index-B3YVZMEg.js +0 -165
- gitlytics-0.7.0/src/gitlytics/static/assets/index-CvFzI4Pz.css +0 -1
- gitlytics-0.7.0/src/gitlytics/static/assets/jspdf.es.min-DZc1ww8w.js +0 -79
- gitlytics-0.7.0/src/gitlytics/static/site.webmanifest +0 -1
- gitlytics-0.7.0/src/gitlytics/static/sitemap.xml +0 -18
- gitlytics-0.7.0/src/gitlytics.egg-info/PKG-INFO +0 -357
- gitlytics-0.7.0/src/gitlytics.egg-info/SOURCES.txt +0 -52
- gitlytics-0.7.0/tests/test_api.py +0 -442
- gitlytics-0.7.0/tests/test_automation.py +0 -227
- gitlytics-0.7.0/tests/test_cli.py +0 -157
- gitlytics-0.7.0/tests/test_core.py +0 -331
- gitlytics-0.7.0/tests/test_init.py +0 -208
- gitlytics-0.7.0/tests/test_process.py +0 -398
- gitlytics-0.7.0/tests/test_star_history.py +0 -255
- gitlytics-0.7.0/tests/test_username.py +0 -355
- {gitlytics-0.7.0 → gitlytics-0.7.2}/setup.cfg +0 -0
- {gitlytics-0.7.0 → gitlytics-0.7.2}/src/gitlytics/__main__.py +0 -0
- {gitlytics-0.7.0 → gitlytics-0.7.2}/src/gitlytics/static/android-chrome-192x192.png +0 -0
- {gitlytics-0.7.0 → gitlytics-0.7.2}/src/gitlytics/static/android-chrome-512x512.png +0 -0
- {gitlytics-0.7.0 → gitlytics-0.7.2}/src/gitlytics/static/apple-touch-icon.png +0 -0
- {gitlytics-0.7.0 → gitlytics-0.7.2}/src/gitlytics/static/assets/purify.es-Dqk5qvad.js +0 -0
- {gitlytics-0.7.0 → gitlytics-0.7.2}/src/gitlytics/static/assets/rolldown-runtime-XKyaHtl9.js +0 -0
- {gitlytics-0.7.0 → gitlytics-0.7.2}/src/gitlytics/static/favicon-16x16.png +0 -0
- {gitlytics-0.7.0 → gitlytics-0.7.2}/src/gitlytics/static/favicon-32x32.png +0 -0
- {gitlytics-0.7.0 → gitlytics-0.7.2}/src/gitlytics/static/favicon-48x48.png +0 -0
- {gitlytics-0.7.0 → gitlytics-0.7.2}/src/gitlytics/static/favicon.ico +0 -0
- {gitlytics-0.7.0 → gitlytics-0.7.2}/src/gitlytics/static/favicon.png +0 -0
- {gitlytics-0.7.0 → gitlytics-0.7.2}/src/gitlytics/static/gitlytics-logo.png +0 -0
- {gitlytics-0.7.0 → gitlytics-0.7.2}/src/gitlytics/static/google-search-icon-48x48.png +0 -0
- {gitlytics-0.7.0 → gitlytics-0.7.2}/src/gitlytics/static/google-search-icon.png +0 -0
- {gitlytics-0.7.0 → gitlytics-0.7.2}/src/gitlytics/static/llms.txt +0 -0
- {gitlytics-0.7.0 → gitlytics-0.7.2}/src/gitlytics/static/robots.txt +0 -0
- {gitlytics-0.7.0 → gitlytics-0.7.2}/src/gitlytics.egg-info/dependency_links.txt +0 -0
- {gitlytics-0.7.0 → gitlytics-0.7.2}/src/gitlytics.egg-info/entry_points.txt +0 -0
- {gitlytics-0.7.0 → gitlytics-0.7.2}/src/gitlytics.egg-info/requires.txt +0 -0
- {gitlytics-0.7.0 → gitlytics-0.7.2}/src/gitlytics.egg-info/top_level.txt +0 -0
|
@@ -211,5 +211,5 @@ Without limiting other conditions in the License, the grant of rights under the
|
|
|
211
211
|
For purposes of the foregoing, "Sell" means practicing any or all of the rights granted to you under the License to provide to third parties, for a fee or other consideration (including without limitation fees for hosting or consulting/ support services related to the Software), a product or service whose value derives, entirely or substantially, from the functionality of the Software. Any license notice or attribution required by the License must also include this Commons Clause License Condition notice.
|
|
212
212
|
|
|
213
213
|
Software: Gitlytics
|
|
214
|
-
License: Apache 2.0
|
|
214
|
+
License: Apache 2.0 with Commons Clause
|
|
215
215
|
Licensor: Ameya Sanjay Chopade
|
gitlytics-0.7.2/PKG-INFO
ADDED
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: gitlytics
|
|
3
|
+
Version: 0.7.2
|
|
4
|
+
Summary: Monitor and automate your GitHub repository traffic analytics.
|
|
5
|
+
Author-email: Ameya Chopade <ameyaccod171@gmail.com>
|
|
6
|
+
License-Expression: LicenseRef-Apache-2.0-with-Commons-Clause
|
|
7
|
+
Project-URL: Homepage, https://gitlytics.dev
|
|
8
|
+
Project-URL: Documentation, https://docs.gitlytics.dev
|
|
9
|
+
Project-URL: Repository, https://github.com/ameyachopade/gitlytics
|
|
10
|
+
Project-URL: Bug Tracker, https://github.com/ameyachopade/gitlytics/issues
|
|
11
|
+
Keywords: github,traffic,analytics,automation,cli
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Requires-Python: >=3.11
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
License-File: LICENSE
|
|
20
|
+
Requires-Dist: requests>=2.34.2
|
|
21
|
+
Requires-Dist: certifi>=2026.10.23
|
|
22
|
+
Requires-Dist: pandas>=2.2.3
|
|
23
|
+
Requires-Dist: numpy>=1.26.4
|
|
24
|
+
Requires-Dist: croniter>=6.2.4
|
|
25
|
+
Provides-Extra: dashboard
|
|
26
|
+
Requires-Dist: fastapi>=0.162.0; extra == "dashboard"
|
|
27
|
+
Requires-Dist: uvicorn>=0.54.0; extra == "dashboard"
|
|
28
|
+
Requires-Dist: python-multipart>=0.0.33; extra == "dashboard"
|
|
29
|
+
Provides-Extra: dev
|
|
30
|
+
Requires-Dist: pytest>=9.2.0; extra == "dev"
|
|
31
|
+
Requires-Dist: pytest-cov>=7.1.0; extra == "dev"
|
|
32
|
+
Requires-Dist: httpx>=0.28.1; extra == "dev"
|
|
33
|
+
Requires-Dist: anyio[trio]>=4.16.0; extra == "dev"
|
|
34
|
+
Requires-Dist: python-dotenv>=1.2.4; extra == "dev"
|
|
35
|
+
Dynamic: license-file
|
|
36
|
+
|
|
37
|
+
<div align="center">
|
|
38
|
+
|
|
39
|
+
<img src="https://raw.githubusercontent.com/ameyachopade/gitlytics/main/assets/logo.png" alt="Gitlytics Logo" width="140" />
|
|
40
|
+
|
|
41
|
+
# Gitlytics
|
|
42
|
+
### Next-Gen GitHub Traffic Intelligence, Dynamic SVG Widgets & Automation
|
|
43
|
+
|
|
44
|
+
[](https://pypi.org/project/gitlytics/)
|
|
45
|
+
[](https://www.python.org/)
|
|
46
|
+
[](LICENSE)
|
|
47
|
+
[](https://fastapi.tiangolo.com/)
|
|
48
|
+
[](https://react.dev/)
|
|
49
|
+
[](https://dashboard.gitlytics.dev)
|
|
50
|
+
[](https://docs.gitlytics.dev)
|
|
51
|
+
|
|
52
|
+
<br/>
|
|
53
|
+
|
|
54
|
+
**The complete developer analytics suite for GitHub.**
|
|
55
|
+
Bypass GitHub's 14-day traffic cliff, track stargazer trajectories, and launch a local or self-hosted analytics dashboard in seconds.
|
|
56
|
+
|
|
57
|
+
> **What ships in the `pip install gitlytics` wheel:** the CLI, the Python SDK, and the local/self-hosted React dashboard. The **SVG profile cards and tech-badge renderer is a separate hosted service** at [`api.gitlytics.dev`](https://api.gitlytics.dev) - the package does not contain a card generator. See [Ecosystem & Links](#-ecosystem--links).
|
|
58
|
+
|
|
59
|
+
[**Explore Live Dashboard**](https://dashboard.gitlytics.dev) • [**Read the Docs**](https://docs.gitlytics.dev) • [**Engineering Blog**](https://blog.gitlytics.dev) • [**GitHub Action**](https://github.com/ameyachopade/gitlytics-github-traffic-automation)
|
|
60
|
+
|
|
61
|
+
<br/>
|
|
62
|
+
|
|
63
|
+
</div>
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## ⚡ Highlights at a Glance
|
|
68
|
+
|
|
69
|
+
| Feature | Description |
|
|
70
|
+
| :--- | :--- |
|
|
71
|
+
| **🚨 14-Day Limit Defeated** | Automatically snapshot & merge repository views, clones, referrers, and paths indefinitely. |
|
|
72
|
+
| **📈 Stargazer Trajectories** | Real-time cumulative star growth tracking and milestone timeline projections. |
|
|
73
|
+
| **🤖 AI Health Scorecards** | Cloud AI diagnostics analyzing commit velocity, issue health, PR turnaround, and traffic surges. |
|
|
74
|
+
| **💻 CLI, Python SDK & Web UI** | Use it as a terminal command, import it into Python pipelines, or self-host the full React studio. |
|
|
75
|
+
| **🎨 Hosted SVG Cards & Logos** | The hosted service at [`api.gitlytics.dev`](https://api.gitlytics.dev) renders 31 profile-card slugs in 33 high-contrast themes, plus 181 tech-logo capsules. Not part of the pip package. |
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## 🎨 Hosted Profile Cards & Widgets
|
|
80
|
+
|
|
81
|
+
> **Hosted service, not the pip package.** The card and logo renderer below is served by the Gitlytics cloud API at [`api.gitlytics.dev`](https://api.gitlytics.dev). The `gitlytics` wheel you install from PyPI contains the traffic CLI, the Python SDK and the local dashboard - it does **not** contain an SVG card generator. Install the package for traffic analytics; embed the hosted URLs for cards.
|
|
82
|
+
|
|
83
|
+
Elevate your GitHub profile README with the Gitlytics hosted native, dynamic vector SVG rendering engine. All cards feature crisp typography, custom vector squircle icons, subtle gradient accents, and real-time GitHub GraphQL data.
|
|
84
|
+
|
|
85
|
+
### 🖼️ Featured Card Previews
|
|
86
|
+
|
|
87
|
+
<div align="center">
|
|
88
|
+
<table border="0" width="100%">
|
|
89
|
+
<tr>
|
|
90
|
+
<td align="center" width="50%">
|
|
91
|
+
<b>👤 Flagship Developer Profile Card</b> (Obsidian Slate)<br/>
|
|
92
|
+
<sub>Avatar, bio, verified status, 4 metric squircles & top languages bar</sub><br/><br/>
|
|
93
|
+
<img src="https://api.gitlytics.dev/api/cards/profile-card/demo.svg?theme=default&v=3" alt="Developer Profile Card" width="95%" />
|
|
94
|
+
</td>
|
|
95
|
+
<td align="center" width="50%">
|
|
96
|
+
<b>⭐ Account Highlights 2A-2</b> (Tokyo Night)<br/>
|
|
97
|
+
<sub>Top repository, primary language share, peak year & longevity badge</sub><br/><br/>
|
|
98
|
+
<img src="https://api.gitlytics.dev/api/cards/account-highlights/demo.svg?theme=tokyonight&v=3" alt="Account Highlights" width="95%" />
|
|
99
|
+
</td>
|
|
100
|
+
</tr>
|
|
101
|
+
<tr>
|
|
102
|
+
<td align="center" width="50%">
|
|
103
|
+
<b>📊 Language Diversity Index</b> (Dracula)<br/>
|
|
104
|
+
<sub>Radial diversity score gauge, repo share, byte volume & stack capsules</sub><br/><br/>
|
|
105
|
+
<img src="https://api.gitlytics.dev/api/cards/language-diversity/demo.svg?theme=dracula&v=3" alt="Language Diversity" width="95%" />
|
|
106
|
+
</td>
|
|
107
|
+
<td align="center" width="50%">
|
|
108
|
+
<b>📈 Yearly Activity Matrix</b> (Nord)<br/>
|
|
109
|
+
<sub>Commit velocity, issue resolutions, code reviews & contribution cadence</sub><br/><br/>
|
|
110
|
+
<img src="https://api.gitlytics.dev/api/cards/yearly-activity/demo.svg?theme=nord&v=3" alt="Yearly Activity Matrix" width="95%" />
|
|
111
|
+
</td>
|
|
112
|
+
</tr>
|
|
113
|
+
</table>
|
|
114
|
+
</div>
|
|
115
|
+
|
|
116
|
+
### 🚀 Instant Markdown Embed
|
|
117
|
+
|
|
118
|
+
Add any card to your GitHub `README.md` with a single line of Markdown:
|
|
119
|
+
|
|
120
|
+
```markdown
|
|
121
|
+
<!-- Replace 'yourusername' and choose your preferred theme -->
|
|
122
|
+

|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
<details>
|
|
126
|
+
<summary><b>🔍 View All 31 Card Slugs (hosted service)</b></summary>
|
|
127
|
+
|
|
128
|
+
<br/>
|
|
129
|
+
|
|
130
|
+
| Category | Card Slug | Focus & Visual Hierarchy |
|
|
131
|
+
| :--- | :--- | :--- |
|
|
132
|
+
| **Flagship** | `profile-card` | Complete overview: Avatar, bio, followers, contributions, languages. |
|
|
133
|
+
| **Highlights** | `account-highlights` | Most active repo, primary language, account longevity milestones. |
|
|
134
|
+
| **Languages** | `language-diversity` | Radial language entropy score gauge + byte volume breakdowns. |
|
|
135
|
+
| **Cadence** | `weekly-cadence` | 7-day cyclical radar heatmap of commit & review activity. |
|
|
136
|
+
| **Productivity** | `productive-hours` | Circadian clock visualization showing peak coding hours. |
|
|
137
|
+
| **Velocity** | `commit-velocity` | High-frequency commit trendlines, averages, and momentum. |
|
|
138
|
+
| **Trajectory** | `star-journey` | Milestone progression towards star milestones. |
|
|
139
|
+
| **Reviews** | `review-stats` | PR reviews conducted, turnaround latency, and acceptance rate. |
|
|
140
|
+
| **Matrix** | `yearly-activity` | Comprehensive yearly breakdown of contributions by category. |
|
|
141
|
+
| **Impact** | `open-source-impact` | Ecosystem reach, community forks, and public issue closure rate. |
|
|
142
|
+
|
|
143
|
+
*...and 21 more specialized cards available in the [Interactive Embed Studio](https://dashboard.gitlytics.dev/widgets).*
|
|
144
|
+
|
|
145
|
+
</details>
|
|
146
|
+
|
|
147
|
+
<details>
|
|
148
|
+
<summary><b>🎨 Explore 33 Color Themes</b></summary>
|
|
149
|
+
|
|
150
|
+
<br/>
|
|
151
|
+
|
|
152
|
+
Supported theme values via `?theme=<name>`:
|
|
153
|
+
|
|
154
|
+
`default` • `dracula` • `tokyonight` • `nord` • `obsidian-gold` • `synthwave84` • `cyberpunk` • `catppuccin-mocha` • `gruvbox-dark` • `monokai` • `one-dark` • `solarized-dark` • `matrix` • `rose-pine` • `github-dark` • `github-light` • `material-ocean` • `emerald-dark` • `amber-minimal` • `slate-pro` • `ayu-dark` • `horizon` • `shades-of-purple` • `cobalt2` • `night-owl` • `palenight` • `laserwave` • `oceanic-next` • `dimmed` • `high-contrast`
|
|
155
|
+
|
|
156
|
+
</details>
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
### 🏷️ Hosted Multi-Source Tech Badges & Concept Capsules
|
|
161
|
+
|
|
162
|
+
> Served by the hosted service at [`api.gitlytics.dev`](https://api.gitlytics.dev) - 181 tech logos plus custom text-only capsules. Not part of the pip package.
|
|
163
|
+
|
|
164
|
+
Generate clean capsule badges for your tech stack. Supports official brand logos plus **custom text-only capsules** for advanced concepts:
|
|
165
|
+
|
|
166
|
+
```markdown
|
|
167
|
+
<!-- Official brand logo capsule -->
|
|
168
|
+

|
|
169
|
+
|
|
170
|
+
<!-- Custom text-only concept capsule -->
|
|
171
|
+

|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
<div align="center">
|
|
175
|
+
<img src="https://api.gitlytics.dev/api/badge/tech.svg?slug=python&style=icon_label_value&label=Core&value=Python+3.12&color=3776AB" alt="Python Badge" />
|
|
176
|
+
<img src="https://api.gitlytics.dev/api/badge/tech.svg?slug=fastapi&style=icon_label_value&label=API&value=FastAPI&color=009688" alt="FastAPI Badge" />
|
|
177
|
+
<img src="https://api.gitlytics.dev/api/badge/tech.svg?slug=react&style=icon_label_value&label=UI&value=React+19&color=61DAFB" alt="React Badge" />
|
|
178
|
+
<img src="https://api.gitlytics.dev/api/badge/tech.svg?slug=docker&style=icon_label_value&label=DevOps&value=Docker&color=2496ED" alt="Docker Badge" />
|
|
179
|
+
<img src="https://api.gitlytics.dev/api/badge/tech.svg?slug=githubactions&style=icon_label_value&label=CI&value=Actions&color=2088FF" alt="Actions Badge" />
|
|
180
|
+
</div>
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
## 🔄 How the Traffic Engine Works
|
|
185
|
+
|
|
186
|
+
GitHub only preserves **14 days of historical traffic data**. Gitlytics automates historical aggregation into an append-only archive:
|
|
187
|
+
|
|
188
|
+
```mermaid
|
|
189
|
+
flowchart LR
|
|
190
|
+
A["GitHub Traffic API\n(14-Day Rolling Window)"] -->|Automated Snapshot| B["Gitlytics Sync Engine"]
|
|
191
|
+
B -->|Deduplicate & Merge| C[("Persistent CSV / Cloud DB\n(Indefinite Retention)")]
|
|
192
|
+
C --> D["Interactive Dashboard"]
|
|
193
|
+
C --> E["Hosted SVG Profile Cards\n(api.gitlytics.dev)"]
|
|
194
|
+
C --> F["AI Health Reports"]
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
### ⚡ Setup in Under 2 Minutes:
|
|
198
|
+
Use our pre-configured companion GitHub Action that runs automatically every 13 days to snapshot and backup your data:
|
|
199
|
+
|
|
200
|
+
👉 **[Deploy the Gitlytics GitHub Traffic Automation Action](https://github.com/ameyachopade/gitlytics-github-traffic-automation)**
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## 📦 Installation
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
# Core CLI and Python Analytics Engine
|
|
208
|
+
pip install gitlytics
|
|
209
|
+
|
|
210
|
+
# Full Package (Includes React Dashboard Web Server)
|
|
211
|
+
pip install "gitlytics[dashboard]"
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
## 💻 CLI Quick Reference
|
|
217
|
+
|
|
218
|
+
```bash
|
|
219
|
+
# 1. Fetch live 14-day traffic and display formatted ASCII tables
|
|
220
|
+
gitlytics fetch --token "ghp_your_token" --print-table
|
|
221
|
+
|
|
222
|
+
# 2. Filter specific metrics (e.g., views, clones, referrers)
|
|
223
|
+
gitlytics fetch --token "ghp_your_token" --metrics views clones
|
|
224
|
+
|
|
225
|
+
# 3. Synchronize snapshots into local database
|
|
226
|
+
gitlytics sync --token "ghp_your_token" --data-dir "./data"
|
|
227
|
+
|
|
228
|
+
# 4. Schedule automatic sync as a background cron job (e.g. daily at 11 PM)
|
|
229
|
+
gitlytics sync --token "ghp_your_token" --data-dir "./data" --schedule-cron "0 23 * * *"
|
|
230
|
+
|
|
231
|
+
# 5. Launch the React + FastAPI web analytics studio
|
|
232
|
+
gitlytics dashboard
|
|
233
|
+
|
|
234
|
+
# 6. Retrieve cumulative stargazer trajectory for a repository
|
|
235
|
+
gitlytics stars owner/repo --token "ghp_your_token"
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
> **CLI output contract:** the traffic table and the success summary go to **stdout**; every error and warning goes to **stderr**. Exit codes are meaningful - `0` success, `1` runtime/upstream failure, `2` bad input - so `gitlytics fetch ... > out.csv` never mixes diagnostics into your data.
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
242
|
+
## 🐍 Native Python SDK
|
|
243
|
+
|
|
244
|
+
Incorporate Gitlytics directly into custom pipelines, Jupyter notebooks, or scheduled scripts:
|
|
245
|
+
|
|
246
|
+
```python
|
|
247
|
+
import gitlytics
|
|
248
|
+
|
|
249
|
+
# 1. Fetch traffic data as a pandas DataFrame or timeseries dict
|
|
250
|
+
df = gitlytics.fetch_traffic(
|
|
251
|
+
token="ghp_your_token",
|
|
252
|
+
return_format="dataframe" # Options: "dataframe", "timeseries", "summary"
|
|
253
|
+
)
|
|
254
|
+
|
|
255
|
+
# 2. Sync snapshots and export consolidated dashboard JSON
|
|
256
|
+
gitlytics.sync(
|
|
257
|
+
token="ghp_your_token",
|
|
258
|
+
data_dir="./data",
|
|
259
|
+
export_json="./data/export.json"
|
|
260
|
+
)
|
|
261
|
+
|
|
262
|
+
# 3. Query historical cumulative star trajectory
|
|
263
|
+
star_points = gitlytics.fetch_star_history(
|
|
264
|
+
owner="ameyachopade",
|
|
265
|
+
repo="gitlytics",
|
|
266
|
+
token="ghp_your_token"
|
|
267
|
+
)
|
|
268
|
+
|
|
269
|
+
# 4. Programmatically serve the web studio on loopback with a pre-loaded token
|
|
270
|
+
gitlytics.serve_dashboard(
|
|
271
|
+
host="127.0.0.1",
|
|
272
|
+
port=8080,
|
|
273
|
+
token="ghp_your_token",
|
|
274
|
+
data_dir="./data"
|
|
275
|
+
)
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
---
|
|
279
|
+
|
|
280
|
+
## 📊 Database Schema (24 Daily Metrics)
|
|
281
|
+
|
|
282
|
+
Gitlytics stores normalized daily records in local CSV files or cloud storage:
|
|
283
|
+
|
|
284
|
+
| Column | Type | Description |
|
|
285
|
+
| :--- | :--- | :--- |
|
|
286
|
+
| `date` | `str` | ISO 8601 date string (`YYYY-MM-DD`). |
|
|
287
|
+
| `repository` | `str` | Full GitHub repository name (`owner/repo`). |
|
|
288
|
+
| `is_private` | `bool` | Privacy state of the repository. |
|
|
289
|
+
| `views` | `int` | Total page views recorded on this day. |
|
|
290
|
+
| `unique_visitors` | `int` | Unique visitors browsing the repository. |
|
|
291
|
+
| `clones` | `int` | Total git clone operations on this day. |
|
|
292
|
+
| `unique_cloners` | `int` | Distinct IP / client clone operations. |
|
|
293
|
+
| `stars` | `int` | Total cumulative stargazer snapshot count. |
|
|
294
|
+
| `forks` | `int` | Total cumulative fork count. |
|
|
295
|
+
| `releases` | `int` | Total repository release count snapshot. |
|
|
296
|
+
| `language` | `str` | Primary programming language. |
|
|
297
|
+
| `topics` | `str` | JSON array of repository tags and topics. |
|
|
298
|
+
| `watchers_count` | `int` | Total watcher count. |
|
|
299
|
+
| `pushed_at` | `str` | Last code push timestamp. |
|
|
300
|
+
| `created_at` | `str` | Repository creation timestamp. |
|
|
301
|
+
| `open_issues_count` | `int` | Total open issues snapshot. |
|
|
302
|
+
| `top_referrer` | `str` | Highest-volume external referral domain. |
|
|
303
|
+
| `top_referrer_views` | `int` | Total views attributed to top referrer. |
|
|
304
|
+
| `top_referrer_uniques` | `int` | Unique visitors attributed to top referrer. |
|
|
305
|
+
| `_raw_referrers` | `str` | Complete JSON breakdown of all referral channels. |
|
|
306
|
+
| `top_path` | `str` | Most frequently visited repository file/path. |
|
|
307
|
+
| `top_path_views` | `int` | Views attributed to the top path. |
|
|
308
|
+
| `top_path_uniques` | `int` | Unique visitors attributed to the top path. |
|
|
309
|
+
| `_raw_paths` | `str` | Complete JSON breakdown of all popular paths. |
|
|
310
|
+
|
|
311
|
+
---
|
|
312
|
+
|
|
313
|
+
## 🔗 Ecosystem & Links
|
|
314
|
+
|
|
315
|
+
- 📦 **[PyPI Package](https://pypi.org/project/gitlytics/)**: Official Python package distribution - the traffic CLI, the Python SDK and the local/self-hosted dashboard.
|
|
316
|
+
- 🌐 **[Live Dashboard](https://dashboard.gitlytics.dev)**: Production Web UI to explore widgets and inspect traffic.
|
|
317
|
+
- 🖼️ **[Hosted Card & Logo API](https://api.gitlytics.dev)**: Serves the 31 SVG profile-card slugs (33 themes) and 181 tech-logo capsules. This is a separate hosted service - it is **not** bundled in the `gitlytics` wheel.
|
|
318
|
+
- 📚 **[Documentation](https://docs.gitlytics.dev)**: Full API guides, card parameters, and self-hosting documentation.
|
|
319
|
+
- 📝 **[Engineering Blog](https://blog.gitlytics.dev)**: Architecture breakdowns, caching strategies, and performance benchmarks.
|
|
320
|
+
- ⚙️ **[Traffic Automation Action](https://github.com/ameyachopade/gitlytics-github-traffic-automation)**: Official GitHub Action companion.
|
|
321
|
+
|
|
322
|
+
---
|
|
323
|
+
|
|
324
|
+
## ⭐ Show Your Support
|
|
325
|
+
|
|
326
|
+
If Gitlytics has saved your repository data or elevated your profile, please consider giving the repository a **⭐ Star on [GitHub](https://github.com/ameyachopade/gitlytics)** - it helps the project grow!
|
|
327
|
+
|
|
328
|
+
---
|
|
329
|
+
|
|
330
|
+
## 📄 License
|
|
331
|
+
|
|
332
|
+
Distributed under **Apache License 2.0 + Commons Clause v1.0**. See [`LICENSE`](LICENSE) for full details.
|
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
<img src="https://raw.githubusercontent.com/ameyachopade/gitlytics/main/assets/logo.png" alt="Gitlytics Logo" width="140" />
|
|
4
|
+
|
|
5
|
+
# Gitlytics
|
|
6
|
+
### Next-Gen GitHub Traffic Intelligence, Dynamic SVG Widgets & Automation
|
|
7
|
+
|
|
8
|
+
[](https://pypi.org/project/gitlytics/)
|
|
9
|
+
[](https://www.python.org/)
|
|
10
|
+
[](LICENSE)
|
|
11
|
+
[](https://fastapi.tiangolo.com/)
|
|
12
|
+
[](https://react.dev/)
|
|
13
|
+
[](https://dashboard.gitlytics.dev)
|
|
14
|
+
[](https://docs.gitlytics.dev)
|
|
15
|
+
|
|
16
|
+
<br/>
|
|
17
|
+
|
|
18
|
+
**The complete developer analytics suite for GitHub.**
|
|
19
|
+
Bypass GitHub's 14-day traffic cliff, track stargazer trajectories, and launch a local or self-hosted analytics dashboard in seconds.
|
|
20
|
+
|
|
21
|
+
> **What ships in the `pip install gitlytics` wheel:** the CLI, the Python SDK, and the local/self-hosted React dashboard. The **SVG profile cards and tech-badge renderer is a separate hosted service** at [`api.gitlytics.dev`](https://api.gitlytics.dev) - the package does not contain a card generator. See [Ecosystem & Links](#-ecosystem--links).
|
|
22
|
+
|
|
23
|
+
[**Explore Live Dashboard**](https://dashboard.gitlytics.dev) • [**Read the Docs**](https://docs.gitlytics.dev) • [**Engineering Blog**](https://blog.gitlytics.dev) • [**GitHub Action**](https://github.com/ameyachopade/gitlytics-github-traffic-automation)
|
|
24
|
+
|
|
25
|
+
<br/>
|
|
26
|
+
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## ⚡ Highlights at a Glance
|
|
32
|
+
|
|
33
|
+
| Feature | Description |
|
|
34
|
+
| :--- | :--- |
|
|
35
|
+
| **🚨 14-Day Limit Defeated** | Automatically snapshot & merge repository views, clones, referrers, and paths indefinitely. |
|
|
36
|
+
| **📈 Stargazer Trajectories** | Real-time cumulative star growth tracking and milestone timeline projections. |
|
|
37
|
+
| **🤖 AI Health Scorecards** | Cloud AI diagnostics analyzing commit velocity, issue health, PR turnaround, and traffic surges. |
|
|
38
|
+
| **💻 CLI, Python SDK & Web UI** | Use it as a terminal command, import it into Python pipelines, or self-host the full React studio. |
|
|
39
|
+
| **🎨 Hosted SVG Cards & Logos** | The hosted service at [`api.gitlytics.dev`](https://api.gitlytics.dev) renders 31 profile-card slugs in 33 high-contrast themes, plus 181 tech-logo capsules. Not part of the pip package. |
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## 🎨 Hosted Profile Cards & Widgets
|
|
44
|
+
|
|
45
|
+
> **Hosted service, not the pip package.** The card and logo renderer below is served by the Gitlytics cloud API at [`api.gitlytics.dev`](https://api.gitlytics.dev). The `gitlytics` wheel you install from PyPI contains the traffic CLI, the Python SDK and the local dashboard - it does **not** contain an SVG card generator. Install the package for traffic analytics; embed the hosted URLs for cards.
|
|
46
|
+
|
|
47
|
+
Elevate your GitHub profile README with the Gitlytics hosted native, dynamic vector SVG rendering engine. All cards feature crisp typography, custom vector squircle icons, subtle gradient accents, and real-time GitHub GraphQL data.
|
|
48
|
+
|
|
49
|
+
### 🖼️ Featured Card Previews
|
|
50
|
+
|
|
51
|
+
<div align="center">
|
|
52
|
+
<table border="0" width="100%">
|
|
53
|
+
<tr>
|
|
54
|
+
<td align="center" width="50%">
|
|
55
|
+
<b>👤 Flagship Developer Profile Card</b> (Obsidian Slate)<br/>
|
|
56
|
+
<sub>Avatar, bio, verified status, 4 metric squircles & top languages bar</sub><br/><br/>
|
|
57
|
+
<img src="https://api.gitlytics.dev/api/cards/profile-card/demo.svg?theme=default&v=3" alt="Developer Profile Card" width="95%" />
|
|
58
|
+
</td>
|
|
59
|
+
<td align="center" width="50%">
|
|
60
|
+
<b>⭐ Account Highlights 2A-2</b> (Tokyo Night)<br/>
|
|
61
|
+
<sub>Top repository, primary language share, peak year & longevity badge</sub><br/><br/>
|
|
62
|
+
<img src="https://api.gitlytics.dev/api/cards/account-highlights/demo.svg?theme=tokyonight&v=3" alt="Account Highlights" width="95%" />
|
|
63
|
+
</td>
|
|
64
|
+
</tr>
|
|
65
|
+
<tr>
|
|
66
|
+
<td align="center" width="50%">
|
|
67
|
+
<b>📊 Language Diversity Index</b> (Dracula)<br/>
|
|
68
|
+
<sub>Radial diversity score gauge, repo share, byte volume & stack capsules</sub><br/><br/>
|
|
69
|
+
<img src="https://api.gitlytics.dev/api/cards/language-diversity/demo.svg?theme=dracula&v=3" alt="Language Diversity" width="95%" />
|
|
70
|
+
</td>
|
|
71
|
+
<td align="center" width="50%">
|
|
72
|
+
<b>📈 Yearly Activity Matrix</b> (Nord)<br/>
|
|
73
|
+
<sub>Commit velocity, issue resolutions, code reviews & contribution cadence</sub><br/><br/>
|
|
74
|
+
<img src="https://api.gitlytics.dev/api/cards/yearly-activity/demo.svg?theme=nord&v=3" alt="Yearly Activity Matrix" width="95%" />
|
|
75
|
+
</td>
|
|
76
|
+
</tr>
|
|
77
|
+
</table>
|
|
78
|
+
</div>
|
|
79
|
+
|
|
80
|
+
### 🚀 Instant Markdown Embed
|
|
81
|
+
|
|
82
|
+
Add any card to your GitHub `README.md` with a single line of Markdown:
|
|
83
|
+
|
|
84
|
+
```markdown
|
|
85
|
+
<!-- Replace 'yourusername' and choose your preferred theme -->
|
|
86
|
+

|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
<details>
|
|
90
|
+
<summary><b>🔍 View All 31 Card Slugs (hosted service)</b></summary>
|
|
91
|
+
|
|
92
|
+
<br/>
|
|
93
|
+
|
|
94
|
+
| Category | Card Slug | Focus & Visual Hierarchy |
|
|
95
|
+
| :--- | :--- | :--- |
|
|
96
|
+
| **Flagship** | `profile-card` | Complete overview: Avatar, bio, followers, contributions, languages. |
|
|
97
|
+
| **Highlights** | `account-highlights` | Most active repo, primary language, account longevity milestones. |
|
|
98
|
+
| **Languages** | `language-diversity` | Radial language entropy score gauge + byte volume breakdowns. |
|
|
99
|
+
| **Cadence** | `weekly-cadence` | 7-day cyclical radar heatmap of commit & review activity. |
|
|
100
|
+
| **Productivity** | `productive-hours` | Circadian clock visualization showing peak coding hours. |
|
|
101
|
+
| **Velocity** | `commit-velocity` | High-frequency commit trendlines, averages, and momentum. |
|
|
102
|
+
| **Trajectory** | `star-journey` | Milestone progression towards star milestones. |
|
|
103
|
+
| **Reviews** | `review-stats` | PR reviews conducted, turnaround latency, and acceptance rate. |
|
|
104
|
+
| **Matrix** | `yearly-activity` | Comprehensive yearly breakdown of contributions by category. |
|
|
105
|
+
| **Impact** | `open-source-impact` | Ecosystem reach, community forks, and public issue closure rate. |
|
|
106
|
+
|
|
107
|
+
*...and 21 more specialized cards available in the [Interactive Embed Studio](https://dashboard.gitlytics.dev/widgets).*
|
|
108
|
+
|
|
109
|
+
</details>
|
|
110
|
+
|
|
111
|
+
<details>
|
|
112
|
+
<summary><b>🎨 Explore 33 Color Themes</b></summary>
|
|
113
|
+
|
|
114
|
+
<br/>
|
|
115
|
+
|
|
116
|
+
Supported theme values via `?theme=<name>`:
|
|
117
|
+
|
|
118
|
+
`default` • `dracula` • `tokyonight` • `nord` • `obsidian-gold` • `synthwave84` • `cyberpunk` • `catppuccin-mocha` • `gruvbox-dark` • `monokai` • `one-dark` • `solarized-dark` • `matrix` • `rose-pine` • `github-dark` • `github-light` • `material-ocean` • `emerald-dark` • `amber-minimal` • `slate-pro` • `ayu-dark` • `horizon` • `shades-of-purple` • `cobalt2` • `night-owl` • `palenight` • `laserwave` • `oceanic-next` • `dimmed` • `high-contrast`
|
|
119
|
+
|
|
120
|
+
</details>
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
### 🏷️ Hosted Multi-Source Tech Badges & Concept Capsules
|
|
125
|
+
|
|
126
|
+
> Served by the hosted service at [`api.gitlytics.dev`](https://api.gitlytics.dev) - 181 tech logos plus custom text-only capsules. Not part of the pip package.
|
|
127
|
+
|
|
128
|
+
Generate clean capsule badges for your tech stack. Supports official brand logos plus **custom text-only capsules** for advanced concepts:
|
|
129
|
+
|
|
130
|
+
```markdown
|
|
131
|
+
<!-- Official brand logo capsule -->
|
|
132
|
+

|
|
133
|
+
|
|
134
|
+
<!-- Custom text-only concept capsule -->
|
|
135
|
+

|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
<div align="center">
|
|
139
|
+
<img src="https://api.gitlytics.dev/api/badge/tech.svg?slug=python&style=icon_label_value&label=Core&value=Python+3.12&color=3776AB" alt="Python Badge" />
|
|
140
|
+
<img src="https://api.gitlytics.dev/api/badge/tech.svg?slug=fastapi&style=icon_label_value&label=API&value=FastAPI&color=009688" alt="FastAPI Badge" />
|
|
141
|
+
<img src="https://api.gitlytics.dev/api/badge/tech.svg?slug=react&style=icon_label_value&label=UI&value=React+19&color=61DAFB" alt="React Badge" />
|
|
142
|
+
<img src="https://api.gitlytics.dev/api/badge/tech.svg?slug=docker&style=icon_label_value&label=DevOps&value=Docker&color=2496ED" alt="Docker Badge" />
|
|
143
|
+
<img src="https://api.gitlytics.dev/api/badge/tech.svg?slug=githubactions&style=icon_label_value&label=CI&value=Actions&color=2088FF" alt="Actions Badge" />
|
|
144
|
+
</div>
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## 🔄 How the Traffic Engine Works
|
|
149
|
+
|
|
150
|
+
GitHub only preserves **14 days of historical traffic data**. Gitlytics automates historical aggregation into an append-only archive:
|
|
151
|
+
|
|
152
|
+
```mermaid
|
|
153
|
+
flowchart LR
|
|
154
|
+
A["GitHub Traffic API\n(14-Day Rolling Window)"] -->|Automated Snapshot| B["Gitlytics Sync Engine"]
|
|
155
|
+
B -->|Deduplicate & Merge| C[("Persistent CSV / Cloud DB\n(Indefinite Retention)")]
|
|
156
|
+
C --> D["Interactive Dashboard"]
|
|
157
|
+
C --> E["Hosted SVG Profile Cards\n(api.gitlytics.dev)"]
|
|
158
|
+
C --> F["AI Health Reports"]
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### ⚡ Setup in Under 2 Minutes:
|
|
162
|
+
Use our pre-configured companion GitHub Action that runs automatically every 13 days to snapshot and backup your data:
|
|
163
|
+
|
|
164
|
+
👉 **[Deploy the Gitlytics GitHub Traffic Automation Action](https://github.com/ameyachopade/gitlytics-github-traffic-automation)**
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
## 📦 Installation
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
# Core CLI and Python Analytics Engine
|
|
172
|
+
pip install gitlytics
|
|
173
|
+
|
|
174
|
+
# Full Package (Includes React Dashboard Web Server)
|
|
175
|
+
pip install "gitlytics[dashboard]"
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
## 💻 CLI Quick Reference
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
# 1. Fetch live 14-day traffic and display formatted ASCII tables
|
|
184
|
+
gitlytics fetch --token "ghp_your_token" --print-table
|
|
185
|
+
|
|
186
|
+
# 2. Filter specific metrics (e.g., views, clones, referrers)
|
|
187
|
+
gitlytics fetch --token "ghp_your_token" --metrics views clones
|
|
188
|
+
|
|
189
|
+
# 3. Synchronize snapshots into local database
|
|
190
|
+
gitlytics sync --token "ghp_your_token" --data-dir "./data"
|
|
191
|
+
|
|
192
|
+
# 4. Schedule automatic sync as a background cron job (e.g. daily at 11 PM)
|
|
193
|
+
gitlytics sync --token "ghp_your_token" --data-dir "./data" --schedule-cron "0 23 * * *"
|
|
194
|
+
|
|
195
|
+
# 5. Launch the React + FastAPI web analytics studio
|
|
196
|
+
gitlytics dashboard
|
|
197
|
+
|
|
198
|
+
# 6. Retrieve cumulative stargazer trajectory for a repository
|
|
199
|
+
gitlytics stars owner/repo --token "ghp_your_token"
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
> **CLI output contract:** the traffic table and the success summary go to **stdout**; every error and warning goes to **stderr**. Exit codes are meaningful - `0` success, `1` runtime/upstream failure, `2` bad input - so `gitlytics fetch ... > out.csv` never mixes diagnostics into your data.
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## 🐍 Native Python SDK
|
|
207
|
+
|
|
208
|
+
Incorporate Gitlytics directly into custom pipelines, Jupyter notebooks, or scheduled scripts:
|
|
209
|
+
|
|
210
|
+
```python
|
|
211
|
+
import gitlytics
|
|
212
|
+
|
|
213
|
+
# 1. Fetch traffic data as a pandas DataFrame or timeseries dict
|
|
214
|
+
df = gitlytics.fetch_traffic(
|
|
215
|
+
token="ghp_your_token",
|
|
216
|
+
return_format="dataframe" # Options: "dataframe", "timeseries", "summary"
|
|
217
|
+
)
|
|
218
|
+
|
|
219
|
+
# 2. Sync snapshots and export consolidated dashboard JSON
|
|
220
|
+
gitlytics.sync(
|
|
221
|
+
token="ghp_your_token",
|
|
222
|
+
data_dir="./data",
|
|
223
|
+
export_json="./data/export.json"
|
|
224
|
+
)
|
|
225
|
+
|
|
226
|
+
# 3. Query historical cumulative star trajectory
|
|
227
|
+
star_points = gitlytics.fetch_star_history(
|
|
228
|
+
owner="ameyachopade",
|
|
229
|
+
repo="gitlytics",
|
|
230
|
+
token="ghp_your_token"
|
|
231
|
+
)
|
|
232
|
+
|
|
233
|
+
# 4. Programmatically serve the web studio on loopback with a pre-loaded token
|
|
234
|
+
gitlytics.serve_dashboard(
|
|
235
|
+
host="127.0.0.1",
|
|
236
|
+
port=8080,
|
|
237
|
+
token="ghp_your_token",
|
|
238
|
+
data_dir="./data"
|
|
239
|
+
)
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
|
|
244
|
+
## 📊 Database Schema (24 Daily Metrics)
|
|
245
|
+
|
|
246
|
+
Gitlytics stores normalized daily records in local CSV files or cloud storage:
|
|
247
|
+
|
|
248
|
+
| Column | Type | Description |
|
|
249
|
+
| :--- | :--- | :--- |
|
|
250
|
+
| `date` | `str` | ISO 8601 date string (`YYYY-MM-DD`). |
|
|
251
|
+
| `repository` | `str` | Full GitHub repository name (`owner/repo`). |
|
|
252
|
+
| `is_private` | `bool` | Privacy state of the repository. |
|
|
253
|
+
| `views` | `int` | Total page views recorded on this day. |
|
|
254
|
+
| `unique_visitors` | `int` | Unique visitors browsing the repository. |
|
|
255
|
+
| `clones` | `int` | Total git clone operations on this day. |
|
|
256
|
+
| `unique_cloners` | `int` | Distinct IP / client clone operations. |
|
|
257
|
+
| `stars` | `int` | Total cumulative stargazer snapshot count. |
|
|
258
|
+
| `forks` | `int` | Total cumulative fork count. |
|
|
259
|
+
| `releases` | `int` | Total repository release count snapshot. |
|
|
260
|
+
| `language` | `str` | Primary programming language. |
|
|
261
|
+
| `topics` | `str` | JSON array of repository tags and topics. |
|
|
262
|
+
| `watchers_count` | `int` | Total watcher count. |
|
|
263
|
+
| `pushed_at` | `str` | Last code push timestamp. |
|
|
264
|
+
| `created_at` | `str` | Repository creation timestamp. |
|
|
265
|
+
| `open_issues_count` | `int` | Total open issues snapshot. |
|
|
266
|
+
| `top_referrer` | `str` | Highest-volume external referral domain. |
|
|
267
|
+
| `top_referrer_views` | `int` | Total views attributed to top referrer. |
|
|
268
|
+
| `top_referrer_uniques` | `int` | Unique visitors attributed to top referrer. |
|
|
269
|
+
| `_raw_referrers` | `str` | Complete JSON breakdown of all referral channels. |
|
|
270
|
+
| `top_path` | `str` | Most frequently visited repository file/path. |
|
|
271
|
+
| `top_path_views` | `int` | Views attributed to the top path. |
|
|
272
|
+
| `top_path_uniques` | `int` | Unique visitors attributed to the top path. |
|
|
273
|
+
| `_raw_paths` | `str` | Complete JSON breakdown of all popular paths. |
|
|
274
|
+
|
|
275
|
+
---
|
|
276
|
+
|
|
277
|
+
## 🔗 Ecosystem & Links
|
|
278
|
+
|
|
279
|
+
- 📦 **[PyPI Package](https://pypi.org/project/gitlytics/)**: Official Python package distribution - the traffic CLI, the Python SDK and the local/self-hosted dashboard.
|
|
280
|
+
- 🌐 **[Live Dashboard](https://dashboard.gitlytics.dev)**: Production Web UI to explore widgets and inspect traffic.
|
|
281
|
+
- 🖼️ **[Hosted Card & Logo API](https://api.gitlytics.dev)**: Serves the 31 SVG profile-card slugs (33 themes) and 181 tech-logo capsules. This is a separate hosted service - it is **not** bundled in the `gitlytics` wheel.
|
|
282
|
+
- 📚 **[Documentation](https://docs.gitlytics.dev)**: Full API guides, card parameters, and self-hosting documentation.
|
|
283
|
+
- 📝 **[Engineering Blog](https://blog.gitlytics.dev)**: Architecture breakdowns, caching strategies, and performance benchmarks.
|
|
284
|
+
- ⚙️ **[Traffic Automation Action](https://github.com/ameyachopade/gitlytics-github-traffic-automation)**: Official GitHub Action companion.
|
|
285
|
+
|
|
286
|
+
---
|
|
287
|
+
|
|
288
|
+
## ⭐ Show Your Support
|
|
289
|
+
|
|
290
|
+
If Gitlytics has saved your repository data or elevated your profile, please consider giving the repository a **⭐ Star on [GitHub](https://github.com/ameyachopade/gitlytics)** - it helps the project grow!
|
|
291
|
+
|
|
292
|
+
---
|
|
293
|
+
|
|
294
|
+
## 📄 License
|
|
295
|
+
|
|
296
|
+
Distributed under **Apache License 2.0 + Commons Clause v1.0**. See [`LICENSE`](LICENSE) for full details.
|