Skip to main content

Typing stubs for VapourSynth

Project description

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.


Installation

pip install vsstubs

Usage

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

Command Line

vsstubs

Example:

vsstubs -o output.pyi --template

Python API

from vsstubs import output_stubs

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

CLI Reference

 Usage: vsstubs [OPTIONS] COMMAND [ARGS]...

 vs-stubs command line interface

╭─ Options ─────────────────────────────────────────────────────────────────────╮
│ --template  -T        Export blank template; excludes existing plugins unless │
│                       --load or --add is used.                                │
│ --check     -C        Check for new plugins or new plugin signatures.         │
│ --update    -U        Update the current stubs from the input.                │
│ --help                Show this message and exit.                             │
╰───────────────────────────────────────────────────────────────────────────────╯
╭─ I/O options ─────────────────────────────────────────────────────────────────╮
│ --input   -i,-I      TEXT  Path to the input .pyi file. Use '-' for piping.   │
│ --output  -o,-O      TEXT  Path to write the output .pyi file. '@' to         │
│                            overwrite the input file. '-' for piping.          │
│                            [default: (vapoursynth-stubs/__init__.pyi inside   │
│                            the site-package folder)]                          │
│ --load    -L         PATH  Load plugins from a folder or a single library     │
│                            file.                                              │
╰───────────────────────────────────────────────────────────────────────────────╯
╭─ Informations ────────────────────────────────────────────────────────────────╮
│ --quiet              Suppress message output.                                 │
│ --version  -V        Show version info and exit.                              │
╰───────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ────────────────────────────────────────────────────────────────────╮
│ add      Add or update the specified plugins in the stubs                     │
│ remove   Remove the specified plugins from the stubs                          │
╰───────────────────────────────────────────────────────────────────────────────╯

Examples

  • Simply update the VapourSynth stubs:

    vsstubs
    
  • 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
    

License

MIT


Why use this over vsrepo genstubs?

  • Much faster than genstubs.
  • More accurate typing: the generated stubs better reflect the actual signatures of plugins, core classes, and functions.
  • Modern Python typing.
  • Easier to maintain and extend than genstubs.
  • More flexible workflow: supports generating blank templates, checking for new plugin signatures, and selectively adding/removing plugins.

Project details


Download files

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

Source Distribution

vsstubs-1.0.0.post1.tar.gz (22.5 kB view details)

Uploaded Source

Built Distribution

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

vsstubs-1.0.0.post1-py3-none-any.whl (27.7 kB view details)

Uploaded Python 3

File details

Details for the file vsstubs-1.0.0.post1.tar.gz.

File metadata

  • Download URL: vsstubs-1.0.0.post1.tar.gz
  • Upload date:
  • Size: 22.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for vsstubs-1.0.0.post1.tar.gz
Algorithm Hash digest
SHA256 07a5312e4447da91c1c8e6a1908ec9d4dec9e8a89026e14af76568f1f2159dcc
MD5 6788c85881f1c05a1072861ba1bc5beb
BLAKE2b-256 3baf1ab4babd54be1dac7e3f0180e2d1315de581a494dabee970264794ce18aa

See more details on using hashes here.

Provenance

The following attestation bundles were made for vsstubs-1.0.0.post1.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-1.0.0.post1-py3-none-any.whl.

File metadata

  • Download URL: vsstubs-1.0.0.post1-py3-none-any.whl
  • Upload date:
  • Size: 27.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for vsstubs-1.0.0.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 161bee6c3035521dc3cfb82f19fb2be04cd4273abaad2cce002eeb181117db0d
MD5 267b019274eb26f6b1b89b3922f8c8e0
BLAKE2b-256 0103e710f912c225eb34e0258412ebebce7bc54806e08717d4d3dee1a3f90648

See more details on using hashes here.

Provenance

The following attestation bundles were made for vsstubs-1.0.0.post1-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.

Supported by

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