Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

tmgen

Latest version: v0.2.0

Overview

Last scanned
23 Nov 2026
Published
23 Nov 2026
PyPI package Publisher: progwriter
27 Stars
10 Forks
1 Versions
21 Downloads
Python Repo language

Scan summary

tmgen was last scanned on 23 Nov 2026 at version 0.2.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: First and only release on 23 Nov 2026.
  • Findings: No rules fired in version 0.2.0.
  • Downloads: 21 downloads.

Versions

1 version published
Versions and the rules that fired in each
VersionPublishedStatus
0.2.0 LATEST 23 Nov 2026 No rules fired

No rules fired in 0.2.0

Findings

Findings for v0.2.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.2.0; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

TMgen: traffic matrix generation

PyPI

TMgen generates synthetic network traffic matrices: how much traffic flows from each node of a network to each other node, optionally over time. Use it to test routing, traffic engineering and topology design code when you do not have (or cannot share) real measurements.

It implements the maximum entropy models of Spatiotemporal Traffic Matrix Synthesis by Paul Tune and Matthew Roughan (ACM SIGCOMM 2015) next to the simple models people usually start with, and gives you a small TrafficMatrix object to work with the results.

from tmgen.models import modulated_gravity_tm

# 10 nodes, one day of hourly matrices; the total follows a daily cycle around 1000
tm = modulated_gravity_tm(num_nodes=10, num_epochs=24, total_traffic=1000, rng=42)

tm.shape  # (10, 10, 24): ingress x egress x epoch
tm.at_time(12)  # the 10 x 10 matrix at noon
tm.between(0, 3, "max")  # the largest volume from node 0 to node 3
tm.zero_diagonal().save("day.npz")

Models

Model Function What it produces
Gravity gravity_tm Traffic proportional to the product of node sizes, no randomness
Random gravity random_gravity_tm Gravity with random node weights (the maximum entropy model for a given total)
Modulated gravity modulated_gravity_tm Random gravity scaled over time by a daily cycle, with optional noise
Spike spike_tm A few large, randomly placed flows
Uniform, exponential, lognormal uniform_tm, exp_tm, lognormal_tm Independent random entries
Exact exact_tm Every entry the same, for tests

Any spatial model can be combined with any temporal pattern using TrafficMatrix.modulate and diurnal_profile. The sampler behind the paper's models, an exact Hamiltonian Monte Carlo for truncated Gaussians, is available as tmgen.hmc.hmc_sample. The paper's non-stationary conditionally independent model and the general maximum entropy model with constraints are not exposed yet.

Installation

TMgen needs Python 3.11 or newer.

From PyPI
pip install tmgen

Prebuilt wheels are published for Linux, macOS and Windows, so no compiler is needed. For the plotting helpers, install the extra: pip install "tmgen[plotting]".

From source

Use this for the latest unreleased changes, or to try a modification. The HMC sampler is a small Cython extension, so you need a C compiler (Xcode command line tools on macOS, build-essential on Debian and Ubuntu, the Visual Studio Build Tools on Windows). NumPy, Cython and the other build requirements are fetched automatically.

git clone https://github.com/progwriter/TMgen
cd TMgen
pip install .                 # or ".[plotting]" for the plotting helpers

The version number comes from the git tags, so clone the repository (a plain source archive of a release also works) rather than downloading a snapshot of a branch. To work on TMgen itself, see DEVELOPMENT.md for an editable install with the development tools.

Documentation

The full documentation, with a guide to every model, file formats, sampling and plotting, is at https://tmgen.readthedocs.io/. Upgrading from 0.1? See the changelog and the upgrade notes in the docs.

Big thanks

To Paul Tune, Matthew Roughan, and Ari Pakman for their work in this space and for making their code available. This code is an adaptation of their Matlab versions MaxEnt and HMC.

Development

Contributions are welcome. See DEVELOPMENT.md for how to set up a development environment, run the checks and submit changes.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • pypi-releases tmgen

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Vulnerability Insights

Compromised Claude Code extensions (versions 2.1.312 & 2.1.313) in Cursor try to install a backdoor

CVE

Java4Shell (CVE-2026-114938): Easy to Crash, Hard to Exploit — Less Than 0.12% of JVMs Estimated at Risk of RCE

PHP2Shell, Day 5 93.6% of Measurable Instances Still Unpatched (1)
Vulnerability Insights

PHP2Shell, Day 5: The Panic Hasn’t Turned Into Patching

Frame 2085668439 (1)
Group 1261154229