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.0.tar.gz (12.5 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.0-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: vtubebridge-0.2.0.tar.gz
  • Upload date:
  • Size: 12.5 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.0.tar.gz
Algorithm Hash digest
SHA256 4d21846d0efd597487b37abfe236eb32faecde2e243cd8306db4b9dc389cc77d
MD5 d62cd67815c532de9108a8a241d0d0be
BLAKE2b-256 9672b4c93c270ba48c9aa692044b4250f6139f4f81ae608a74d02ffb26b6fa7c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vtubebridge-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 8.3 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 76913b235354d0eee5adf14a3de56aa38a86565866eeceeaab426fb2140dbc2d
MD5 b24cdb1a0a32d296b5d2ca811b09e8e1
BLAKE2b-256 b3c35826cd8d478e5a9ae3b4094346849eed006698a57aeb1630a3292d0538b0

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