Skip to main content

Wwise Authoring API client.

Project description

Wwise Authoring API (Waapi) Client for Python

Decoupled autobahn WAMP client with support for plain options and bindable subscription callbacks.

Requirements

  • Non-EOL Python 3.x version (see tox.ini for versions tested). Refer to the official Status of Python versions
  • Wwise instance with the Wwise Authoring API enabled (Project > User Preferences... > Enable Wwise Authoring API)

Setup

On Windows, it is recommended to use the Python Launcher for Windows which is installed with Python 3 from python.org.

  • Windows: py -3 -m pip install waapi-client
  • Other platforms: python3 -m pip install waapi-client

Usage

from waapi import WaapiClient

with WaapiClient() as client:
    result = client.call("ak.wwise.core.getInfo")

The with statement automatically closes the connection and unregisters subscribers. To keep the connection alive, instantiate WaapiClient and call disconnect when you are done.

from waapi import WaapiClient

# Connect (default URL)
client = WaapiClient()

# RPC
result = client.call("ak.wwise.core.getInfo")

# Subscribe
handler = client.subscribe(
    "ak.wwise.core.object.created",
    lambda object: print("Object created: " + str(object))
)

# Bind a different callback at any time
def my_callback(object):
    print("Different callback: " + str(object))

handler.bind(my_callback)

# Unsubscribe
handler.unsubscribe()

# Disconnect
client.disconnect()

Be aware that failing to call disconnect will result in the program to appear unresponsive, as the background thread running the connection will remain active.

Contribute

This repository accepts pull requests. You may open an issue for any bugs or improvement requests.

Local Install

You may install the package locally using either pip or pipenv.

Clone this repository, then from the repository root run:

  • Windows: py -3 -m pip install -e .
  • Other platforms: python3 -m pip install -e .

or

pipenv install --three

Running the Tests

Install the tox package:

  • Windows: py -3 -m pip install tox
  • Other platforms: python3 -m pip install tox

Open a blank project in Wwise, then you may execute tox in the terminal from the root of the repository

The test suite will run for all supported versions of Python. Use -e pyXX to run for a single version, e.g., tox -e py312 for Python 3.12).

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

waapi_client-0.7.2.tar.gz (17.1 kB view details)

Uploaded Source

Built Distribution

waapi_client-0.7.2-py3-none-any.whl (18.9 kB view details)

Uploaded Python 3

File details

Details for the file waapi_client-0.7.2.tar.gz.

File metadata

  • Download URL: waapi_client-0.7.2.tar.gz
  • Upload date:
  • Size: 17.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.2

File hashes

Hashes for waapi_client-0.7.2.tar.gz
Algorithm Hash digest
SHA256 4f858e9c721a69dad5e4edc731c631bb45c738cd61e46363d0a6878569ce2555
MD5 ff9990b4ff1574d58e9fd917ef88e80e
BLAKE2b-256 7ecd0bf35687b6ec7817d5de636c940fe0ded1222ce996e0f0ac935b1d88130f

See more details on using hashes here.

File details

Details for the file waapi_client-0.7.2-py3-none-any.whl.

File metadata

  • Download URL: waapi_client-0.7.2-py3-none-any.whl
  • Upload date:
  • Size: 18.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.2

File hashes

Hashes for waapi_client-0.7.2-py3-none-any.whl
Algorithm Hash digest
SHA256 556858614e4a4cf8ea103b8ab07ceb5d131ad37d3bdbd4cd2a24104556dd0af6
MD5 86282124552e8e280129cab21970f602
BLAKE2b-256 37879942a33cb714e8271d23878a4c12199b6dcb1d36bcf7d94785a391a5e675

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page