semvec/pypi-packages huggingface dataset:
environexus 1.2.2
A library for Home Assistant to manage Zwave devices on the Environexus controller

# environexus

This is a library used to integrate an Environexus controller (complete with wireless nodes on a network)
with Home Assistant. Or integrate with whatever you want

All you need it is the base url to initialise. e.g. url=192.168.1.2

hub = LightHub('192.168.1.2')
woning-wattle 0.4.1
Library for converting yaml structures to Python objects, based on a predefined object hierarchy schema.

Wattle
======

Library for converting yaml structures to Python objects, based on a predefined object hierarchy schema.

Given a schema of class hierarchy

::

    from wattle import load_schema
    from wattle.nodes import Nested, Value


    class MessagePrinter:
        indent = Value(int)
        capitalize = Value(bool)

        def print(self, message):
            if self.indent:
                message = (" " * self.indent) + message
            if self.capitalize:
                message = message.upper()
            print(message)


    class HelloWorld:
        message = Value(str)
        how_many_times = Value(int, default=25)
        printer = Nested(MessagePrinter)

        def print(self):
            for _ in range(self.how_many_times):
                self.printer.print(self.message)


    if __name__ == '__main__':
        schema = load_schema(HelloWorld)
        root = schema.read('examples/hello_world/input.yml')
        root.print()


and the input yaml file

::

    message: Hello world
    how_many_times: 5
    printer:
      indent: 4
      capitalize: yes

Will result in an already populated object

::

    assert root.message == 'Hello world'
    assert isinstance(root.printer, MessagePrinter)
    root.print()
skyscraper 0.0.5
YAML based lightweight crawlers

Skyscraper
==========

YAML based lightweight crawlers


Installation
------------

::

    pip install skyscraper


Usage
-----


Each web crawler is defined in a yml file

::

    # the name of the crawler
    name: Python 3.x docs
    # the number of parallel thread workers
    threads: 3

    # start urls
    params:
      start_url: https://docs.python.org/3/index.html

    # how/where the results are saved
    results:
      type: Json
      file: "python.json"

    # on each url labeled "result", results will be extracted using
    # this scheme
    result_extractor:
      fields:
      - name: title
        rules:
          select: h1
          text: yes
          single: true


    # the first page is labeled "start" and for each extracted url, we label it
    # accordingly. In this example, we extract the results directly from
    # the first page
    steps:
    - name: start
      label: start
      extract:
      - type: ahrefs
        label: result
        rules:
          select: a.biglink


To run the crawler, execute

::

    skyscraper run examples/python_docs.yaml