Datacenter Twin
Reproduce a datacenter power outage, inspect the energy ledger, and export a report.
Try the browser course · Source and issues · Model assumptions
The datacenter-twin Python package is the deterministic calculation core of
Datacenter Twin Lab. It models utility loss, generator startup or failure, finite
battery reserves, surviving power paths, shared failures, and recovery. Python
3.12 or later is required. The core has no third-party runtime dependencies.
Install and run
Install the Python core from PyPI in a Python 3.12+ environment.
pip install datacenter-twin
For the GitHub wheel with the local dashboard, see the Python quickstart for the release URL, checksum, and fresh-environment commands.
Historical v2.0.0 reproduction
The recipe below preserves the original 12 October artifact. It predates the odd-record spectrum correction and subsequent packaging/setup fixes. Version 2.0.1 was published on 2026-10-26; consult the quickstart above for its checksum-pinned installation and maintenance scope. Historical assets remain unchanged.
Use the published v2.0.0 GitHub wheel with its pinned SHA-256 below. Start in a fresh Python 3.12+ environment; the quickstart provides isolated PowerShell and POSIX instructions.
python -m pip install "datacenter-twin @ https://github.com/mohammadrezwankhan/datacenter-twin-lab/releases/download/v2.0.0/datacenter_twin-2.0.0-py3-none-any.whl#sha256=274e5a837ebcb2872c0d9bc0a40eb5db7092e9793bb97b075e17e73fa20e9393"
python -m datacenter_twin simulate --preset generator_failure
datacenter-twin simulate --preset generator_failure --format html --output failure.html
datacenter-twin sweep --preset generator_failure --parameter battery_initial_kwh --values 0 50 100 --format markdown
The bundled generator_failure preset loses utility at 300 seconds. A full
100 kWh battery delivers 85.5 kWh to the 1 MW IT load after discharge and
distribution losses. It sustains the load for 307.8 seconds after the outage,
then depletes at 607.8 seconds elapsed. The report includes the scenario,
input hash, event timeline, and a zero-residual energy ledger.
The preset permits charging before the outage. Its 50 kWh sweep point therefore differs from the browser lesson's charging-disabled 50 kWh challenge. See the canonical worked case for the exact recipe and the distinction between elapsed time and ride-through.
The CLI also supports bounded sensitivity sweeps and Markdown, HTML, and JSON
reports. Use datacenter-twin --help to discover commands. Choose a fresh
output path; replacement requires the explicit --force flag.
Browser and optional studies
The free static website provides twelve Infrastructure Engineering lessons in addition to twelve power continuity lessons, a DC-link RLC lesson, and a power-dynamics research studio. The published GitHub wheel also includes the local dashboard. The prepared PyPI wheel contains the Python core and resources without the website. No shared simulation service is included in either distribution.
Optional converter and network studies use NumPy and SciPy. Use the quickstart's
current wheel with its studies extra. The following pinned example is the
historical v2.0.0 reproduction, with the spectrum limitation described above:
python -m pip install "datacenter-twin[studies] @ https://github.com/mohammadrezwankhan/datacenter-twin-lab/releases/download/v2.0.0/datacenter_twin-2.0.0-py3-none-any.whl#sha256=274e5a837ebcb2872c0d9bc0a40eb5db7092e9793bb97b075e17e73fa20e9393"
python -m datacenter_twin.research --help
Study equations and reproduction commands describe the separate models and their assumptions. The continuity engine itself does not simulate electromagnetic transients.
Scope and provenance
These are synthetic educational models with explicit inputs and software reproduction checks. They do not establish facility calibration, protection coordination, certified uptime, equipment safety, GPU job performance, or grid adequacy. Independent external reproduction remains pending.
Written by Mohammad Rezwan Khan with AI-assisted development. Source code is
licensed under Apache-2.0; separately identified reference material is not
included in the package. Historical GitHub release wheels use the distribution
name datacenter-twin-lab; use a fresh environment when switching to
datacenter-twin, because both provide the same Python module and CLI.
Metadata
Release files for datacenter-twin 2.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| datacenter_twin-2.0.2-py3-none-any.whl | Python 3 | none | any | Details for datacenter_twin-2.0.2-py3-none-any.whl |
Release files / datacenter_twin-2.0.2-py3-none-any.whl
| Download URL | datacenter_twin-2.0.2-py3-none-any.whl |
|---|---|
| Size | 93.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
47dc76edee8e54d26bb226835e28d4aa862c8000ec4cadf07bf331ba8ebbfeac
|
|
BLAKE2b-256 checksum How to use checksums |
fa0d5d89a91f607166ef66e3069ee599037c3bab730d656280784cdfba71b7a0
|
| 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 22, 2026.
Transparency logSecurity for datacenter-twin 2.0.2
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
1 file in this release has been uploaded with provenance metadata.
Attestation for datacenter_twin-2.0.2-py3-none-any.whl
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 22, 2026.
Transparency logA 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.