Skip to content

binbs/python-snapcast

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 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.11.1.

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

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 99.8%
  • Makefile 0.2%