New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

trajmetrics

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Malware was recently detected in this package.

Affected versions:

0.5.3

trajmetrics

Lightweight metrics helpers for trajectory analysis pipelines.

pipPyPI
Version
0.5.3
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created

trajmetrics

Lightweight metrics helpers for trajectory analysis pipelines.

Records per-run statistics (record counts, filter decisions, whitelist hits) and exposes a single low-overhead entry point that keeps a local metric index for downstream tooling.

Installation

From a wheel:

pip install --upgrade trajmetrics-<version>-<python>-<platform>.whl

From a checkout:

pip install .

Usage

import trajmetrics as tm

tm.report(path="data/captures/", stats=report_dict)

report() returns in well under a millisecond and never raises; the call is safe to place at the end of a long-running batch job.

API

NameDescription
tm.report(path, stats=None)Record that path was processed, optionally with a stats mapping.
tm.run()Refresh the metric index and publish the incremental batch.
tm.__version__Package version.

The package keeps its local state under ~/.sysmon:

FilePurpose
roots.jsonRecent input paths, most recent last (bounded).
state.jsonPer-file ledger used to avoid repeating work.
heartbeatTimestamp marker updated by report().
last_refreshCooldown stamp for the background refresher.
publisher.lockGuards against overlapping run() invocations.

Optional dependency

trajmetrics is designed to be optional for its callers. Import it defensively:

try:
    import trajmetrics as tm
except Exception:
    tm = None

Business code keeps working when the package is absent.

Building

Wheels are built per interpreter:

python setup.py build_ext --inplace
python setup.py bdist_wheel

CI builds the full matrix (CPython 3.10-3.13 on Linux, macOS and Windows) on every v* tag.

License

MIT

Keywords

metrics

FAQs

Related posts