8000 GitHub - netsuso/python-snapcast: Python API for controlling Snapcast, a multi-room synchronous audio solution.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Python API for controlling Snapcast, a multi-room synchronous audio solution.

License

Notifications You must be signed in to change notification settings

netsuso/python-snapcast

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status PyPI version

python-snapcast

Control Snapcast in Python 3. Reads client configurations, updates clients, and receives updates from other controllers.

Supports Snapcast 0.15.0.

Install

pip install snapcast

Usage

Control

import snapcast.control

server = snapcast.control.Snapserver('localhost', snapcast.control.CONTROL_PORT)

for client in server.clients:
    # client is an instance of snapcast.Snapclient
    client.name = 'example'
    print(client.name) # shows 'example'
    client.volume = 100
    print(client.volume) # shows 100
    client.muted = True
    print(client.muted) # shows True
    client.latency = 0
    print(client.latency) # shows 0
    print(client.identifier) # shows 'example'
    client.name = None
    print(client.identifier) # shows ip address

Client

Note: This is experimental. Synchronization is not yet supported. Requires GStreamer 1.0.

import snapcast.client

client = snapcast.client.Client('localhost', snapcast.client.SERVER_PORT)
client.register()
client.request_start() # this blocks

About

Python API for controlling Snapcast, a multi-room synchronous audio solution.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 99.8%
  • Makefile 0.2%
0