https://github.com/uno-takashi/django-dynamic-shields
Library to add a view to dynamically change badges in shields.io using django.
https://github.com/uno-takashi/django-dynamic-shields
badge django django-library poetry python shields sphinx
Last synced: 2 months ago
JSON representation
Library to add a view to dynamically change badges in shields.io using django.
- Host: GitHub
- URL: https://github.com/uno-takashi/django-dynamic-shields
- Owner: Uno-Takashi
- License: mit
- Created: 2022-06-09T16:05:42.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-02-16T06:07:54.000Z (over 3 years ago)
- Last Synced: 2025-09-30T13:01:57.356Z (9 months ago)
- Topics: badge, django, django-library, poetry, python, shields, sphinx
- Language: Python
- Homepage: https://uno-takashi.github.io/django-dynamic-shields/
- Size: 116 MB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# django-dynamic-shields
[](https://github.com/Uno-Takashi/django-dynamic-shields/actions/workflows/sphinx.yml)
[](https://github.com/Uno-Takashi/django-dynamic-shields/actions/workflows/code-quality.yml)
[](https://github.com/Uno-Takashi/django-dynamic-shields/actions/workflows/security.yml)
[](https://codecov.io/gh/Uno-Takashi/django-dynamic-shields)
[](https://pypi.org/project/django-dynamic-shields/)
[](https://pypi.org/project/django-dynamic-shields/)
[](https://github.com/Uno-Takashi/django-dynamic-shields/blob/main/LICENSE)
## 📚 Overview
[Shields.io](https://shields.io/) is one of the great inventions in human history. Everyone has collected badges and stickers as a child. In other words, it is one of the fundamental human needs to stick a badge.
With django-dynamic-badge, the display can be changed dynamically using information from a server built with [Django](https://www.djangoproject.com/).
For example, create a badge with the number of active users today, the number of times the function has been used, and the results of the server health check.
## 💾 Install
Published on [PyPI](https://pypi.org/project/django-dynamic-shields/). It can be installed with the following command.
```shell
pip install django-dynamic-shields
```
Alternatively, you can download and install the .whl file from the [release](https://github.com/Uno-Takashi/django-dynamic-shields/releases).
## 📔 Document
Uploaded to the following github pages
- [django-dynamic-shields documentation](https://uno-takashi.github.io/django-dynamic-shields/)
## 🎮 Usage
## ⚒️ Develop
### Preparation
Development requires installation of [Poetry](https://python-poetry.org/).
- [Introduction | Documentation | Poetry - Python dependency management and packaging made easy](https://python-poetry.org/docs/)
[Watchman](https://facebook.github.io/watchman/) is required to run code checks with pyre. Although not required for development, code that fails pyre-check cannot be merged.
- [Installation | Watchman](https://facebook.github.io/watchman/docs/install.html)
After installing the required software, execute the following commands to set up the development environment.
```shell
poetry install
```
### Code Check
This repository uses Github actions for code checking. These actions are automatically executed when you push, but you can also execute them in your local environment before pushing.
#### pytest
[](https://codecov.io/gh/Uno-Takashi/django-dynamic-shields)
Must pass CI by pytest.
```shell
poetry run pytest --cov=django_dynamic_shields --cov-report=xml --workers auto
```
#### lizard
lizard is a tool for measuring CCN. lizard allows us to block merging of overly complex code.
```shell
poetry run lizard ./django_dynamic_shields/
```
#### pyre
Pyre is a performant type checker for Python compliant with PEP 484.
```shell
poetry run pyre
```
#### bndit
bandit is a static analysis tool for python. It blocks vulnerable code.
```shell
poetry run bandit django_dynamic_shields -r
```
#### python-taint
python-taint(pyt) is a static analysis tool for python. It blocks vulnerable code.
```shell
poetry run pyt -a D ./django_dynamic_shields
```
### Other
Develop according to [GitHub flow](https://docs.github.com/en/get-started/quickstart/github-flow)
If you have any questions, feel free to ask in the [Q&A](https://github.com/Uno-Takashi/django-dynamic-shields/discussions/categories/q-a)
## 📝 License
- [MIT License](https://github.com/Uno-Takashi/django-dynamic-shields/blob/main/LICENSE)



[](https://www.python.org/)
[](https://www.djangoproject.com/)