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.
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.
Published on PyPI. It can be installed with the following command.
pip install django-dynamic-shields
Alternatively, you can download and install the .whl file from the release.
Uploaded to the following github pages
Development requires installation of Poetry.
Watchman is required to run code checks with pyre. Although not required for development, code that fails pyre-check cannot be merged.
After installing the required software, execute the following commands to set up the development environment.
poetry install
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.
Must pass CI by pytest.
poetry run pytest --cov=django_dynamic_shields --cov-report=xml --workers auto
lizard is a tool for measuring CCN. lizard allows us to block merging of overly complex code.
poetry run lizard ./django_dynamic_shields/
Pyre is a performant type checker for Python compliant with PEP 484.
poetry run pyre
bandit is a static analysis tool for python. It blocks vulnerable code.
poetry run bandit django_dynamic_shields -r
python-taint(pyt) is a static analysis tool for python. It blocks vulnerable code.
poetry run pyt -a D ./django_dynamic_shields
Develop according to GitHub flow
If you have any questions, feel free to ask in the Q&A