{"id":17151221,"url":"https://github.com/soda480/pybuilder-anybadge","last_synced_at":"2025-07-15T12:34:30.029Z","repository":{"id":44369799,"uuid":"347202566","full_name":"soda480/pybuilder-anybadge","owner":"soda480","description":"A pybuilder plugin that generates badges for your pyb project.","archived":false,"fork":false,"pushed_at":"2024-03-22T21:36:01.000Z","size":107,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-10T09:32:58.671Z","etag":null,"topics":["badge-generator","pybuilder","pybuilder-plugin","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/soda480.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-12T21:29:58.000Z","updated_at":"2021-10-03T22:31:19.000Z","dependencies_parsed_at":"2024-10-14T21:47:39.721Z","dependency_job_id":null,"html_url":"https://github.com/soda480/pybuilder-anybadge","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soda480%2Fpybuilder-anybadge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soda480%2Fpybuilder-anybadge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soda480%2Fpybuilder-anybadge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soda480%2Fpybuilder-anybadge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/soda480","download_url":"https://codeload.github.com/soda480/pybuilder-anybadge/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245267813,"owners_count":20587507,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["badge-generator","pybuilder","pybuilder-plugin","python"],"created_at":"2024-10-14T21:37:31.751Z","updated_at":"2025-03-24T12:23:27.616Z","avatar_url":"https://github.com/soda480.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pybuilder-anybadge\n[![GitHub Workflow Status](https://github.com/soda480/pybuilder-anybadge/workflows/build/badge.svg)](https://github.com/soda480/pybuilder-anybadge/actions)\n[![PyPI version](https://badge.fury.io/py/pybuilder-anybadge.svg)](https://badge.fury.io/py/pybuilder-anybadge)\n[![python](https://img.shields.io/badge/python-3.7%20%7C%203.8%20%7C%203.9%20%7C%203.10-teal)](https://www.python.org/downloads/)\n\nA pybuilder plugin that generates badges for your project. The plugin will generate badges using [shields.io](https://shields.io/). However it can also create badges using [anybadge](https://pypi.org/project/anybadge/) if configured to do so.\n\nTo add this plugin into your pybuilder project, add the following line near the top of your build.py:\n```python\nuse_plugin('pypi:pybuilder_anybadge')\n```\n\n**NOTE** if you are using Pybuilder version `v0.11.x`, then specify the following version of the plugin:\n```python\nuse_plugin('pypi:pybuilder_anybadge', '~=0.1.6')\n```\n\n### Pybuilder anybadge properties\n\nThe pybuilder task `pyb anybadge` will use anybadge to generate badges for your project by processing reports produced from various plugins; the badges that are currently supported are:\n- **complexity** - requires the [pybuilder_radon](https://pypi.org/project/pybuilder-radon/) plugin. Generate badge using cyclomatic complexity score of your most complicated function.\n- **vulnerabilities** - requires the [pybuilder_bandit](https://pypi.org/project/pybuilder-bandit/) plugin. Generate badge using number of security vulnerabilities discovered by vulnerabilities.\n- **coverage** - requires the `coverage` plugin. Generate badge for overall unit test coverage.\n- **python** - Generate badge for version of Python being used\n\nThe plugin will write the respective badges to the `docs/images` folder. The following plugin properties are available to further configure badge generation.\n\nName | Type | Default Value | Description\n-- | -- | -- | --\nanybadge_exclude | str | '' | Comma delimited string of badges to exclude from processing, valid values are 'complexity', 'vulnerabilities', 'coverage' and 'python'\nanybadge_complexity_use_average | bool | False | Use overall average complexity as score when generating complexity badge\nanybadge_use_shields | bool | True | Will use `img.shields.io` to create the badges, if False will use `anybadge`\n\n**Note** the plugin will add the badge references but you must commit/push the changes (including svg files in the docs/images folder)\n\nThe plugin properties are set using `project.set_property`, the following is an example of how to set the properties:\n\n```Python\nproject.set_property('anybadge_exclude', 'vulnerabilities,coverage')\nproject.set_property('anybadge_complexity_use_average', True)\nproject.set_property('anybadge_use_shields', True)\n```\n\nBy default the plugin will use `shields.io` to create the badges:\n\n[![coverage](https://img.shields.io/badge/coverage-100%25-brightgreen)](https://pybuilder.io/)\n[![complexity](https://img.shields.io/badge/complexity-B-olive)](https://radon.readthedocs.io/en/latest/api.html#module-radon.complexity)\n[![vulnerabilities](https://img.shields.io/badge/vulnerabilities-None-brightgreen)](https://pypi.org/project/bandit/)\n[![python](https://img.shields.io/badge/python-3.7%20%7C%203.8%20%7C%203.9%20%7C%203.10-teal)](https://www.python.org/downloads/)\n\nHowever, setting `anybadge_use_shields` to `False` will render the badges using `anybadge` and save them as svg files in the `docs\\images` folder:\n\n![coverage](https://raw.githubusercontent.com/soda480/pybuilder-anybadge/main/docs/images/coverage.svg)\n![complexity](https://raw.githubusercontent.com/soda480/pybuilder-anybadge/main/docs/images/complexity.svg)\n![vulnerabilities](https://raw.githubusercontent.com/soda480/pybuilder-anybadge/main/docs/images/vulnerabilities.svg)\n![python](https://raw.githubusercontent.com/soda480/pybuilder-anybadge/main/docs/images/python.svg)\n\n### Development\n\nClone the repository and ensure the latest version of Docker is installed on your development server.\n\nBuild the Docker image:\n```sh\ndocker image build \\\n-t \\\npybanybadge:latest .\n```\n\nRun the Docker container:\n```sh\ndocker container run \\\n--rm \\\n-it \\\n-v $PWD:/code \\\npybanybadge:latest \\\nbash\n```\n\nExecute the build:\n```sh\npyb -X\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoda480%2Fpybuilder-anybadge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoda480%2Fpybuilder-anybadge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoda480%2Fpybuilder-anybadge/lists"}