Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

badge image class

Project description


$ [sudo] pip install badges


  • md, rst support
  • autoformat strings with instance and class variables
  • minimalistic design, easy subclassing
  • CircleCI, Travis, ... badge classes


# format attributes - {attrname}
>>> class CustomBadge(badges.Badge):
    branch = "master"
    link = "{fullname}"
    image = "{fullname}?branch={branch}.svg"

>>> CustomBadge(fullname="owner/repo")

# format @property - {0.propname}
>>> class CustomBadge(badges.Badge):
    branch = "master"
    link = "{0.fullname}"
    image = "{0.fullname}?branch={branch}.svg"

    def fullname(self):
        return "/".join(os.getcwd().split("/")[-2:])

>>> CustomBadge()


Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for badges, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size badges-0.0.1.tar.gz (3.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page