Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
printer-express
Advanced tools
Share standard printers via JSON API
Clone repository:
git clone git@github.com:yevgenko/printer-express.git
Install dependencies:
cd printer-express
npm i
Run the server (default port is 3000, but can be adjusted via environment variable PORT):
node standalone.js
Install printer-express package with npm:
npm i printer-express --save
Use middleware with Express application:
var express = require('express'),
printerExpress = require('printer-express'),
app = express(),
port = process.env.PORT || 3000;
// mount point for JSON API, i.e. /cloudprint/printers and /cloudprint/jobs
app.use('/cloudprint', printerExpress);
app.listen(port);
Get the list of printers installed on the hosting system:
curl -v http://localhost:3000/printers
or with jQuery:
$.getJSON("http://localhost:3000/printers");
Submit new printing job:
curl -v -X POST http://localhost:3000/jobs -H "Content-Type: application/json" -d '{"data":"Hello, World!", "type":"RAW", "printer":"stkPrinter"}'
or with jQuery:
$.ajax({
type: 'POST',
url: "http://localhost:3000/jobs",
data: JSON.stringify({data: 'Hello, World!', type: 'RAW', printer: 'stkPrinter'}),
dataType: 'json',
contentType: "application/json; charset=utf-8"
});
FAQs
Share standard printers via JSON API
The npm package printer-express receives a total of 0 weekly downloads. As such, printer-express popularity was classified as not popular.
We found that printer-express demonstrated a not healthy version release cadence and project activity because the last version was released 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
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.