NWeb Client
Client to access the NWeb-API
Installation
pip install --upgrade nwebclient
# oder
pip install .
python -m nwebclient help
More Documentation
Docker
docker run --rm -it -p 7171:7070 -e PIP_PKGS=/parent/home/pi/dev/nxbot -v /:/parent/ nxware/nxdev npy serv --install
Beispiel
import nwebclient
class NWebClient
""" Anstatt url kann auch ein Pfad zur einer JSON-Datei, die die Schluessel enthaelt, angegeben werden. """
__init__(url, username,password)
doc(id)
docs(q)
group(id)
getOrCreateGroup(guid, title)
downloadImages()
metric_val(endpointUrl:string, metricName:string, val:numeric)
Secure Web Interface
Das Webinterface des Runners (--rest) kann per HTTP Basic Auth mit einem Passwort geschützt werden.
Die Einstellungen werden in der Config gesetzt, z.B. in /etc/nweb.yml oder einer Datei in /etc/nx.d/:
web_secured: true
web_user: admin # optional, Default: admin
web_password_hash: "scrypt:32768:8:1$..."
Passwort-Hash erzeugen:
python -c "from werkzeug.security import generate_password_hash as g; print(g('geheim'))"
Hinweise:
- Ohne
web_secured(oder mitfalse) bleibt das Webinterface offen. - Ist
web_securedgesetzt, aber keinweb_password_hashvorhanden, wird jeder Zugriff abgelehnt. - Ohne Passwort erreichbar bleibt nur
/nxname(JobRunner.public_routes). - Auch der Job-Endpoint
/ist geschützt. Clients, die Jobs per REST senden (z.B.ProxyRunner), müssen die Zugangsdaten mitschicken. - Der Ticker-Webserver (
nwebclient.ticker) ist nicht geschützt. - Der Server läuft über HTTP, das Passwort wird also unverschlüsselt übertragen. Außerhalb des LANs einen Reverse-Proxy mit HTTPS (z.B. nginx, Caddy) vorschalten.
Links: Gitlab-Repo PyPi-Package
Git-URL: git@gitlab.com:bsalgert/nwebclient.git
Packaging: https://packaging.python.org/tutorials/packaging-projects/
Metadata
Release files for nwebclient 1.0.325
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nwebclient-1.0.325.tar.gz | 157.6 kB | Without provenance | Details for nwebclient-1.0.325.tar.gz |
Release files / nwebclient-1.0.325.tar.gz
| Download URL | nwebclient-1.0.325.tar.gz |
|---|---|
| Size | 157.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b988346ed818d48cb63e6b1073361d74f5bd64f875145307083d0864190d09a6
|
|
BLAKE2b-256 checksum How to use checksums |
1421fb983da21f7a8da450a65da3de881b513861daae5f1f7fdc30831617cad1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.2
|
Security for nwebclient 1.0.325
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.