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

  • Python 3.7+ (see tox.ini for versions tested)
  • 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 client as WaapiClient():
    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 py37 for Python 3.7).

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.tar.gz (16.9 kB view details)

Uploaded Source

Built Distribution

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

waapi_client-0.7-py3-none-any.whl (18.8 kB view details)

Uploaded Python 3

File details

Details for the file waapi-client-0.7.tar.gz.

File metadata

  • Download URL: waapi-client-0.7.tar.gz
  • Upload date:
  • Size: 16.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for waapi-client-0.7.tar.gz
Algorithm Hash digest
SHA256 e5e72bf58e7b834cd16998a8006d40c9ca29c067a69002be3b0b680617277c4e
MD5 78f302008eb5ba15f4bf0735a01174c1
BLAKE2b-256 07de610ee2196316c1959541765f696c134f081008585444f693749d62f91498

See more details on using hashes here.

File details

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

File metadata

  • Download URL: waapi_client-0.7-py3-none-any.whl
  • Upload date:
  • Size: 18.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for waapi_client-0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 a881152a290d65e67824ceca087c628f8f7570b240bb90d6a78f8c2615158e59
MD5 939f27a2e46b43d545ee8f32214c84b2
BLAKE2b-256 f37f74fba7a5315da01019855eac35255e890c6669cba06691dab41065291006

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