Skip to main content

Midden

Midden is a tool for dumping and analysing heaps from Python programs.

It takes a "dump first, ask questions later" approach, making it easy to grab a heap dump from a running application, then analyse it offline later in its UI, potentially on a different machine entirely.

Installing

If you just want to grab a heap dump, you can install everything you need with:

pip install midden
# Or if you're using uv
uv add midden

If you want to analyse the data, you'll need the extra UI dependencies, which you can install with

pip install midden[ui]
# Or if you're using uv
uv add midden[ui]

Grabbing a Heap Dump

Grabbing a heap dump can be as simple as:

# Assuming pid we want to grab heap from is pid 12345
midden-inject 12345 --output-file /tmp/dump.jsonl

On Python 3.14 and newer, this will use sys.remote_exec, which means no extra dependencies. You will need appropriate permissions as documented here. Roughly speaking, you either need to be root/administrator, or be running on Linux with ptrace protection disabled.

On Python 3.10 to 3.13, injection is done with gdb, which means gdb needs to be installed. Gdb-based injection is only tested on Linux.

Analysing a Heap Dump

You can run the analysis UI with

midden-ui

This will start a web application, and pop up a web browser pointing at the analysis application. Upload a heap dump generated with midden-inject to get started.

Metadata

Release files for midden 0.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 midden 0.2.0
File Size Uploaded
midden-0.2.0.tar.gz 16.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for midden 0.2.0
File Interpreter ABI Platform
midden-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 37.6 kB

Release files / midden-0.2.0.tar.gz

Download URL midden-0.2.0.tar.gz
Size 16.0 kB
Tags Source
SHA-256 checksum
How to use checksums
00ebefd7eb1c7ad966b1a66943ad1cc901cbf105bafc1922ce274e3ec6844324
BLAKE2b-256 checksum
How to use checksums
d3e2d828dfc4bb4178a01735cc3f5a0047fd870045a1c90c01d854a350d3f460
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.30 {"installer":{"name":"uv","version":"0.11.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / midden-0.2.0-py3-none-any.whl

Download URL midden-0.2.0-py3-none-any.whl
Size 21.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4699e0357fb64573e927bc1552cf49eac4121e6d3eda2b8ab2ddcb5932ffe790
BLAKE2b-256 checksum
How to use checksums
c110c7f378f1fe8e2f2b9e9ffdc852ec6b69cceec06825ef8b9f954979331450
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.30 {"installer":{"name":"uv","version":"0.11.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

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