WIT definitions and Python bindings for VTX plugins
Project description
vtx-protocol
The Official Python SDK for VTX Project Plugins.
This package provides the type definitions, bindings, and interfaces required to develop VTX-compatible plugins in Python. It serves as the Single Source of Truth (SSOT) for the plugin protocol, ensuring that your implementation adheres to the strict interface contracts defined by the host.
Installation
pip install vtx-protocol
Usage
1. Developing a Plugin
The package exports all necessary data structures and interfaces directly. You can import strict types to ensure your plugin complies with the protocol.
from vtx_protocol import types, sql, stream_io
class Plugin:
def handle(self, req: types.HttpRequest) -> types.HttpResponse:
"""
Handle an incoming HTTP request.
"""
print(f"Received request: {req.method} {req.path}")
return types.HttpResponse(
status=200,
body=None
)
def get_manifest(self) -> types.Manifest:
"""
Return the plugin manifest.
"""
return types.Manifest(
id="my-python-plugin",
version="1.0.0",
name="My Python Plugin",
description="A sample plugin implemented in Python",
entrypoint="handle"
)
2. Accessing Protocol Definitions
For tooling or build scripts that require access to the raw interface definitions, the package provides helper functions to locate the bundled WIT files.
import vtx_protocol
# Get the absolute path to the bundled vtx.wit file
wit_path = vtx_protocol.get_wit_path()
# Read the content of the WIT file directly
wit_content = vtx_protocol.get_wit_content()
Build Process
To compile your Python code into a VTX-compatible WebAssembly component, use componentize-py with the protocol definitions provided by this package.
# Example build command using componentize-py
componentize-py \
--wit-path $(python -c "import vtx_protocol; print(vtx_protocol.get_wit_path())") \
--world plugin \
componentize app -o plugin.wasm
Versioning
This package follows Semantic Versioning. The version number (Major.Minor.Patch) corresponds strictly to the version of the vtx:api WIT interface definition.
- Major/Minor: Changes in the interface contract.
- Patch: Bug fixes or non-breaking internal updates.
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 vtx_protocol-2.2.0.tar.gz.
File metadata
- Download URL: vtx_protocol-2.2.0.tar.gz
- Upload date:
- Size: 12.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5f7e7d017d7c55563ee0377cbfc82d97641dba5271e6abd00e9c398b15d5074f
|
|
| MD5 |
942b29741142178bfb8283e14c87343f
|
|
| BLAKE2b-256 |
316ea318e7daefd9bf3bed566e86056296949772a53b4cc7ead9c6dec3ebf798
|
Provenance
The following attestation bundles were made for vtx_protocol-2.2.0.tar.gz:
Publisher:
release.yml on Vtxdeo/vtx-protocol
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vtx_protocol-2.2.0.tar.gz -
Subject digest:
5f7e7d017d7c55563ee0377cbfc82d97641dba5271e6abd00e9c398b15d5074f - Sigstore transparency entry: 782220272
- Sigstore integration time:
-
Permalink:
Vtxdeo/vtx-protocol@d34cf59fbb5d7f07eb27115c5e0317f81c57c3bb -
Branch / Tag:
refs/tags/v2.2.0 - Owner: https://github.com/Vtxdeo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d34cf59fbb5d7f07eb27115c5e0317f81c57c3bb -
Trigger Event:
release
-
Statement type:
File details
Details for the file vtx_protocol-2.2.0-py3-none-any.whl.
File metadata
- Download URL: vtx_protocol-2.2.0-py3-none-any.whl
- Upload date:
- Size: 16.4 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 |
4f26e03cee94d6ba62f7e90431e3265db0c690fbd2f0b6925519fac02344e2d7
|
|
| MD5 |
eaa76b8ec0064f0fb7547ffe71b7c63e
|
|
| BLAKE2b-256 |
2a386e3b94dc1645a0bdcea39864732d44b4f85a35a9ca2d47bd0f07a3007625
|
Provenance
The following attestation bundles were made for vtx_protocol-2.2.0-py3-none-any.whl:
Publisher:
release.yml on Vtxdeo/vtx-protocol
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vtx_protocol-2.2.0-py3-none-any.whl -
Subject digest:
4f26e03cee94d6ba62f7e90431e3265db0c690fbd2f0b6925519fac02344e2d7 - Sigstore transparency entry: 782220274
- Sigstore integration time:
-
Permalink:
Vtxdeo/vtx-protocol@d34cf59fbb5d7f07eb27115c5e0317f81c57c3bb -
Branch / Tag:
refs/tags/v2.2.0 - Owner: https://github.com/Vtxdeo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d34cf59fbb5d7f07eb27115c5e0317f81c57c3bb -
Trigger Event:
release
-
Statement type: