Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

stubpy

Latest version: v1.0.4

Overview

Last scanned
27 Nov 2026
Published
27 Nov 2026
PyPI package Publisher: wzjoriv
1 Stars
0 Forks
27 Versions
2.7K Downloads
Python Repo language

Scan summary

stubpy was last scanned on 27 Nov 2026 at version 1.0.4. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 27 versions; the latest 5 were published within 6 days (22–27 Nov 2026).
  • Findings: No rules fired in version 1.0.4.
  • Downloads: 2,738 downloads.

Versions

27 versions published
Versions and the rules that fired in each
VersionPublishedStatus
1.0.4 LATEST 27 Nov 2026 No rules fired
1.0.3 27 Nov 2026 No rules fired
1.0.2 27 Nov 2026 No rules fired
1.0.1 27 Nov 2026 Not shown
1.0.0 22 Nov 2026 Not shown

No rules fired in 1.0.4

Findings

Findings for v1.0.4. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 1.0.4; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

stubpy

Generate accurate .pyi stubs for your Python package, with **kwargs and *args traced back to the parameters they forward to. Standard library only.

Tests Docs PyPI Python CPython 3.10-3.15 PyPy GraalPy Free-threaded Pyodide License: MIT Documentation Ruff

Features

Feature What you get
**kwargs / *args back-tracing Forwarded parameters written into the stub signature.
Source and runtime Parses the source and imports the module, merged per symbol; an import policy (--imports none) executes nothing.
Alias preservation Aliases like Length stay as written, with imports added.
Special classes Dedicated stubs for dataclasses, enums, TypedDict, NamedTuple, Generic, overloads.
Compiled extensions C API, Cython, pybind11 and nanobind modules, including docstrings.
Package generation One command stubs a whole tree, with __init__.pyi.
Check mode stubpy check exits 1 on missing or stale stubs.
Orphan pruning --prune removes stubs whose module no longer exists; stubs tracked in git are kept.
Hints @hint.signature, @hint.returns, @hint.ignore for what introspection misses.
Incremental merge Rewrites only the marked region and keeps hand edits.
Stub-only packages --stub-package writes a PEP 561 <pkg>-stubs distribution, ready to build.
Run cache --cache reuses the stubs of modules unchanged since the last run.
Type-checked stubs --typecheck runs mypy (or pyright) over the stubs; errors are reported per stub.
Docstring types --infer-types fills missing types from NumPy, Google and Sphinx docstrings.
Extension points Annotation handlers, forwarding resolvers and stub hooks.
Configuration [tool.stubpy] in pyproject.toml; flags override it.
Version branches sys.version_info / sys.platform blocks kept, as typeshed does.
Lazy attributes Names behind a module __getattr__ become explicit.
Pre-commit hooks stubpy-check and stubpy-generate, ready to use.

CPython 3.10 to 3.15 (free-threaded 3.14t included), PyPy, GraalPy and Pyodide. No dependencies.

Install

pip install stubpy

Use

stubpy src/mypkg -o stubs        # write stubs/mypkg/**/*.pyi
stubpy check --diff              # exit 1 when a stub is stale
stubpy render mypkg/core.py      # print one stub
import stubpy

report = stubpy.generate("src/mypkg", "stubs")   # write stubs
print(stubpy.render("mypkg/core.py").text)       # one module, nothing written
stubpy.check("src/mypkg", "stubs").ok            # False when a stub is stale

Example

# shapes.py
class Shape:
    def __init__(self, color: str = "black", opacity: float = 1.0): ...


class Rect(Shape):
    def __init__(self, width: float, height: float, **kwargs):
        super().__init__(**kwargs)

stubpy render shapes.py:

class Shape:
    def __init__(self, color: str = 'black', opacity: float = 1.0) -> None: ...

class Rect(Shape):
    def __init__(
        self,
        width: float,
        height: float,
        *,
        color: str = 'black',
        opacity: float = 1.0,
    ) -> None: ...

Configuration

# pyproject.toml
[tool.stubpy]
targets    = ["src/mypkg"]
output_dir = "stubs"

With this, stubpy and stubpy check need no arguments.

CI and pre-commit

# .pre-commit-config.yaml
repos:
  - repo: https://github.com/wzjoriv/stubpy
    rev: 1.0.4
    hooks:
      - id: stubpy-check
# GitHub Actions step
- run: stubpy check --diff --typecheck

Documentation

Contributing

Setup, the scripts/dev.py commands and the project's conventions are in the contributing guide.

License

MIT. See LICENSE.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • pypi-releases stubpy

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Copy of Template Design OX Blog (3)
Research

Ruby2Shell: Ruby Memory Corruption Flaws Expose Applications to Remote Code Execution, But is it an Actual Risk?

Vulnerability Insights

Compromised Claude Code extensions (versions 2.1.312 & 2.1.313) in Cursor try to install a backdoor

Ethersphere Hijacked With Crypto Stealing Malware (1)
npm

Ethersphere Hijacked With Crypto Stealing Malware Via Github & npm

Frame 2085668439 (1)
Group 1261154229