Skip to main content

xAAL devices build from schemas

Project description

Introduction

This package contains stuffs to build some code from the schemas. Right now, it mainly contains the “devices.py” module which is generated via the builder script.

This module contains a function that return an instance for each dev-type. For example, if you want to use a lamp.basic, you can simply write something like this.

from xaal.schemas import devices
from xaal.lib import tools

lamp = devices.lamp()
lamp.address = tools.get_random_uuid()

WARNING

This package will be updated regulary (that mainly why this files isn’t in xaal.lib package), so don’t modify the files unless you really know what you do.

If your device isn’t in this package, please send us a email to add a schema or use the xaal.lib.Device API directly. (don’t tweak devices.py)

TODO

Right now xaal.lib.Attribute doesn’t support type checking (You know, it’s Python anyway..) but I think we should provide some default type checking, in devices module.

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

xaal_schemas-0.3.tar.gz (8.0 kB view hashes)

Uploaded Source

Built Distribution

xaal.schemas-0.3-py3-none-any.whl (7.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page