Skip to main content

netsware-sdk

Official Python SDK for the Netsware API: Business Hours, Scheduled Jobs, and Webhooks. Pure standard library, no dependencies.

Install

pip install netsware-sdk

Quickstart

from netsware import Netsware, verify_webhook

client = Netsware("nw_live_xxx")

# Is a business open right now?
status = client.hours.check(timezone="Asia/Kolkata", country="IN")
print(status["open"])

# Create a business-hours schedule
sched = client.hours.create_schedule(
    name="Mumbai office",
    days=["MON", "TUE", "WED", "THU", "FRI"],
    open_time="09:00",
    close_time="18:00",
    timezone="Asia/Kolkata",
    country="IN",
)

# Combine schedules, switch one off, list countries and regions
client.hours.schedule_stats()                                   # {"schedules": {total, active, ...}}
client.hours.resolve_schedules([sched["id"], other_id], match="all")  # open only if all are open
client.hours.set_schedule_active(sched["id"], False)            # off, hours unchanged
client.hours.countries()
client.hours.regions("US")

# Schedule a one-time job
job = client.jobs.schedule(
    name="Send reminder",
    url="https://example.com/webhook",
    run_at="2026-07-01T09:00:00",
    timezone="Asia/Kolkata",
    payload={"user_id": "123"},
)

# Register a webhook (one event per registration)
hook = client.webhooks.register(
    product="scheduled_jobs",
    event="job.completed",
    url="https://example.com/events",
)

Verifying webhook signatures

Pass the raw request body string for a byte-exact check:

ok = verify_webhook(
    payload=raw_body,                       # raw request body (string)
    signature=headers["X-Netsware-Signature"],
    timestamp=headers["X-Netsware-Timestamp"],
    secret="whsec_...",
)
if not ok:
    ...  # reject

Groups, variables, runs & metrics

# Organize jobs into groups
g = client.groups.create("Nightly")
client.groups.rename(g["id"], "Nightly batch")

# Reusable values + secrets (secret values are WRITE-ONLY: list() returns value=None)
client.variables.set("API_BASE_URL", "https://api.acme.io")
client.variables.set("API_TOKEN", "t0ken", is_secret=True)

# What's broken everywhere? (status is required; success has no account-wide feed)
failing = client.runs.list(status="failed", since="24h")

# Per-job history filtered by outcome (retention-clamped)
errs = client.jobs.logs(job["id"], status="failed")
if errs["logs"] and errs["logs"][0].get("run_id"):
    run = client.jobs.run(job["id"], errs["logs"][0]["run_id"])  # one run, every attempt

# Daily monitoring rollups for your own NOC/monitor (default 30d, plan-clamped)
m = client.metrics.get(window="30d")
print(m["totals"]["runs"], m["current"]["active_jobs"])

Configuration

client = Netsware("nw_live_xxx", base_url="https://app.netsware.com", timeout=30.0)

Full API reference: https://netsware.com/docs.

MIT © Netsware Cloud Solutions LLP

Metadata

Release files for netsware-sdk 2.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for netsware-sdk 2.2.0
File Size Uploaded Provenance Actions
netsware_sdk-2.2.0.tar.gz 7.6 kB With provenance Details for netsware_sdk-2.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for netsware-sdk 2.2.0
File Interpreter ABI Platform Actions
netsware_sdk-2.2.0-py3-none-any.whl Python 3 none any Details for netsware_sdk-2.2.0-py3-none-any.whl

Total release size: 15.4 kB

Release files / netsware_sdk-2.2.0.tar.gz

Download URL netsware_sdk-2.2.0.tar.gz
Size 7.6 kB
Tags Source
SHA-256 checksum
How to use checksums
4c39bf71205345004457141bbcc804958bf94b4d8f22ac610746dbbdb41ba128
BLAKE2b-256 checksum
How to use checksums
5494bbde22908c7912d400576cc9458a6ed3c736f4b1935c534014b8e19c56b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

Release files / netsware_sdk-2.2.0-py3-none-any.whl

Download URL netsware_sdk-2.2.0-py3-none-any.whl
Size 7.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
20642aa39d076471c7b4b047b4d1bbbc648ce3f5338dd5191e59fa8bee3a2588
BLAKE2b-256 checksum
How to use checksums
79733db8f1c5a2abd5c96d08df8f09bb34a91f9c13b9b2d851ca2a2dce683f69
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

Security for netsware-sdk 2.2.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for netsware_sdk-2.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page