MCPcopy Index your code
hub / github.com/WhyNotHugo/python-barcode / save

Method save

barcode/base.py:65–78  ·  view source on GitHub ↗

Renders the barcode and saves it in `filename`. :param filename: Filename to save the barcode in (without filename extension). :param options: The same as in `self.render`. :param text: Text to render under the barcode. :returns: The full filename with extension.

(
        self, filename: str, options: dict | None = None, text: str | None = None
    )

Source from the content-addressed store, hash-verified

63 raise NotImplementedError
64
65 def save(
66 self, filename: str, options: dict | None = None, text: str | None = None
67 ) -> str:
68 """Renders the barcode and saves it in `filename`.
69
70 :param filename: Filename to save the barcode in (without filename extension).
71 :param options: The same as in `self.render`.
72 :param text: Text to render under the barcode.
73
74 :returns: The full filename with extension.
75 """
76 output = self.render(options, text) if text else self.render(options)
77
78 return self.writer.save(filename, output)
79
80 def write(
81 self,

Callers 2

test_generating_barcodesFunction · 0.45
generateFunction · 0.45

Calls 1

renderMethod · 0.95

Tested by 1

test_generating_barcodesFunction · 0.36