✨ Features
- ✨ Full type hints support with static type checking
- 🎯 Data validation and serialization using Pydantic
- 🔄 Async-first design with WebSocket communication
- 🎨 Easy-to-use event system for plugin development
- 🛡️ Built-in error handling and reconnection mechanisms
📖 Introduction
Style at a glance
import asyncio
from coovts.plugin import Plugin
from coovts.types import api, event
# no token yet: VTS asks the user once
plugin = Plugin("A Creative Plugin Name", "LgCuwukii☆")
@plugin.subscribe_event(event.ModelMovedEventData)
async def _(data: event.ModelMovedEventData):
print(data.model_position)
# Requests need a session, so they belong in `on_authenticated`, which fires again after every reconnect;
# `call_api` is typed per request and returns that request's response model.
@plugin.on_authenticated
async def _():
model = await plugin.call_api(api.CurrentModelRequest())
print("current model:", model.model_name, model.model_id)
async def main() -> None:
await plugin.run()
asyncio.run(main())
plugin.run() hands back the supervisor task; it must be awaited inside a running event loop,
because asyncio.run() builds its argument before the loop starts.
Next
- Read the guide in detail
- Read
examples/basic.py— the same plugin, with every logging hook filled in
Thanks for using it, and contributions are welcome 😊
💿 Install
You should use at least Python 3.12 to use this library.
pip install coovts
or
uv add coovts
📞 Contacts
- Telegram: @lgc2333
- QQ: 3076823485 / Group: 168603371
- Email: lgc2333@126.com
- Discord: lgc2333 (Not active)
📝 Changelog
Metadata
Release files for coovts 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| coovts-0.1.0.tar.gz | 158.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| coovts-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 203.4 kB
Release files / coovts-0.1.0.tar.gz
| Download URL | coovts-0.1.0.tar.gz |
|---|---|
| Size | 158.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4384f2ea0337dc4f020b156c76feb3f62519de3a2792467d9150c46fc7e728c4
|
|
BLAKE2b-256 checksum How to use checksums |
bbe9d8ac58fe61a3e5252f072729881d2311b92ca573b05adb44f7ee82506c36
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / coovts-0.1.0-py3-none-any.whl
| Download URL | coovts-0.1.0-py3-none-any.whl |
|---|---|
| Size | 45.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f17233a3734956727a83c0a6f99a6140b522254560dc47566f4b0cddb8c32a50
|
|
BLAKE2b-256 checksum How to use checksums |
7719c3bfc8bc032afb8cde9abb36c56d53a77b6215f440cc160128f11cf502b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|