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 | |
|---|---|---|---|
| badges-0.0.1.tar.gz | 3.3 kB | Details |
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 |