Automic VaultAutomic Vault

brew

使用 Homebrew, apk, dnf, Nix, pacman 安装 memray

查看 memray 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

安装

其他安装命令

macOS

Homebrew已验证 · 100%
brew install memray

local Homebrew formula metadata

Linux

Alpine Linux apk已验证 · 92%
sudo apk add memray

Alpine Linux edge package indexes · memray · 来源: dl-cdn.alpinelinux.org

Fedora dnf已验证 · 92%
sudo dnf install memray

Fedora Rawhide package metadata · memray · 来源: dl.fedoraproject.org

Nix已验证 · 92%
nix profile install nixpkgs#memray

nixpkgs package indexes · pkgs/by-name/me/memray/package.nix · 来源: api.github.com

Arch Linux pacman已验证 · 92%
sudo pacman -S memray

Arch Linux sync databases · memray · 来源: geo.mirror.pkgbuild.com

概览

软件包摘要

Memory profiler for Python applications

命令和别名

  • memray
  • memray3.14

历史

项目历史与用法

Memray is a Bloomberg Python memory profiler that tracks allocations in Python code, native extension modules, and the Python interpreter, then renders reports such as flame graphs, terminal summaries, tables, trees, live views, and stats.

项目历史

Memray's README and documentation present it as a profiler for allocation tracing rather than sampling alone. It records function call stacks for allocations, can include native C/C++ frames, works with Python threads and native threads, and can be used both as a CLI and as a Python library.

The package entered public Python packaging with a 1.0.0 release on PyPI in April 2022. Its release stream continued through the 1.x line, with GitHub release notes and PyPI metadata showing active maintenance into 2026.

采用历史

Memray is distributed through Python packaging and system package managers. The upstream README links PyPI, PyPI download statistics, conda-forge, GitHub Actions for wheels, and documentation; the batch input lists apk, Homebrew, Fedora, Nix, and Arch packages. The README also points to `pytest-memray`, which brought Memray into test-suite workflows as well as ad hoc command-line profiling.

使用方式

The common CLI workflow is `python3 -m memray run -o output.bin my_script.py`, followed by a reporter such as `python3 -m memray flamegraph output.bin`. Users can also run `memray run my_script.py`, use `memray run -m my_module`, enable native tracking with `--native`, attach to processes in supported scenarios, or use the API for finer-grained profiling.

Memray is limited to Linux and macOS. Because it includes a C extension and native tooling, source builds may require dependencies such as libdebuginfod, libunwind, and liblz4, while normal users are steered toward binary wheels from PyPI.

为什么软件包爱好者会关心

Memray is notable because Python memory profiling often crosses the Python/native boundary. Packaging it means shipping compiled extensions, platform-specific wheels, and native library integration while still exposing a friendly CLI. It is also a useful package-index signal because it bridges Python developers, C-extension debugging, flamegraph tooling, and pytest integration.

时间线

  • 2022-04-09: memray 1.0.0 uploaded to PyPI.
  • 2022: README documents Linux and macOS support, PyPI installation, native allocation tracking, and multiple reporters.
  • 2026-04-08: v1.19.3 GitHub release published.

Related projects

  • Related projects include pytest-memray for test integration, PyPI and conda-forge as distribution channels, and native debugging/profiling dependencies such as libunwind, libdebuginfod, and liblz4.

安全态势

风险级别:绿色

narrow executable package without higher-risk signals.

风险分类器

绿色 风险 · 低 置信度 · appliance

原因

  • narrow executable package without higher-risk signals

信号

  • metadata:no-higher-risk-signals

安装行为

  • formula 元数据中未记录 Homebrew post-install 钩子。
  • Homebrew bottle 元数据适用于 6 个平台目标。
  • 安装时包含 2 个运行时依赖。

建议审查

在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。

可执行文件

已安装的可执行文件

命令类型暴露范围备注
memraycli全局可执行文件
memray3.14cli全局可执行文件

新鲜度

版本和新鲜度

这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。

页面生成时间2026-07-25
管理器版本1.19.3
管理器更新时间2026-06-22
本地数据OK
上游not checked
检测到的最新版本未检测到

https://bloomberg.github.io/memray/

安装元数据

软件包元数据

软件包键brew:memray
版本1.19.3
软件包管理器Homebrew
软件包管理器页面https://formulae.brew.sh/formula/memray
主页https://bloomberg.github.io/memray/
仓库https://github.com/bloomberg/memray
上游文档https://bloomberg.github.io/memray
许可证Apache-2.0
源码归档https://files.pythonhosted.org/packages/96/04/5b886a36df947599e0f37cd46e6e44e565299815f044e2303ab2ae9f8870/memray-1.19.3.tar.gz
最后更新2026-06-22T14:05:27-07:00
Pulseupdated
依赖lz4, python@3.14
Bottle可用 (于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux)
Homebrew post-install未定义
服务未声明

注册表事实

源数据库详情

Source DatabaseHomebrew formula API
Taphomebrew/core
Full Namememray
Version Scheme0
Revision0
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • stable

源数据库匹配

其他软件包管理器记录

匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。

Nix95%

memray

nix profile install nixpkgs#memray
  • normalized package name match
  • 匹配方式:Memray
nixpkgs package indexes · api.github.com · nixpkgs package indexes: pkgs/by-name/me/memray/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
apk95%

memray 1.19.1-r2

Memray is a memory profiler for Python

https://bloomberg.github.io/memray/

sudo apk add memray
  • License: Apache-2.0
  • Architecture: x86_64
  • Source Package: memray
  • 1 依赖
  • 1 提供
  • normalized package name match
  • 匹配方式:Memray
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: memray from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz
apk95%

memray-pyc 1.19.1-r2

Precompiled Python bytecode for memray

https://bloomberg.github.io/memray/

sudo apk add memray-pyc
  • License: Apache-2.0
  • Architecture: x86_64
  • Source Package: memray
  • 1 依赖
  • normalized package name match
  • 匹配方式:Memray
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: memray-pyc from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz
dnf95%

memray 1.13.4-7.fc44

Memory profiler for Python applications

https://bloomberg.github.io/memray/

sudo dnf install memray
  • License: Apache-2.0 AND BSD-3-Clause
  • Category: Unspecified
  • Architecture: x86_64
  • Source Package: python-memray
  • 2 依赖
  • 1 提供
  • normalized package name match
  • 匹配方式:Memray
Fedora Rawhide package metadata · dl.fedoraproject.org · Fedora Rawhide package metadata: memray from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst
pacman95%

memray 1.19.3-1

A memory profiler for Python

https://github.com/bloomberg/memray

sudo pacman -S memray
  • License: Apache-2.0
  • Architecture: x86_64
  • 7 依赖
  • normalized package name match
  • 匹配方式:Memray
Arch Linux sync databases · geo.mirror.pkgbuild.com · Arch Linux sync databases: memray from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

来源线索

由仓库数据生成

此页面由 av-webscripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。

使用的来源

  • Geiger risk classifier
  • Nucleus package database
  • av.db category and tag curation
  • cross-ecosystem install command graph
  • curated package history
  • external package-manager database matches
  • package relationship graph
  • package version freshness
  • package-page enrichment