Name | pkg-18604 JSON |
Version |
1.1.30
JSON |
| download |
home_page | None |
Summary | None |
upload_time | 2025-07-21 03:08:26 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.12.10 |
license | None |
keywords |
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# badge-201
[](https://github.com/tagdots-dev/badge-201/actions/workflows/ci.yaml)
[](https://raw.githubusercontent.com/tagdots-dev/badge-201/refs/heads/badges/badges/coverage.json)
[](https://github.com/marketplace/actions/setup-badge-action)
<br>
## 😎 Why you need setup-badge?
**setup-badge** empowers you to create `dynamic` and `static` endpoint badges to showcase on your README file. For example, in the badge below,

_`label` refers to the left side of a badge (demo)_
_`message` refers to the right side of a badge (no status)_
In a dynamic badge, the `message` changes over time. For instance, code coverage percentage and software version. In a static badge, the `message` does not change regularly over time. For instance, license and programming language.
<br>
## ⭐ How setup-badge works
Under the hood, **setup-badge** creates a [shields.io endpoint badge](https://shields.io/badges/endpoint-badge), which is composed of _a shields.io endpoint_ and _an URL to your JSON file (JSON Endpoint)_.
```

```
Let's see the overall workflow below.
1. **setup-badge** runs with [command line options](https://github.com/tagdots-dev/badge-201?tab=readme-ov-file#-setup-badge-command-line-options).
1. **setup-badge** adds/updates a json file from your options.
1. **setup-badge** pushes a commit to the remote branch.
1. **endpoint badge** is created with `shields.io endpoint` and `your json file`.
Now, you are ready to put `endpoint badge` into your README file.

<br>
## Use Case 1️⃣ - running on GitHub action
In this use case, **setup-badge-action** automates the use of **setup-badge** to create dynamic and static badges. Please visit our GitHub action ([setup-badge-action](https://github.com/marketplace/actions/setup-badge-action)) on the `GitHub Marketplace` for details.
<br>
## Use Case 2️⃣ - running locally on your computer
In this use case, you run **setup-badge** manually with the steps below:
1. install **setup-badge**.
1. run **setup-badge**.
<br>
### 🔆 install setup-badge
In the command-line examples below, we install and run **setup-badge** on a GitHub project named `badge-test`.
First, we install **setup-badge** in a virtual environment named after the project.
```
~/work/badge-test $ workon badge-test
(badge-test) ~/work/badge-test $ pip install -U setup-badge
```
<br>
### 🔍 run setup-badge
Next, we run **setup-badge** with different options and show the results.
<br>
🏃 _**Run to show command line options**_: `--help`
```
(badge-test) ~/work/badge-test $ setup-badge --help
Usage: setup-badge [OPTIONS]
Options:
--badge-name TEXT default: badge
--badge-branch TEXT default: badges
--badge-url TEXT default: JSON endpoint
--badge-style TEXT default: flat (flat, flat-square, plastic, for-the-badge, social)
--label TEXT default: demo (badge left side text)
--label-color TEXT default: 2e2e2e (badge left side hex color)
--message TEXT default: no status (badge right side text)
--message-color TEXT default: 2986CC (badge right side hex color)
--remote-name TEXT default: origin
--gitconfig-name TEXT default: Mona Lisa
--gitconfig-email TEXT default: mona.lisa@github.com
--version Show the version and exit.
--help Show this message and exit.
```
<br><br>
🏃 _**Run to create a demo badge (with default inputs)**_
**setup-badge** runs with default inputs and will:
1. create or use an existing `badges` branch.
1. create or use an existing `badges/badge.json` file.
1. push a commit with `badges/badge.json` file to `badges` branch.
1. produce an `endpoint badge` with clickable url to the JSON endpoint file .
```
(badge-test) ~/work/badge-test $ setup-badge
🚀 Starting to create a badge.json on branch ({badge_branch})...
✅ validated inputs from command line options
✅ checkout local branch (badges)
✅ created badges/badge.json
✅ found changes ready to stage, commit, and push to origin
✅ pushed commit (f9c751c) to remote branch (badges)
🎉 Endpoint Badge: 
```
_**Endpoint Badge**_<br>

<br><br>
🏃 _**Run to create a license badge**_: `--badge-name license --label License --message MIT --badge-url https://raw.githubusercontent.com/tagdots-dev/badge-201/refs/heads/main/LICENSE`
**setup-badge** runs with customized inputs and will:
1. create or use an existing `badges` branch.
1. create or use an existing `badges/license.json` file.
1. push a commit with `badges/license.json` file to `badges` branch.
1. produce an `endpoint badge` with clickable url to the LICENSE file.
```
(badge-test) ~/work/badge-test $ setup-badge --badge-name license --label License --message MIT --message-color FFA500 --badge-url https://raw.githubusercontent.com/tagdots-dev/badge-201/refs/heads/main/LICENSE
🚀 Starting to create a badge (license.json) on branch ({badge_branch})...
✅ validated inputs from command line options
✅ checkout local branch (badges)
✅ created badges/badge.json
✅ found changes ready to stage, commit, and push to origin
✅ pushed commit (dd8906c) to remote branch (badges)
🎉 Endpoint Badge: [](https://raw.githubusercontent.com/tagdots-dev/badge-201/refs/heads/main/LICENSE)
```
_**Endpoint Badge**_<br>
[](https://raw.githubusercontent.com/tagdots-dev/badge-201/refs/heads/main/LICENSE)
<br><br>
🏃 _**Run to create a marketplace badge**_: `--badge-name marketplace --label Marketplace --message setup-badge-action --badge-url https://github.com/marketplace/actions/setup-badge-action`
**setup-badge** runs with customized inputs and will:
1. create or use an existing `badges` branch.
1. create or use an existing `badges/marketplace.json` file.
1. push a commit with `badges/marketplace.json` file to `badges` branch.
1. produce an `endpoint badge` with clickable link to `GitHub Marketplace`.
```
(badge-test) ~/work/badge-test $ setup-badge --badge-name marketplace --label Marketplace --message setup-badge-action --badge-url https://github.com/marketplace/actions/setup-badge-action
🚀 Starting to create a badge (marketplace.json) on branch ({badge_branch})...
✅ validated inputs from command line options
✅ checkout local branch (badges)
✅ created badges/badge.json
✅ found changes ready to stage, commit, and push to origin
✅ pushed commit (8991c28) to remote branch (badges)
🎉 Endpoint Badge: [](https://github.com/marketplace/actions/setup-badge-action)
```
_**Endpoint Badge**_<br>
[](https://github.com/marketplace/actions/setup-badge-action)
<br><br>
### ✨ Summary of running the above commands
- **badges** branch can hold multiple JSON files.
- **badges** folder can hold json files from different branches.

<br><br>
## 🔔 How to use Endpoint Badge?
After creating an `endpoint badge`,
- copy and paste to your README file
- write a commit and merge your code
<br><br>
## 🔧 setup-badge command line options
| Input | Description | Default | Notes |
|-------|-------------|----------|----------|
| `badge-name` | JSON endpoint filename | `badge` | JSON endpoint filename |
| `branch-name` | Branch to hold JSON endpoint | `badges` | a single branch can hold multiple JSON endpoint files |
| `badge-style` | Badge style | `flat` | other options: `flat-square`, `plastic`, `for-the-badge`, `social` |
| `badge-url` | Badge URL | `''` | (default) JSON File Endpoint or User Defined URL |
| `label` | Left side text | `demo` | - |
| `label-color` | Left side background color | `2e2e2e` | hex color |
| `message` | Right side text | `no status` | pass dynamic/static data here |
| `message-color` | Right side background color | `2986CC` | hex color |
| `remote-name` | Git remote source branch | `origin` | leave it as-is in general |
| `gitconfig-name` | Git config user name | `Mona Lisa` | need this option for CI or GitHub action |
| `gitconfig-email` | Git config user email | `mona.lisa@github.com` | need this option for CI or GitHub action |
<br>
## 😕 Troubleshooting
Open an [issue][issues]
<br>
## 🙏 Contributing
Pull requests and stars are always welcome. For pull requests to be accepted on this project, you should follow [PEP8][pep8] when creating/updating Python codes.
See [Contributing][contributing]
<br>
## 📚 References
[Shields.io Endpoint Badge](https://shields.io/badges/endpoint-badge)
[Hex Color](https://www.color-hex.com/)
[How to fork a repo](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo)
<br>
[contributing]: https://github.com/tagdots-dev/badge-201/blob/main/CONTRIBUTING.md
[issues]: https://github.com/tagdots-dev/badge-201/issues
[pep8]: https://google.github.io/styleguide/pyguide.html
Raw data
{
"_id": null,
"home_page": null,
"name": "pkg-18604",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.12.10",
"maintainer_email": null,
"keywords": null,
"author": null,
"author_email": "developers <developers@tagdots.com>",
"download_url": "https://files.pythonhosted.org/packages/ba/06/8be622e123deb82e78355fb565befe2bd4683b7b6420a568f19755d609b7/pkg_18604-1.1.30.tar.gz",
"platform": null,
"description": "# badge-201\n\n[](https://github.com/tagdots-dev/badge-201/actions/workflows/ci.yaml)\n[](https://raw.githubusercontent.com/tagdots-dev/badge-201/refs/heads/badges/badges/coverage.json)\n[](https://github.com/marketplace/actions/setup-badge-action)\n\n<br>\n\n## \ud83d\ude0e Why you need setup-badge?\n**setup-badge** empowers you to create `dynamic` and `static` endpoint badges to showcase on your README file. For example, in the badge below,\n\n\n\n_`label` refers to the left side of a badge (demo)_\n\n_`message` refers to the right side of a badge (no status)_\n\nIn a dynamic badge, the `message` changes over time. For instance, code coverage percentage and software version. In a static badge, the `message` does not change regularly over time. For instance, license and programming language.\n\n<br>\n\n## \u2b50 How setup-badge works\n\nUnder the hood, **setup-badge** creates a [shields.io endpoint badge](https://shields.io/badges/endpoint-badge), which is composed of _a shields.io endpoint_ and _an URL to your JSON file (JSON Endpoint)_.\n\n```\n\n```\n\nLet's see the overall workflow below.\n\n1. **setup-badge** runs with [command line options](https://github.com/tagdots-dev/badge-201?tab=readme-ov-file#-setup-badge-command-line-options).\n1. **setup-badge** adds/updates a json file from your options.\n1. **setup-badge** pushes a commit to the remote branch.\n1. **endpoint badge** is created with `shields.io endpoint` and `your json file`.\n\nNow, you are ready to put `endpoint badge` into your README file.\n\n\n\n<br>\n\n## Use Case 1\ufe0f\u20e3 - running on GitHub action\nIn this use case, **setup-badge-action** automates the use of **setup-badge** to create dynamic and static badges. Please visit our GitHub action ([setup-badge-action](https://github.com/marketplace/actions/setup-badge-action)) on the `GitHub Marketplace` for details.\n\n<br>\n\n## Use Case 2\ufe0f\u20e3 - running locally on your computer\nIn this use case, you run **setup-badge** manually with the steps below:\n\n1. install **setup-badge**.\n1. run **setup-badge**.\n\n<br>\n\n### \ud83d\udd06 install setup-badge\n\nIn the command-line examples below, we install and run **setup-badge** on a GitHub project named `badge-test`.\n\nFirst, we install **setup-badge** in a virtual environment named after the project.\n\n```\n~/work/badge-test $ workon badge-test\n(badge-test) ~/work/badge-test $ pip install -U setup-badge\n```\n\n<br>\n\n### \ud83d\udd0d run setup-badge\n\nNext, we run **setup-badge** with different options and show the results.\n\n<br>\n\n\ud83c\udfc3 _**Run to show command line options**_: `--help`\n\n```\n(badge-test) ~/work/badge-test $ setup-badge --help\nUsage: setup-badge [OPTIONS]\n\nOptions:\n --badge-name TEXT default: badge\n --badge-branch TEXT default: badges\n --badge-url TEXT default: JSON endpoint\n --badge-style TEXT default: flat (flat, flat-square, plastic, for-the-badge, social)\n --label TEXT default: demo (badge left side text)\n --label-color TEXT default: 2e2e2e (badge left side hex color)\n --message TEXT default: no status (badge right side text)\n --message-color TEXT default: 2986CC (badge right side hex color)\n --remote-name TEXT default: origin\n --gitconfig-name TEXT default: Mona Lisa\n --gitconfig-email TEXT default: mona.lisa@github.com\n --version Show the version and exit.\n --help Show this message and exit.\n```\n\n<br><br>\n\n\ud83c\udfc3 _**Run to create a demo badge (with default inputs)**_\n\n**setup-badge** runs with default inputs and will:\n\n1. create or use an existing `badges` branch.\n1. create or use an existing `badges/badge.json` file.\n1. push a commit with `badges/badge.json` file to `badges` branch.\n1. produce an `endpoint badge` with clickable url to the JSON endpoint file .\n\n```\n(badge-test) ~/work/badge-test $ setup-badge\n\ud83d\ude80 Starting to create a badge.json on branch ({badge_branch})...\n\n\u2705 validated inputs from command line options\n\u2705 checkout local branch (badges)\n\u2705 created badges/badge.json\n\u2705 found changes ready to stage, commit, and push to origin\n\u2705 pushed commit (f9c751c) to remote branch (badges)\n\n\ud83c\udf89 Endpoint Badge: \n```\n\n_**Endpoint Badge**_<br>\n\n\n<br><br>\n\n\ud83c\udfc3 _**Run to create a license badge**_: `--badge-name license --label License --message MIT --badge-url https://raw.githubusercontent.com/tagdots-dev/badge-201/refs/heads/main/LICENSE`\n\n**setup-badge** runs with customized inputs and will:\n\n1. create or use an existing `badges` branch.\n1. create or use an existing `badges/license.json` file.\n1. push a commit with `badges/license.json` file to `badges` branch.\n1. produce an `endpoint badge` with clickable url to the LICENSE file.\n\n```\n(badge-test) ~/work/badge-test $ setup-badge --badge-name license --label License --message MIT --message-color FFA500 --badge-url https://raw.githubusercontent.com/tagdots-dev/badge-201/refs/heads/main/LICENSE\n\ud83d\ude80 Starting to create a badge (license.json) on branch ({badge_branch})...\n\n\u2705 validated inputs from command line options\n\u2705 checkout local branch (badges)\n\u2705 created badges/badge.json\n\u2705 found changes ready to stage, commit, and push to origin\n\u2705 pushed commit (dd8906c) to remote branch (badges)\n\n\ud83c\udf89 Endpoint Badge: [](https://raw.githubusercontent.com/tagdots-dev/badge-201/refs/heads/main/LICENSE)\n```\n\n_**Endpoint Badge**_<br>\n[](https://raw.githubusercontent.com/tagdots-dev/badge-201/refs/heads/main/LICENSE)\n\n<br><br>\n\n\ud83c\udfc3 _**Run to create a marketplace badge**_: `--badge-name marketplace --label Marketplace --message setup-badge-action --badge-url https://github.com/marketplace/actions/setup-badge-action`\n\n**setup-badge** runs with customized inputs and will:\n\n1. create or use an existing `badges` branch.\n1. create or use an existing `badges/marketplace.json` file.\n1. push a commit with `badges/marketplace.json` file to `badges` branch.\n1. produce an `endpoint badge` with clickable link to `GitHub Marketplace`.\n\n```\n(badge-test) ~/work/badge-test $ setup-badge --badge-name marketplace --label Marketplace --message setup-badge-action --badge-url https://github.com/marketplace/actions/setup-badge-action\n\ud83d\ude80 Starting to create a badge (marketplace.json) on branch ({badge_branch})...\n\n\u2705 validated inputs from command line options\n\u2705 checkout local branch (badges)\n\u2705 created badges/badge.json\n\u2705 found changes ready to stage, commit, and push to origin\n\u2705 pushed commit (8991c28) to remote branch (badges)\n\n\ud83c\udf89 Endpoint Badge: [](https://github.com/marketplace/actions/setup-badge-action)\n```\n\n_**Endpoint Badge**_<br>\n[](https://github.com/marketplace/actions/setup-badge-action)\n\n<br><br>\n\n### \u2728 Summary of running the above commands\n\n- **badges** branch can hold multiple JSON files.\n- **badges** folder can hold json files from different branches.\n\n\n\n<br><br>\n\n## \ud83d\udd14 How to use Endpoint Badge?\nAfter creating an `endpoint badge`,\n\n- copy and paste to your README file\n- write a commit and merge your code\n\n<br><br>\n\n## \ud83d\udd27 setup-badge command line options\n\n| Input | Description | Default | Notes |\n|-------|-------------|----------|----------|\n| `badge-name` | JSON endpoint filename | `badge` | JSON endpoint filename |\n| `branch-name` | Branch to hold JSON endpoint | `badges` | a single branch can hold multiple JSON endpoint files |\n| `badge-style` | Badge style | `flat` | other options: `flat-square`, `plastic`, `for-the-badge`, `social` |\n| `badge-url` | Badge URL | `''` | (default) JSON File Endpoint or User Defined URL |\n| `label` | Left side text | `demo` | - |\n| `label-color` | Left side background color | `2e2e2e` | hex color |\n| `message` | Right side text | `no status` | pass dynamic/static data here |\n| `message-color` | Right side background color | `2986CC` | hex color |\n| `remote-name` | Git remote source branch | `origin` | leave it as-is in general |\n| `gitconfig-name` | Git config user name | `Mona Lisa` | need this option for CI or GitHub action |\n| `gitconfig-email` | Git config user email | `mona.lisa@github.com` | need this option for CI or GitHub action |\n\n<br>\n\n## \ud83d\ude15 Troubleshooting\n\nOpen an [issue][issues]\n\n<br>\n\n## \ud83d\ude4f Contributing\n\nPull requests and stars are always welcome. For pull requests to be accepted on this project, you should follow [PEP8][pep8] when creating/updating Python codes.\n\nSee [Contributing][contributing]\n\n<br>\n\n## \ud83d\udcda References\n\n[Shields.io Endpoint Badge](https://shields.io/badges/endpoint-badge)\n\n[Hex Color](https://www.color-hex.com/)\n\n[How to fork a repo](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo)\n\n<br>\n\n[contributing]: https://github.com/tagdots-dev/badge-201/blob/main/CONTRIBUTING.md\n[issues]: https://github.com/tagdots-dev/badge-201/issues\n[pep8]: https://google.github.io/styleguide/pyguide.html\n",
"bugtrack_url": null,
"license": null,
"summary": null,
"version": "1.1.30",
"project_urls": {
"Changelog": "https://github.com/tagdots/setup-badges/blob/main/CHANGELOG.md",
"Documentation": "https://github.com/tagdots/setup-badges/blob/main/README.md",
"Homepage": "https://github.com/tagdots",
"Issues": "https://github.com/tagdots/setup-badges/issues",
"Repository": "https://github.com/tagdots/setup-badges"
},
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "2427da79aeb140c17105d65db7d5c54b53f076ab4239060ebe49eac2451a2b12",
"md5": "895cb5c099b8766e4594c1a92cc208c7",
"sha256": "245e329457ffc04fdcffee00e306f6d950c4d65e240ede0c1e3463cdfb4c927d"
},
"downloads": -1,
"filename": "pkg_18604-1.1.30-py3-none-any.whl",
"has_sig": false,
"md5_digest": "895cb5c099b8766e4594c1a92cc208c7",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.12.10",
"size": 8797,
"upload_time": "2025-07-21T03:08:25",
"upload_time_iso_8601": "2025-07-21T03:08:25.611981Z",
"url": "https://files.pythonhosted.org/packages/24/27/da79aeb140c17105d65db7d5c54b53f076ab4239060ebe49eac2451a2b12/pkg_18604-1.1.30-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "ba068be622e123deb82e78355fb565befe2bd4683b7b6420a568f19755d609b7",
"md5": "d5cf81c601d1fa3eb65457846aca4c6e",
"sha256": "a5471bb7be3023c98cd876ff91042c0b90308e035547ce3f1cb705938561810d"
},
"downloads": -1,
"filename": "pkg_18604-1.1.30.tar.gz",
"has_sig": false,
"md5_digest": "d5cf81c601d1fa3eb65457846aca4c6e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.12.10",
"size": 12703,
"upload_time": "2025-07-21T03:08:26",
"upload_time_iso_8601": "2025-07-21T03:08:26.725927Z",
"url": "https://files.pythonhosted.org/packages/ba/06/8be622e123deb82e78355fb565befe2bd4683b7b6420a568f19755d609b7/pkg_18604-1.1.30.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-21 03:08:26",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "tagdots",
"github_project": "setup-badges",
"github_not_found": true,
"lcname": "pkg-18604"
}