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.
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.
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)
--wheelbuilds an installablevapoursynth-stubswheel instead of writing a.pyifile 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
--outputwith--wheelto choose the directory where the wheel should be built:vsstubs --wheel --output dist
When
--wheelis enabled,--outputmust be a directory path. The special output values@and-are only for direct.pyioutput 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
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. '@' overwrites │
│ the input file and '-' writes to stdout. With │
│ --wheel, this is the directory where the wheel is │
│ built. │
│ [default: (vapoursynth-stubs/__init__.pyi inside │
│ the site-package folder)] │
│ --wheel -w Build an installable vapoursynth-stubs wheel │
│ instead of writing a .pyi file. The wheel path is │
│ printed to stdout so it can be passed to pip. │
│ --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 │
╰───────────────────────────────────────────────────────────────────────────────╯
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.5.0.tar.gz.
File metadata
- Download URL: vsstubs-1.5.0.tar.gz
- Upload date:
- Size: 34.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af42c91f9fba81995f1dcb1e65ee67897b3cfc252101f73e0b44f81ac599907c
|
|
| MD5 |
dcf1467bdcde4bd2c8cce8b4bf8d0f93
|
|
| BLAKE2b-256 |
8a76fe28c6cb6e8667e61c207381d5f8b87b7989e5e89aec4d3b056b4cf8eb24
|
Provenance
The following attestation bundles were made for vsstubs-1.5.0.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.5.0.tar.gz -
Subject digest:
af42c91f9fba81995f1dcb1e65ee67897b3cfc252101f73e0b44f81ac599907c - Sigstore transparency entry: 1462104401
- Sigstore integration time:
-
Permalink:
Ichunjo/vs-stubs@8a1d30a449d1b569121be6211497a39b776f7d77 -
Branch / Tag:
refs/tags/v1.5.0 - Owner: https://github.com/Ichunjo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypipublish.yml@8a1d30a449d1b569121be6211497a39b776f7d77 -
Trigger Event:
release
-
Statement type:
File details
Details for the file vsstubs-1.5.0-py3-none-any.whl.
File metadata
- Download URL: vsstubs-1.5.0-py3-none-any.whl
- Upload date:
- Size: 29.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fcfa18f7eb6dc0b1b38e8e7b0e3890e49628fc1636c3791488e977988135451e
|
|
| MD5 |
0ddb445908d8e9804aae5baa42ccf72e
|
|
| BLAKE2b-256 |
36d9fef6a10b915fa5736aaa92143c9ee71e2ae307f1a62a19c5f91099bd9ac6
|
Provenance
The following attestation bundles were made for vsstubs-1.5.0-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.5.0-py3-none-any.whl -
Subject digest:
fcfa18f7eb6dc0b1b38e8e7b0e3890e49628fc1636c3791488e977988135451e - Sigstore transparency entry: 1462104616
- Sigstore integration time:
-
Permalink:
Ichunjo/vs-stubs@8a1d30a449d1b569121be6211497a39b776f7d77 -
Branch / Tag:
refs/tags/v1.5.0 - Owner: https://github.com/Ichunjo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypipublish.yml@8a1d30a449d1b569121be6211497a39b776f7d77 -
Trigger Event:
release
-
Statement type: