StatusResponse

class supriya.tools.responsetools.StatusResponse(actual_sample_rate=None, average_cpu_usage=None, group_count=None, osc_message=None, peak_cpu_usage=None, synth_count=None, synthdef_count=None, target_sample_rate=None, ugen_count=None)[source]

Lineage

digraph InheritanceGraph { graph [background=transparent, bgcolor=transparent, color=lightslategrey, fontname=Arial, outputorder=edgesfirst, overlap=prism, penwidth=2, rankdir=LR, root="__builtin__.object", splines=spline, style="dotted, rounded", truecolor=true]; node [colorscheme=pastel19, fontname=Arial, fontsize=12, penwidth=2, style="filled, rounded"]; edge [color=lightsteelblue2, penwidth=2]; subgraph cluster_builtins { graph [label=builtins]; "builtins.object" [color=1, group=0, label=object, shape=box]; } subgraph cluster_responsetools { graph [label=responsetools]; "supriya.tools.responsetools.Response.Response" [color=2, group=1, label=Response, shape=box]; "supriya.tools.responsetools.StatusResponse.StatusResponse" [color=black, fontcolor=white, group=1, label=<<B>StatusResponse</B>>, shape=box, style="filled, rounded"]; "supriya.tools.responsetools.Response.Response" -> "supriya.tools.responsetools.StatusResponse.StatusResponse"; } subgraph cluster_systemtools { graph [label=systemtools]; "supriya.tools.systemtools.SupriyaObject.AbstractBase" [color=3, group=2, label=AbstractBase, shape=box]; "supriya.tools.systemtools.SupriyaObject.SupriyaObject" [color=3, group=2, label=SupriyaObject, shape=box]; "supriya.tools.systemtools.SupriyaValueObject.SupriyaValueObject" [color=3, group=2, label=SupriyaValueObject, shape=box]; "supriya.tools.systemtools.SupriyaObject.AbstractBase" -> "supriya.tools.systemtools.SupriyaObject.SupriyaObject"; "supriya.tools.systemtools.SupriyaObject.SupriyaObject" -> "supriya.tools.systemtools.SupriyaValueObject.SupriyaValueObject"; } "builtins.object" -> "supriya.tools.systemtools.SupriyaObject.AbstractBase"; "supriya.tools.systemtools.SupriyaValueObject.SupriyaValueObject" -> "supriya.tools.responsetools.Response.Response"; }

Attribute summary

actual_sample_rate
average_cpu_usage
group_count
osc_message
peak_cpu_usage
synth_count
synthdef_count
target_sample_rate
to_dict() Convert StatusResponse to JSON-serializable dictionay.
ugen_count
__copy__(*args)
__eq__(expr)
__format__([format_specification]) Formats Supriya object.
__hash__()
__repr__() Gets interpreter representation of Supriya object.

Read-only properties

StatusResponse.actual_sample_rate
StatusResponse.average_cpu_usage
StatusResponse.group_count
(Response).osc_message
StatusResponse.peak_cpu_usage
StatusResponse.synth_count
StatusResponse.synthdef_count
StatusResponse.target_sample_rate
StatusResponse.ugen_count

Methods

StatusResponse.to_dict()[source]

Convert StatusResponse to JSON-serializable dictionay.

>>> status_response = responsetools.StatusResponse(
...     actual_sample_rate=44100.05692801021,
...     average_cpu_usage=8.151924133300781,
...     group_count=6,
...     peak_cpu_usage=15.151398658752441,
...     synth_count=19,
...     synthdef_count=42,
...     target_sample_rate=44100.0,
...     ugen_count=685
...     )
>>> import json
>>> result = status_response.to_dict()
>>> result = json.dumps(
...     result,
...     indent=4,
...     separators=(',', ': '),
...     sort_keys=True,
...     )
>>> print(result)
{
    "server_status": {
        "actual_sample_rate": 44100.05692801021,
        "average_cpu_usage": 8.151924133300781,
        "group_count": 6,
        "peak_cpu_usage": 15.151398658752441,
        "synth_count": 19,
        "synthdef_count": 42,
        "target_sample_rate": 44100.0,
        "ugen_count": 685
    }
}

Special methods

(SupriyaValueObject).__copy__(*args)
(SupriyaValueObject).__eq__(expr)
(SupriyaObject).__format__(format_specification='')

Formats Supriya object.

Set format_specification to ‘’ or ‘storage’. Interprets ‘’ equal to ‘storage’.

Returns string.

(SupriyaValueObject).__hash__()
(SupriyaObject).__repr__()

Gets interpreter representation of Supriya object.

Returns string.