memory-profiler
A module for monitoring memory usage of a python program
Decision gist · record as of 2026-08-14
Yes, with caution. The package is stable and widely used (top 5000 PyPI), has low install friction, and carries no known vulnerabilities. However, it is dormant with no active maintenance. Install it if you need line-by-line memory profiling and can accept that bugs or compatibility issues will not be fixed by the maintainer. Consider it a mature, read-only tool rather than an actively developed project.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.5 or later; psutil must be installed as a runtime dependency.
- Low install friction with a single runtime dependency (psutil).
- However, the package is dormant—last release was 2022-11-15 and the maintainer has stated it is no longer actively maintained and issues will not be actively addressed.
License · maintenance · safety
BSD (permissive) — BSD license (permissive) allows use in most projects without significant restriction, though you should review the specific BSD terms if proprietary use is involved.
last release 2022-11-15 (1368 days) · last repo commit 2024-04-29 · 4,575 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 8,236,074 downloads/mo, #1,643 on PyPI
Alternatives
Verify before relying
pip install memory-profiler
from memory_profiler import profile
@profile
def my_func():
a = [1] * (10 ** 6)
return a
if __name__ == '__main__':
my_func()
# Run with: python -m memory_profiler script.py- Whether the package works reliably with recent Python versions given the dormant maintenance status.
- Current compatibility with modern versions of psutil and any plotting dependencies.
- Whether multiprocessing and child-process tracking features remain functional in current environments.
What it is and what it does
Memory Profiler is a Python module for analyzing memory consumption at both the process level and the line-by-line level within functions. It provides two main modes: line-by-line profiling (via the @profile decorator or -m memory_profiler flag) that shows memory usage and increments for each line of code, and time-based profiling (via the mprof command-line tool) that records overall memory usage over time and can generate plots. It depends on psutil for system-level memory monitoring.
The package is designed for developers and researchers who need to understand where memory is being allocated and freed in their Python programs. It can track multiprocessing contexts, plot memory trends, and identify potential memory leaks. However, the package is no longer actively maintained, meaning bug fixes and compatibility updates are unlikely to be forthcoming.
Use it for
- Identify which lines of code in a function consume the most memory by decorating with @profile and running with -m memory_profiler.
- Track overall memory usage of a long-running Python script over time using mprof run and mprof plot to visualize trends.
- Detect memory leaks by monitoring whether memory usage grows unexpectedly during process execution.
- Profile multiprocessing applications to see memory consumption of parent and child processes separately or combined.
- Generate memory usage reports with plots for performance analysis and documentation.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, with caution.
The package is stable and widely used (top 5000 PyPI), has low install friction, and carries no known vulnerabilities. However, it is dormant with no active maintenance. Install it if you need line-by-line memory profiling and can accept that bugs or compatibility issues will not be fixed by the maintainer. Consider it a mature, read-only tool rather than an actively developed project.
Install
memory-profiler on PyPI
Before you install
Low install friction with a single runtime dependency (psutil). However, the package is dormant—last release was 2022-11-15 and the maintainer has stated it is no longer actively maintained and issues will not be actively addressed.
Requires Python 3.5 or later; psutil must be installed as a runtime dependency.
License in practice
BSD license (permissive) allows use in most projects without significant restriction, though you should review the specific BSD terms if proprietary use is involved.
Quickstart
pip install memory-profiler
from memory_profiler import profile
@profile
def my_func():
a = [1] * (10 ** 6)
return a
if __name__ == '__main__':
my_func()
# Run with: python -m memory_profiler script.py
Verify before relying
- Whether the package works reliably with recent Python versions given the dormant maintenance status.
- Current compatibility with modern versions of psutil and any plotting dependencies.
- Whether multiprocessing and child-process tracking features remain functional in current environments.
Package facts
| License | BSD permissive |
| Python support | Supports the current Python release >=3.5 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagepsutil |
| Maintenance | Dormant 1,368 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 8,236,074 / month, #1,643 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: BSD LicenseOperating System :: POSIXOperating System :: UnixProgramming Language :: PythonProgramming Language :: Python :: 3Topic :: Software Development |
Evidence: memory_profiler-0.61.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “memory profiling python”
- memory-profilerProfiles memory consumption line-by-line in Python functions and…
- memrayMemray is a memory profiler for Python that traces every function…
- PymplerPympler measures, monitors, and analyzes memory behavior of Python…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also line-profiler · ps-mem · py-spy · scalene · pyroscope-io · pytest-monitor · pyinstrument · psutil · memray · PySnooper