Skip to main content

A fully featured Python wrapper for the VTube Studio API

Project description

VTubeBridge

VTubeBridge is a full-featured Python wrapper for the VTube Studio API. It allows you to seamlessly interact with VTube Studio using asynchronous WebSocket communication and supports nearly all API endpoints.

Features

  • Async WebSocket Communication:
    Interact with VTube Studio’s API in real time using asynchronous requests.

  • Model, Item, and Background Management:

    • Load and unload models
    • Manage items (load, unload, move, animate, pin)
    • Adjust backgrounds
  • Transformations & Parameter Control:

    • Scale, rotate, and move models and items
    • Inject and modify Live2D parameters
  • Hotkey & Expression Triggers:
    Trigger hotkeys (which control expressions, animations, etc.) via the API.

  • Event Subscription:
    Subscribe to and handle VTube Studio events (e.g., model load, tracking changes) in real time.

  • ArtMesh Control:
    Adjust art mesh properties (such as opacity) and trigger animations.

  • Advanced API Operations:

    • Query API state
    • Retrieve statistics and folder information
    • Access both default and custom input parameter lists
  • Physics & NDI Control:

    • Get and override physics settings for the current model
    • Configure NDI streaming settings
  • UDP Server Discovery:
    Discover VTube Studio instances on your network via UDP broadcasts.

  • Graceful Disconnection:
    Cleanly disconnect from the API when your application is done.

CLI Usage

You can also interact with VTube Studio using the provided command-line interface. For example:

python -m vtstudio list-models
python -m vtstudio load-model --id MODEL_ID
python -m vtstudio trigger-hotkey --id HOTKEY_ID
python -m vtstudio trigger-expression --file EXPRESSION_FILE
python -m vtstudio set-param --name ParamName --value 1.0
python -m vtstudio scale-model --posx 0 --posy 0 --rotation 0 --scalex 1.0 --scaley 1.0
python -m vtstudio rotate-scale-item --instance 1001 --rotation 45 --scalex 1.2 --scaley 1.2
python -m vtstudio face-tracking
python -m vtstudio get-expression
python -m vtstudio set-artmesh-opacity --tag ArtMeshTag --opacity 0.5
python -m vtstudio trigger-animation --file animation.motion3.json

Example

To run the example script, use:

python examples/main.py

Installation

Clone the repository and install the necessary dependencies:

pip install websockets colorama

License

This project is licensed under the MIT License.

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

vtubebridge-0.2.2.tar.gz (13.3 kB view details)

Uploaded Source

Built Distribution

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

vtubebridge-0.2.2-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file vtubebridge-0.2.2.tar.gz.

File metadata

  • Download URL: vtubebridge-0.2.2.tar.gz
  • Upload date:
  • Size: 13.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.0

File hashes

Hashes for vtubebridge-0.2.2.tar.gz
Algorithm Hash digest
SHA256 49d2ba824a1dd98dbc8e7bc75ec7fa3ec8eb5312ffd94c30b125c6427d68032f
MD5 67f5e34c115a9cffb36558832ae74abc
BLAKE2b-256 ed5ad62026f952bfd12dce479ce229dd7a90e0f2c5686df6fabd11838a84975a

See more details on using hashes here.

File details

Details for the file vtubebridge-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: vtubebridge-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.0

File hashes

Hashes for vtubebridge-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b118848cedc405fdc90d55a26bffc7d16dae3e83da8a7095a9d3ffdab2dd4b3a
MD5 3ea98d071868e9e681d343c081b36792
BLAKE2b-256 fd502d57f6f7a2aad4a672b909914f9311bf8ca5854d3f1cb13c6f19fbe4ab17

See more details on using hashes here.

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