(k: int, *, img_width: int = 100, img_height: int = 50, font_sizes:List[int] = None)
| 41 | |
| 42 | |
| 43 | def create_base64_code(k: int, *, img_width: int = 100, img_height: int = 50, font_sizes:List[int] = None): |
| 44 | captcha_img, codes = create_code(k, img_width=img_width, img_height=img_height, font_sizes=font_sizes) |
| 45 | return "data:image/png;base64," + base64.b64encode(captcha_img).decode('utf-8'), codes |
| 46 | |
| 47 | |
| 48 | if __name__ == '__main__': |
no test coverage detected