
Product
Microsoft Teams Notifications Are Now Available in Socket
Socket can now send alerts and supply chain attack notifications to Microsoft Teams, with filters that route the right updates to each channel.
pyservercheck
Advanced tools
A small Python helper that checks server status. Use it when a project needs a JavaScript step (for example a connectivity or status check)
PATH (node must be available)No extra Python dependencies are required.
From a local checkout:
pip install .
Editable install:
pip install -e .
The package data includes pyservercheck/js/*.js. After install you can import the
library from any working directory.
from pyservercheck import run_js
run_js()
If the script file itself is missing from the install tree, it raises
FileNotFoundError naming the expected path.
It performs an HTTP GET and prints one JSON object to stdout, for example:
{"url": "https://example.com", "statusCode": 200, "ok": true}
On failure it prints:
{"url": "https://example.com", "ok": false, "error": "..."}
The request uses an 8 second timeout. The default URL is https://example.com.
| Variable | Default | Meaning |
|---|---|---|
STATUS_URL | https://example.com | URL passed to the bundled status script |
Example:
set STATUS_URL=https://example.com
python -c "from pyservercheck import run_js; run_js()"
On Unix-like shells:
STATUS_URL=https://example.com python -c "from pyservercheck import run_js; run_js()"
| Name | Description |
|---|---|
run_js | Run the bundled main.js with Node.js |
from pyservercheck import run_js
That is the only public entry point (__all__ = ["run_js"]).
pyservercheck uses a standard setuptools cmdclass so a source or editable install
can confirm that Node.js can execute the bundled script.
pip install . / pip install -e . — after files are copied, the build
runs run_js() once. If Node is not available, the install still succeeds
and a note is printed to stderr..pth file is included so the same check can run once
the first time that Python starts with this environment. A marker file
(.main_js_ran) is written beside the package so the check does not repeat.You can always call run_js() yourself later; install-time execution is only
a convenience so a fresh environment is verified early.
pyservercheck/
__init__.py Public export of run_js
runtime.py Locates main.js and starts Node
js/main.js Bundled status-check script
_setup_cmd.py setuptools build / develop helpers
_hooks.py One-time post-install check
FileNotFoundError about Node.js
Install Node.js and confirm node --version works in the same terminal you
use for Python.
FileNotFoundError about main.js
Reinstall the package so package data is included (include-package-data is
enabled in pyproject.toml).
The status script reports "ok": false
Check network access and, if you set STATUS_URL, that the host accepts a
simple GET.
pip install -e .
python -c "from pyservercheck import run_js; run_js()"
Python 3.9+ is declared in pyproject.toml. The build backend is setuptools
77 or newer.
MIT. See LICENSE.
FAQs
Check a server URL from Python using a bundled Node.js script
The pypi package pyservercheck receives a total of 237 weekly downloads. As such, pyservercheck popularity was classified as not popular.
We found that pyservercheck 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.

Product
Socket can now send alerts and supply chain attack notifications to Microsoft Teams, with filters that route the right updates to each channel.

Security News
pnpm 12 rewrites the package manager in Rust, cutting install times by up to 90% while preserving pnpm 11 workflows and lockfiles.

Security News
Socket CTO Ahmad Nassri joins AppSec leaders at Black Hat to discuss active malware, package manager risks, and software supply chain defense.