Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

zone4

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zone4

Async library for controlling the Apart Zone4 preamp via serial

  • 0.0.1
  • PyPI
  • Socket score

Maintainers
1

Zone4

Zone4 is a Python library for interacting with the Apart Zone4 pre-amplifier over serial.

Installation

Use the package manager pip to install zone4.

pip install zone4

Usage

import asyncio
from zone4 import Zone4Manager

async def set_volume(manager, zone, volume):
	await manager.zone(zone).set_volume(volume)

async def update(manager, loop):
	await manager.update()
	loop.create_task(update(manager, loop))

if __name__ == '__main__':
  loop = asyncio.new_event_loop()
  asyncio.set_event_loop(loop)

  manager = Zone4Manager('/dev/ttyS3')

  loop.run_until_complete(manager.setup())

  loop.create_task(set_volume(manager, 'a', 55))
  loop.create_task(update(manager, loop))

  loop.run_forever()
  loop.close()

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

GNU GPLv3

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc