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.
Metadata
Release files for djangocms-gh-stats 2026.7.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| djangocms_gh_stats-2026.7.1.tar.gz | 26.9 kB | With provenance | Details for djangocms_gh_stats-2026.7.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| djangocms_gh_stats-2026.7.1-py3-none-any.whl | Python 3 | none | any | Details for djangocms_gh_stats-2026.7.1-py3-none-any.whl |
Total release size: 54.9 kB
Release files / djangocms_gh_stats-2026.7.1.tar.gz
| Download URL | djangocms_gh_stats-2026.7.1.tar.gz |
|---|---|
| Size | 26.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5ecddf50bf145145cb3d0fa7a79d976088be02971a6e4b78c78569261ef524a9
|
|
BLAKE2b-256 checksum How to use checksums |
05c8a9106c66d570600daa0ac99a0badfeeafa7a99f51fb364c7ef125adb840c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 1, 2026.
Transparency logRelease files / djangocms_gh_stats-2026.7.1-py3-none-any.whl
| Download URL | djangocms_gh_stats-2026.7.1-py3-none-any.whl |
|---|---|
| Size | 27.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
86b1a179a9d6f66c1cbb3a52bd73d02d3fa0b65f530c0b7b8cbbfd02c5ed3e80
|
|
BLAKE2b-256 checksum How to use checksums |
48a59c49f2a0ce2d0dd686052ca73b4b792e5e43c6ab14bcfcad3c560bfba7e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 1, 2026.
Transparency logSecurity for djangocms-gh-stats 2026.7.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for djangocms_gh_stats-2026.7.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 1, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.