徽章图像类

badges的Python项目详细描述


安装

$ [sudo] pip install badges

功能

  • mdrst支持
  • 使用实例和类变量自动格式化字符串
  • 极简设计,易于子类化
  • Circleci,Travis,…徽章类

示例

# format attributes - {attrname}>>>classCustomBadge(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?branch=master.svg)](https://site.com/owner/repo)'# format @property - {0.propname}>>>classCustomBadge(badges.Badge):branch="master"link="https://site.com/{0.fullname}"image="https://site.com/{0.fullname}?branch={branch}.svg"@propertydeffullname(self):return"/".join(os.getcwd().split("/")[-2:])>>>CustomBadge()'[![](https://site.com/owner/repo?branch=master.svg)](https://site.com/owner/repo)'

来源

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
尝试运行JFLAP。戴软呢帽的罐子23。Java正在抛出异常   无引用的java数组布尔复制   hibernate如何在java SE应用程序中使用JPA EntityManager   java如何使用ORMLite在SQLite中持久化JavaFX属性?   java无法将项目部署到GAE   java:谷歌地图维基百科层   java Resultset(getter/setter类)对象在第二次执行时未删除旧值   s中的java struts2:选择列表>请求的列表键“”作为集合/数组/映射/枚举/迭代器类型   java如何在Karaf 4.0.5中获得BaseDao中的entityManager?   java VSCode未从控制台读取西里尔文   java字体。createFromAsset()返回字体的空指针异常   java错误:将Android Studio从0.6.1更新到0.8.9后,没有合适的构造函数