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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vsstubs-1.1.1.tar.gz.
File metadata
- Download URL: vsstubs-1.1.1.tar.gz
- Upload date:
- Size: 32.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
12336d0ec0ccb65f4a7af5bf35eb79c05857ec25ee54dadef16bbfc163060336
|
|
| MD5 |
3899905ba0588c6dd4d551704bfd2f21
|
|
| BLAKE2b-256 |
6c12af8521f922744fa37f9401e6a46a925e9fadadfee3bb3b9586a462566027
|
Provenance
The following attestation bundles were made for vsstubs-1.1.1.tar.gz:
Publisher:
pypipublish.yml on Ichunjo/vs-stubs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vsstubs-1.1.1.tar.gz -
Subject digest:
12336d0ec0ccb65f4a7af5bf35eb79c05857ec25ee54dadef16bbfc163060336 - Sigstore transparency entry: 1178043335
- Sigstore integration time:
-
Permalink:
Ichunjo/vs-stubs@5bca45f47e5c487e4c12cf0b929b19d89e1b8eda -
Branch / Tag:
refs/tags/v1.1.1 - Owner: https://github.com/Ichunjo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypipublish.yml@5bca45f47e5c487e4c12cf0b929b19d89e1b8eda -
Trigger Event:
release
-
Statement type:
File details
Details for the file vsstubs-1.1.1-py3-none-any.whl.
File metadata
- Download URL: vsstubs-1.1.1-py3-none-any.whl
- Upload date:
- Size: 37.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2ffdbf74fb712c1a55abb51108a29a9191449abc7287b9639742e634837a4f9
|
|
| MD5 |
83ccab1f9a501a4c744d94212401843c
|
|
| BLAKE2b-256 |
52eb9c59658231fb14af7692f11f0a9654dab8b1fd0f444b53aa6812cb7d4e98
|
Provenance
The following attestation bundles were made for vsstubs-1.1.1-py3-none-any.whl:
Publisher:
pypipublish.yml on Ichunjo/vs-stubs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vsstubs-1.1.1-py3-none-any.whl -
Subject digest:
b2ffdbf74fb712c1a55abb51108a29a9191449abc7287b9639742e634837a4f9 - Sigstore transparency entry: 1178043400
- Sigstore integration time:
-
Permalink:
Ichunjo/vs-stubs@5bca45f47e5c487e4c12cf0b929b19d89e1b8eda -
Branch / Tag:
refs/tags/v1.1.1 - Owner: https://github.com/Ichunjo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypipublish.yml@5bca45f47e5c487e4c12cf0b929b19d89e1b8eda -
Trigger Event:
release
-
Statement type: