Skip to main content

vs-stubs

Typing stubs for VapourSynth

vs-stubs provides Python type stubs for VapourSynth plugins and core functions. This helps editors, IDEs, and static type checkers (e.g. mypy, pyright) understand VapourSynth's API.

Due to the dynamic nature of VapourSynth's plugin system, any newly installed plugins are not automatically reflected in the stubs. When adding plugins, you will need to regenerate stubs to keep the type information accurate and in sync with your environment.

Note that vs-stubs does not include or install any actual VapourSynth plugins. Only their type definitions.

[!TIP] A VS Code extension is also available here (which can automatically regenerate stubs for you).


Installation

pip install vsstubs

Usage

You can use vsstubs via the command line or as a Python module.

Command Line

  • Simply update the VapourSynth stubs:

    vsstubs
    
  • Installing from the wheel output for a proper installation:

    pip install $(vsstubs --wheel)
    

    --wheel builds an installable vapoursynth-stubs wheel instead of writing a .pyi file directly.

    By default, the wheel is created in a temporary directory and the wheel path is printed to stdout, which lets shells pass it straight to pip install.

    Use --output with --wheel to choose the directory where the wheel should be built:

    vsstubs --wheel --output dist
    

    When --wheel is enabled, --output must be a directory path. The special output values @ and - are only for direct .pyi output and cannot be used with wheel output.

  • Generate a template stubs:

    vsstubs -o out.pyi --template
    
  • Add plugin stubs:

    vsstubs -i out.pyi -o @ add resize2
    
  • Remove plugin stubs (On Powershell you will need to escape the @ character):

    vsstubs -i out.pyi -o "@" remove resize2
    

Python API

from vsstubs import output_stubs

# Example usage
output_stubs(None, "output.pyi", template=True)

CLI Reference

vsstubs

Add command

vsstubs add --help

Check command

vsstubs check --help

Plugins command

vsstubs plugins --help

Remove command

vsstubs remove --help

Update command

vsstubs update --help

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vsstubs-2.3.0.tar.gz (36.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vsstubs-2.3.0-py3-none-any.whl (31.1 kB view details)

Uploaded Python 3

File details

Details for the file vsstubs-2.3.0.tar.gz.

File metadata

  • Download URL: vsstubs-2.3.0.tar.gz
  • Upload date:
  • Size: 36.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for vsstubs-2.3.0.tar.gz
Algorithm Hash digest
SHA256 1e046eaf0735868facfa127ffb071d05295e6c0d8d73e883779dc8ba8ffb3811
MD5 2987d3b58bfeec14aa4ec43ec0d82218
BLAKE2b-256 7e9ea20d895cc58050071a6a961fb7a6a22b1fddbd938fc23d25d91feda136a9

See more details on using hashes here.

Provenance

The following attestation bundles were made for vsstubs-2.3.0.tar.gz:

Publisher: pypipublish.yml on Ichunjo/vs-stubs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vsstubs-2.3.0-py3-none-any.whl.

File metadata

  • Download URL: vsstubs-2.3.0-py3-none-any.whl
  • Upload date:
  • Size: 31.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for vsstubs-2.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 63bc1395084f14618244524ea9769a2e085ff7c7abf09a580cc604954a999bd5
MD5 d1a4fc299d4970233a1ae4447c2e1c79
BLAKE2b-256 67da2eaf97a5adf684b4392b97f61fbeaaba74a356e985c22538898acc7a8b26

See more details on using hashes here.

Provenance

The following attestation bundles were made for vsstubs-2.3.0-py3-none-any.whl:

Publisher: pypipublish.yml on Ichunjo/vs-stubs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

2.3.0 This release

2 files

2.2.1

2 files

2.2.0

2 files

2.1.1

2 files

2.1.0

2 files

2.0.0

2 files

1.5.0

2 files

1.4.0

2 files

1.3.0

2 files

1.2.0

2 files

1.1.2

2 files

1.1.1

2 files

1.1.0

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0.post1

2 files

1.0.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page