Skip to main content

Python wrappers for the Art-Net protocol to send DMX over Ethernet

Project description

pyartnet

pyartnet is a python implementation of the ArtNet protocol using asyncio.

Usage

from pyartnet import ArtNetNode

node = ArtNetNode('IP')
await node.start()

universe = node.add_universe(0)
channel  = universe.add_channel(start=1, width=3)

# Fade channel to 255,0,0 in 5s
# The fade will automatically run in the background
channel.add_fade([255,0,0], 5000)   

# this can be used to wait till the fade is complete
await channel.wait_till_fade_complete()

Output correction

It is possible to use an output correction to create different fade curves. Output correction can be set on the universe or on the individual channel.

from pyartnet import ArtNetNode, output_correction

node = ArtNetNode('IP')

universe = node.add_universe(0)
universe.output_correction = output_correction.quadratic()  # quadratic will be used for all channels

channel  = universe.add_channel(start=1, width=3)
channel.output_correction = output_correction.cubic()       # this channel will use cubic

The graph shows different output depending on the output correction.

From left to right: linear (default when nothing is set), quadratic, cubic then quadruple

Quadratic or cubic results in much smoother and more pleasant fades when using LED Strips.

Changelog

0.6.0 (27.10.2020)

  • ArtnetNode.start is now an async function
  • ArtnetNode.step_time_ms renamed to ArtnetNode.step_time (shouldn't be used manually anyway)
  • removed support for python 3.6
  • added more and better type hints
  • switched to pytest
  • small fixes

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

pyartnet-0.6.0.tar.gz (18.5 kB view details)

Uploaded Source

Built Distribution

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

pyartnet-0.6.0-py3-none-any.whl (21.0 kB view details)

Uploaded Python 3

File details

Details for the file pyartnet-0.6.0.tar.gz.

File metadata

  • Download URL: pyartnet-0.6.0.tar.gz
  • Upload date:
  • Size: 18.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.4

File hashes

Hashes for pyartnet-0.6.0.tar.gz
Algorithm Hash digest
SHA256 e0c81749ac34b25f2860b22fccd19c1e16ff143ae7bc42b4c2eca04d97e04ada
MD5 c3e4cc4e3383ebc4701671c6d2ac9f43
BLAKE2b-256 6d5c8620f9bcea705ad5e0692dbdc776065dcfcab392551ffa53b54e2cd3b511

See more details on using hashes here.

File details

Details for the file pyartnet-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: pyartnet-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 21.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.4

File hashes

Hashes for pyartnet-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a337d16e050a9e3dcb8a5a7f8197c2daf6004a206ea2414b8d687bd171db2fda
MD5 a041c96bd9aef3e847b6cdfddfe8cad6
BLAKE2b-256 3999111536ab76a9baead43d8093c9179818e38cc73ff2e9d303d51acdeab020

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