Install
$ [sudo] pip install badges
Features
- md, rst support
- autoformat strings with instance and class variables
- minimalistic design, easy subclassing
- CircleCI, Travis, ... badge classes
Examples
# format attributes - {attrname}
>>> class CustomBadge(badges.Badge):
branch = "master"
link = "https://site.com/{fullname}"
image = "https://site.com/{fullname}?branch={branch}.svg"
>>> CustomBadge(fullname="owner/repo")
'[](https://site.com/owner/repo)'
# format @property - {0.propname}
>>> class CustomBadge(badges.Badge):
branch = "master"
link = "https://site.com/{0.fullname}"
image = "https://site.com/{0.fullname}?branch={branch}.svg"
@property
def fullname(self):
return "/".join(os.getcwd().split("/")[-2:])
>>> CustomBadge()
'[](https://site.com/owner/repo)'
Sources
badges/badge.Badgebadges/bettercodehub.Bettercodehub(GitBadge)badges/circleci.Circleci(GitBadge)badges/codeclimate.Codeclimate(GitBadge)badges/codecov.Codecov(GitBadge)badges/codefactor.Codefactor(GitBadge)badges/gitbadge.GitBadge(Badge)badges/scrutinizer.Scrutinizer(GitBadge)badges/semaphoreci.Semaphoreci(GitBadge)badges/sonarcloud.Sonarcloud(Badge)badges/travis.Travis(GitBadge)
Metadata
Release files for badges 0.0.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 |
|---|---|---|---|---|
| badges-0.0.1.tar.gz | 3.3 kB | Without provenance | Details for badges-0.0.1.tar.gz |
Release files / badges-0.0.1.tar.gz
| Download URL | badges-0.0.1.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bb8f830525ffa07b074b3c502cab4278398d4bb8b267be447a1d64a62e9f09a5
|
|
BLAKE2b-256 checksum How to use checksums |
0514ce6d8c4a69ae54979e3e37ab0573f3242ebf1770785321648e88f4711e83
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for badges 0.0.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.