Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Note: This package only works on Windows at the moment. With some minor rework, it could work on Linux too, that's just not a priority for my purposes at the moment.
(More help coming soon)
There are two ways to test your label layouts. You can write a simple Python script to generate a label, or you can add some code to your HTML file to import the script and create a preview when opened in your browser.
(More help coming soon)
Printing your label with labelprint is easy! Simply call label.printPDF
.
(More help coming soon)
make(htmlFile: str[, outFile: str|BinaryIO], data: dict) -> None|bytes
outFile
is a BinaryIO object, the PDF is written into it.outFile
is None, raw PDF bytes are returned.getPrinters() -> list[PrinterInfo]
printPDF(fileName: str, ptrName: str[, printOpts: dict]) -> None
pPrinterName: str
Device name (give this to printPDF)Offline: bool
Whether the printer is offlineName | Type | Description | Default |
---|---|---|---|
width | int | Width of page in inches | HTML page size |
length | int | Length of page in inches | HTML page size |
size | int | Standard paper size code | Set by printer |
orientation | str | 'portrait' or 'landscape' | Set by printer |
dpi | int | Print quality in DPI | Set by printer |
dpiX | int | DPI for X axis only | Set by printer |
dpiY | int | DPI for Y axis only | Set by printer |
color | bool | Enable color printing | True |
scale | int | Scale factor in percent | 100 |
copies | int | Number of copies | 1 |
Options: dict
startDriver() -> ChromiumDriver
Start webdriver or return current instance.stopDriver(force=False)
Shutdown webdriver in background after Options.timeout
, or immediately if force
is True.getDriver() -> ChromiumDriver|None
Get global webdriver instance.get(uri: str, timeout: float)
Get uri
or raise TimeoutError if it can't be retrieved after timeout
secs.Name | Type | Description | Default |
---|---|---|---|
timeout | float | Secs to run in background | 120 |
engine | str | Name of browser to use | Edge |
headless | bool | Run browser as headless | True |
silent | bool | Don't print any debug | False |
FAQs
Automated barcode label generation and printing in Python
We found that labelprint demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.