$npx skillfedfor your agent

scalene

Scalene: A high-resolution, low-overhead CPU, GPU, and memory profiler for Python with AI-powered optimization suggestions

Worth itPyPI Software DevelopmentReleased May 2026396.1K downloads / mopermissive licensePlatform wheel

Decision gist · record as of 2026-08-14

platform wheels — scalene-2.3.0-cp310-cp310-macosx_15_0_universal2.whl · scalene-2.3.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl · scalene-2.3.0-cp310-cp310-win_amd64.whl
v2.3.0 · released 2026-05-12 · Python !=3.11.0,>=3.8 · 9 runtime deps: rich, cloudpickle, nvidia-ml-py, Jinja2, psutil, numpy, astunparse, pydantic

Yes. Scalene is actively maintained, well-established (13k+ GitHub stars, top 15k PyPI packages), carries no known vulnerabilities, and solves a real problem—low-overhead, detailed profiling with AI-assisted optimization. The 9 runtime dependencies are standard and widely available. Install friction is moderate but manageable. Recommended for developers who need to understand and optimize Python performance without high profiling overhead.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.8 or later (excluding 3.11.0).
  • GPU profiling requires NVIDIA drivers and nvidia-ml-py.
  • AI optimization suggestions require credentials for OpenAI, Azure, Amazon Bedrock, or a local Ollama instance.

License · maintenance · safety

permissive license (permissive) — Licensed under Apache License (permissive), allowing commercial and private use with minimal restrictions. No license-based constraints on adoption.

last release 2026-05-12 (94 days) · last repo commit 2026-08-01 · 13,494 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 396,130 downloads/mo, #6,972 on PyPI

Verify before relying

pip install scalene

# Profile a script
scalene run your_prog.py

# Or programmatically:
from scalene import scalene_profiler
scalene_profiler.start()
# your code
scalene_profiler.stop()
  • Whether AI optimization suggestions are available without external API credentials or if local-only operation is feasible
  • Performance overhead claim of 'typically no more than 10-20%' and accuracy comparison methodology
  • Compatibility with async/await code and multiprocessing workloads
Same gist for agents: .md · .json

What it is and what it does

Scalene is a sampling-based profiler that measures CPU, GPU, and memory usage in Python programs at the line and function level. Unlike traditional profilers that instrument code or rely on Python's tracing hooks, Scalene uses sampling to keep overhead low while delivering detailed per-line breakdowns of where execution time and memory are consumed. It runs on macOS, Linux, and Windows, supports modern Python versions (3.8–3.14), and integrates with Jupyter, IPython, and VS Code.

The package's distinguishing feature is AI-powered optimization suggestions: after profiling, users can click on specific lines or code regions to request optimization proposals from GPT-4, Azure, Amazon Bedrock, or local models via Ollama. Results are displayed in an interactive web-based GUI (or CLI) that works fully offline. Configuration is flexible—via command-line flags, YAML files, or programmatic decorators—making it suitable for one-off profiling runs and integrated performance monitoring in development workflows.

Use it for

  • Identify CPU and memory bottlenecks in data science pipelines and get AI-suggested rewrites before optimization effort
  • Profile GPU-accelerated code to see where computation time is spent and detect memory leaks on device
  • Integrate profiling into CI/CD to catch performance regressions at the line level across Python versions
  • Debug slow web services or batch jobs by profiling specific functions with the @profile decorator
  • Generate shareable performance reports as self-contained HTML files for code review and documentation

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

Scalene is actively maintained, well-established (13k+ GitHub stars, top 15k PyPI packages), carries no known vulnerabilities, and solves a real problem—low-overhead, detailed profiling with AI-assisted optimization. The 9 runtime dependencies are standard and widely available. Install friction is moderate but manageable. Recommended for developers who need to understand and optimize Python performance without high profiling overhead.

Install

scalene on PyPI

Before you install

Medium install friction due to 9 runtime dependencies including numpy, pydantic, and nvidia-ml-py. Package is actively maintained with recent releases and strong community engagement (13494 GitHub stars). Precompiled wheels available for Python 3.8–3.14 on macOS, Linux, and Windows reduce build complexity.

Requires Python 3.8 or later (excluding 3.11.0). GPU profiling requires NVIDIA drivers and nvidia-ml-py. AI optimization suggestions require credentials for OpenAI, Azure, Amazon Bedrock, or a local Ollama instance.

License in practice

Licensed under Apache License (permissive), allowing commercial and private use with minimal restrictions. No license-based constraints on adoption.

Quickstart

pip install scalene

# Profile a script
scalene run your_prog.py

# Or programmatically:
from scalene import scalene_profiler
scalene_profiler.start()
# your code
scalene_profiler.stop()

Verify before relying

  • Whether AI optimization suggestions are available without external API credentials or if local-only operation is feasible
  • Performance overhead claim of 'typically no more than 10-20%' and accuracy comparison methodology
  • Compatibility with async/await code and multiprocessing workloads

Package facts

Licensepermissive license permissive
Python supportSupports the current Python release !=3.11.0,>=3.8
Install frictionMedium. Platform-specific wheel
Runtime dependencies
9 packages
richcloudpicklenvidia-ml-pyJinja2psutilnumpyastunparsepydanticpyyaml
MaintenanceActively maintained 94 days since the last release
Last repo commit
First released
Downloads396,130 / month, #6,972 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableFramework :: IPythonFramework :: JupyterIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: Apache Software LicenseOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIX :: LinuxProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software DevelopmentTopic :: Software Development :: Debuggers

Evidence: scalene-2.3.0-cp310-cp310-macosx_15_0_universal2.whl; scalene-2.3.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; scalene-2.3.0-cp310-cp310-win_amd64.whl; scalene-2.3.0-cp311-cp311-macosx_15_0_universal2.whl; scalene-2.3.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; scalene-2.3.0-cp312-cp312-macosx_15_0_universal2.whl; scalene-2.3.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; scalene-2.3.0-cp312-cp312-win_amd64.whl; scalene-2.3.0-cp313-cp313-macosx_15_0_universal2.whl; scalene-2.3.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; scalene-2.3.0-cp313-cp313-win_amd64.whl; scalene-2.3.0-cp314-cp314-macosx_15_0_universal2.whl; scalene-2.3.0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; scalene-2.3.0-cp314-cp314-win_amd64.whl; scalene-2.3.0-cp39-cp39-macosx_15_0_universal2.whl; scalene-2.3.0-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; scalene-2.3.0-cp39-cp39-win_amd64.whl

Tags

Capabilities
python cpu gpu memory profilerline-level performance profilingai optimization suggestions pythonpython performance analysis toolmemory leak detection profilergpu profiling pythonlow-overhead python profiler
Topics
performance-profilingai-assisted-optimizationgpu-profiling
PyPI keywords
performanceprofileroptimizationCPUGPUmemoryLLM

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 › “python cpu gpu memory profiler”

  • scaleneScalene profiles Python code to measure CPU, GPU, and memory…
  • google-cloud-profilerCollects and uploads CPU, memory, and wall-time profiles from Python…
  • austin-distAustin is a frame stack sampler for CPython that profiles running…

Give your agent the search over MCP, or paste the wish link into any chat.

More Software Development packages

typing-extensions Worth it
PyPI · Software Development · released Jul 2026

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.

PSF-2.0pure Python · 3.9+
1.9Bdownloads / mo
numpy Worth it
PyPI · Software Development · released Aug 2026

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.

BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0compiled wheel · 3.12+
1.1Bdownloads / mo
fastapi Worth it
PyPI · Software Development · released Jul 2026

FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.

MITpure Python · 3.10+
568.6Mdownloads / mo
annotated-doc With conditions
PyPI · Software Development · released Jul 2026

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.

MITpure Python · 3.9+
456.2Mdownloads / mo
typer Worth it
PyPI · Software Development · released Aug 2026

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.

MITpure Python · 3.10+
369.3Mdownloads / mo
distlib With conditions
PyPI · Software Development · released Jun 2026

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.

permissive licensepure Python
323.3Mdownloads / mo

See also torch-tb-profiler · line-profiler · google-cloud-profiler · yappi · memory-profiler · austin-dist · nvidia-nvtx · tuna · pyinstrument · Pympler