A django CMS plugin to display GitHub statistics for organisations and repositories.
Project description
A django CMS plugin package that fetches statistics from the GitHub REST API and displays them on your CMS-powered website.
Features
The package ships the following CMS plugins, all configurable to target either a GitHub organisation or a specific repository:
GitHub Stars — display the star count of a repository.
GitHub Forks — display the fork count of a repository.
GitHub Open Issues — display the open issue count of a repository.
GitHub Contributors — display an avatar grid of top contributors.
Installation
Install using uv (recommended):
uv add djangocms-gh-stats
Or using pip:
pip install djangocms-gh-stats
Configuration
Add the application to INSTALLED_APPS in your Django settings:
INSTALLED_APPS = [
...
"djangocms_gh_stats",
...
]
Run the database migrations:
python manage.py migrate djangocms_gh_stats
Optional settings
- DJANGOCMS_GH_STATS_TOKEN
A GitHub Personal Access Token (PAT) for authenticated API requests. Unauthenticated requests are subject to GitHub’s lower rate limit of 60 requests per hour per IP address. Providing a token raises this limit to 5,000 requests per hour:
DJANGOCMS_GH_STATS_TOKEN = "github_pat_..."
- DJANGOCMS_GH_STATS_CACHE_TIMEOUT
How long (in seconds) to cache API responses. Defaults to 600 (10 minutes). Set to 0 to disable caching:
DJANGOCMS_GH_STATS_CACHE_TIMEOUT = 600
Usage
After installation, the following plugins are available in the django CMS plugin picker under the GitHub Stats module:
GitHub Stars
GitHub Forks
GitHub Open Issues
GitHub Contributors
Each plugin has the following configuration fields:
Scope — choose between Organisation or Repository.
Organisation — the GitHub organisation or user name (e.g. django-cms).
Repository — the repository name (required when scope is Repository).
Development
This project is managed with uv.
Clone the repository and install dependencies:
git clone https://github.com/marksweb/djangocms_gh_stats.git cd djangocms_gh_stats uv sync
Run the tests:
uv run pytest
Run the linter:
uv run ruff check djangocms_gh_stats/ tests/
Releasing
Releases are created with the Release and Publish GitHub Actions workflow.
The workflow uses CalVer tags in YYYY.M.D format and can append .N for multiple releases on the same day.
To create a release:
Run the workflow from the Actions tab.
Optionally provide a CalVer version (for example 2026.6.28).
The workflow creates the Git tag, creates a GitHub release, builds with uv, and publishes to PyPI via trusted publishing.
The workflow updates djangocms_gh_stats/__init__.py and inserts a new <version> (<YYYY-MM-DD>) section directly below the top changelog section, preserving the unreleased heading.
Contributing
Contributions are welcome! Please open an issue or submit a pull request on GitHub.
License
This project is licensed under the BSD 3-Clause License — see the LICENSE file for details.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file djangocms_gh_stats-2026.7.1.tar.gz.
File metadata
- Download URL: djangocms_gh_stats-2026.7.1.tar.gz
- Upload date:
- Size: 26.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ecddf50bf145145cb3d0fa7a79d976088be02971a6e4b78c78569261ef524a9
|
|
| MD5 |
2b4a43abd2be66248d07bc3c41a4f777
|
|
| BLAKE2b-256 |
05c8a9106c66d570600daa0ac99a0badfeeafa7a99f51fb364c7ef125adb840c
|
Provenance
The following attestation bundles were made for djangocms_gh_stats-2026.7.1.tar.gz:
Publisher:
release.yml on marksweb/djangocms_gh_stats
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
djangocms_gh_stats-2026.7.1.tar.gz -
Subject digest:
5ecddf50bf145145cb3d0fa7a79d976088be02971a6e4b78c78569261ef524a9 - Sigstore transparency entry: 2028671006
- Sigstore integration time:
-
Permalink:
marksweb/djangocms_gh_stats@6d79070c8b73d69aa53ab3fbe739a1c8efd02f36 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/marksweb
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6d79070c8b73d69aa53ab3fbe739a1c8efd02f36 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file djangocms_gh_stats-2026.7.1-py3-none-any.whl.
File metadata
- Download URL: djangocms_gh_stats-2026.7.1-py3-none-any.whl
- Upload date:
- Size: 27.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86b1a179a9d6f66c1cbb3a52bd73d02d3fa0b65f530c0b7b8cbbfd02c5ed3e80
|
|
| MD5 |
933fb606938f508c6058847edbd0a690
|
|
| BLAKE2b-256 |
48a59c49f2a0ce2d0dd686052ca73b4b792e5e43c6ab14bcfcad3c560bfba7e7
|
Provenance
The following attestation bundles were made for djangocms_gh_stats-2026.7.1-py3-none-any.whl:
Publisher:
release.yml on marksweb/djangocms_gh_stats
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
djangocms_gh_stats-2026.7.1-py3-none-any.whl -
Subject digest:
86b1a179a9d6f66c1cbb3a52bd73d02d3fa0b65f530c0b7b8cbbfd02c5ed3e80 - Sigstore transparency entry: 2028671067
- Sigstore integration time:
-
Permalink:
marksweb/djangocms_gh_stats@6d79070c8b73d69aa53ab3fbe739a1c8efd02f36 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/marksweb
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6d79070c8b73d69aa53ab3fbe739a1c8efd02f36 -
Trigger Event:
workflow_dispatch
-
Statement type: