Skip to main content

Nullpunkt behavioral anomaly detection API client

Project description

Nullpunkt

Python client for the Nullpunkt behavioral anomaly detection API by Nohvel.

Install

pip install nullpunkt

Quickstart

from nullpunkt import NullpunktClient

client = NullpunktClient(api_key='npk_...')

# Fit baseline from normal-behavior data
client.fit_baseline('normal_scene.mp4', wait=True)

# Run detection
result = client.detect('scene_to_analyze.mp4', wait=True)

print(f"Anomaly rate: {result.anomaly_rate:.1%}")
print(f"Anomalous frames: {result.anomaly_frames} / {result.total_frames}")

for event in result.events:
    print(f"  Frame {event.frame}: score={event.score:.3f}, agents={event.agents}")

Authentication

Pass your API key directly or set the NULLPUNKT_API_KEY environment variable:

export NULLPUNKT_API_KEY=npk_...
client = NullpunktClient()  # reads from environment

Get an API key at api.nohvel.com/portal.

Supported Input Formats

  • Video files: .mp4, .avi, .mkv
  • Pre-tracked CSV: frame, track_id, cx, cy, w, h
  • Pre-tracked JSON: {"frames": [{"frame_id": 0, "detections": [...]}]}

Async Jobs

By default, fit_baseline() and detect() block until the job completes. For non-blocking usage, pass wait=False and poll manually:

job_id = client.detect('scene.mp4', wait=False)

while True:
    status = client.get_job_status(job_id)
    if status['status'] == 'complete':
        break
    time.sleep(10)

result = client.get_results(job_id)

Documentation

Full API reference: nohvel.com/docs

Support

api@nohvel.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nullpunkt-1.0.0.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nullpunkt-1.0.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file nullpunkt-1.0.0.tar.gz.

File metadata

  • Download URL: nullpunkt-1.0.0.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for nullpunkt-1.0.0.tar.gz
Algorithm Hash digest
SHA256 14dd580578bf62c9bc59344ea778f170b29508f1da657c8c730b84db0f65794c
MD5 4f9ae13287a4292e2db6349e019ace04
BLAKE2b-256 60f6cf5c035aadaca79a7125f0541e7b5b65fdf2b74dd049943752131133503d

See more details on using hashes here.

File details

Details for the file nullpunkt-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: nullpunkt-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for nullpunkt-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4e4e68019f9aafd85820ff61c5f11530b212e87bb65261869c572f5171185435
MD5 5738a424556717faa71e79752f1dcced
BLAKE2b-256 cece520c972e9b107fb9a00797e66881ed0097dd2b7d35d45d4662e2ed377d89

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page